-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to support examples from draft-06 #20
Comments
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. |
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. |
@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. :) |
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. |
Hey, still looking forward to this. I assume one would just have to merge the PR. @philsturgeon @sixlive |
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? |
@djtarazona sorry I mean merge this: #22 |
do we have news about this? does this project still active? |
@mribichich Just came across this issue again. It seams like the project is inactive. @djtarazona or @philsturgeon ? |
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.
See you over there folks: https://www.npmjs.com/package/@openapi-contrib/json-schema-to-openapi-schema |
Sad to hear. |
We want to convert JSON Schema to OAI 3.0.
Your package seems to be the perfect solution for us.
Everything works perfectly with the exception of examples which have been added in Draft-06.
Is there any possibility to add the feature to convert examples of JSON Schema to example of OAI 3.0? E.g. only converting the first example?
"currency": { "type": [ "string", "null" ], "default": "EUR", "minLength": 3, "maxLength": 3, "title": "Currency", "description": "Currency code", "examples": [ "EUR", "GBP", "USD" ] },
If you have any other suggestions to address this problem, we would look forward to hear about them.
The text was updated successfully, but these errors were encountered: