Comments (11)
I’m not sure what we’d do here. There’s the OpenAPI 3.0 example keyword (notice it’s singular), so we could take the first only?
Other than that you’d have to make full response body examples and they live outside of the Schema object.
from json-schema-to-openapi-schema.
I think it could be useful to just grab the first one. If you wanted more variety you could manually add full example objects.
edit: I've worked up a possible implementation master...sixlive:add-draft-6-examples
edit 2: I used my fork with this branch with speccy and it resolved as expected with the first example.
from json-schema-to-openapi-schema.
do we have news about this? does this project still active?
from json-schema-to-openapi-schema.
It seems pretty clear from this thread that WeWork is not maintaining this package. I hope my friends over there are ok, but with 1000 of the eng team being fired not so long ago I have my doubts that packages like this will be on anyones radar anymore. I've forked the repo to the OpenAPI-Contrib organization, so if anyone wants this PR it's included in v1.0.0.
npm install @openapi-contrib/json-schema-to-openapi-schema
See you over there folks: https://www.npmjs.com/package/@openapi-contrib/json-schema-to-openapi-schema
from json-schema-to-openapi-schema.
@philsturgeon The first thing you mentioned is what I thought of.
@sixlive Thanks! From what understand from the code, that looks like something I would implement as well. I just lacked the the overview in the whole project and where to implement. :)
from json-schema-to-openapi-schema.
After writing a bunch of schemas and working on documentation today, this is a must-have feature for me. If there is anything I can/need to do to get this moving let me know. I can open a PR ASAP.
from json-schema-to-openapi-schema.
Hey, still looking forward to this. I assume one would just have to merge the PR. @philsturgeon @sixlive
from json-schema-to-openapi-schema.
Hey I am no longer working for WeWork so i don't have the permissions to merge this. @sixlive never worked there. :)
@djtarazona hey dude, could you merge this and cut a release?
from json-schema-to-openapi-schema.
@djtarazona sorry I mean merge this: #22
from json-schema-to-openapi-schema.
@mribichich Just came across this issue again. It seams like the project is inactive. @djtarazona or @philsturgeon ?
from json-schema-to-openapi-schema.
Sad to hear.
Thanks for the fork!
from json-schema-to-openapi-schema.
Related Issues (17)
- Is there a possibility of CLI? HOT 1
- issue with up and running HOT 1
- Expected object or boolean as schema, got string HOT 2
- Support for converting patternProperties? HOT 15
- Does not convert "type: null" correctly in most common use case. HOT 3
- Add licence to project HOT 2
- Golang
- Cannot convert type null with $ref
- Type ["null", "foo"] not converted correctly in "$ref"
- is this backwards compatible with json schema draft 04?
- JSON Schema - Definitions HOT 2
- Relies on an outdated library HOT 1
- Add GitHub releases HOT 1
- types in definitions are not converted HOT 1
- Remove $id from subschemas too
- Document that OpenAPI 2.0 is supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-schema-to-openapi-schema.