-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
OpenAPI 3.1.0 is coming #230
Comments
My opinion is it'd be best to bring in https://github.com/xeipuuv/gojsonschema and switch on OpenAPI's version field to know when to translate an OpenAPI |
I see this issue was closed and help is wanted. Now that 3.1.0 is released, are there plans to soon start adding support for 3.1.0? Is there any discussion outside of Issues that I can participate in to get involved? |
Hi Kevin, this issue is still open although was not discussed outside of issues as far as I'm aware. |
Actually gojsonschema only Do you have needs for the newer Schema Drafts or are you mostly interested in the other OpenAPIv3.1 changes? |
Me personally, interested in 3.1 support. Obviously the sooner tools support 3.1 the better and a lot of tools are built on top of kin-openapi. So I would think this is a pretty important update to add to kin-openapi as soon as possible. If moving to gojsonschema is the future anyway, then perhaps moving to it now along with adding 3.1 support should be taken up. |
@fenollp have you had a look at https://github.com/qri-io/jsonschema as a possible alternative given it currently states it supports 2019-09 and is supposedly faster? |
Yes and I did see the benchmark mentioning it was less correct than the other lib. See https://github.com/wbvinc/go-jsonschema-validator-benchmarks I haven't dug in deeper yet but will in the coming weeks. Thanks for the link. |
Not only does https://github.com/qri-io/jsonschema support 2019-09, it's also actively maintained. In contrast, gojsonschema had a last commit in Oct 2020 and last release in Oct 2019. Re supporting 2019-09 the author said in March 2020:
The santhosh-tekuri/jsonschema repo has no commits since Feb and no sign of working towards supporting 2019-09. I think qri-io/jsonschema is the only horse in the race at the moment. Adopting it, and contributing fixes as needed, seems like the most fruitful path. |
If moving to qri-io/jsonschema moves kin-openapi to accepting openapi 3.1.0 sooner, I am all in favor. The sooner those of us using kin-openapi can start adding support for 3.1.0 the better. Seems like one of the nagging issues since the inception of Swagger/OpenAPI is how long it takes tools to adopt/migrate to a new version. Maybe reaching out to the qri-io team and having a dialog with them regarding their commitment might ease the idea of replacing the recent work with gojsonschema? |
santhosh-tekuri/jsonschema v4.0.0 says "draft 2019-09 support".
Seems like it's now a two horse race. |
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
https://github.com/santhosh-tekuri/jsonschema now supports draft 2020-12, putting it ahead in the race. |
Is there any progress on 3.1 support? Wondering if anyone is working on it yet, or if not is there a plan to start work on it soon? |
I did some exploration in #412 but stumbled into roadblocks:
Issues should be raised on respective repos, I just didn't come around to doing that yet. |
Just following up to see if there is any movement on this issue? Any work in progress by anyone? Anytime soon maybe? 3.1 has been final for almost a year.. be good to see this project get a jump on it so Go projects depending upon it can start to support 3.1. |
Hi @kevin-postman and others, I have been maintaining this project for a few years now and am looking to turn this into a more sustainable initiative. Here's a tutorial from GitHub on how to find other maintainers that may need your help whose work you might depend on. Regarding this specific issue, considering the large ramifications and attention to quality it entails, I would like to work on it once some funding has been promised or secured. We can discuss terms privately. Licensing won't change due to sponsorship. All open source work will continue to be available to all and enjoyed equally by all members of the community. TL;DR: Nothing changes and this continues being MIT licensed. Please consider Sponsoring. |
Hello! As the maintainer of openapi.tools, and as somebody works with Linux Foundation helping out in OpenAPI-land, I'm reaching out to tooling vendors to track the progress towards supporting OpenAPI v3.1, to see what roadblocks there are beyond folks just generally being busy at this ridiculous time. OpenAPI v3.1 has a bunch of great little changes, solving problems like the JSON Schema <!=> OpenAPI Schema Object divergence. It also fixes some other inconsistencies and duplicate ways of doing things. It's the best version and everyone should be using it, but we need tooling to catch up. Just in case folks didn't notice, or don't have resources to simplify the process, I'm here to give a friendly prod and send over some handy links. Here are a few articles showing off the differences between OpenAPI v3.0 and v3.1.
Here are some example files which can make for handy pass/fail test cases: https://github.com/Mermade/openapi3-examples/tree/master/3.1 If you're looking for the JSON Schema that defines a valid OpenAPI document, that'll be right over here: https://github.com/OAI/OpenAPI-Specification/tree/main/schemas/v3.1 Hopefully these links can help your contributors step up with confidence to help you get this project updated. If you do start getting pull requests towards OpenAPI 3.1 support, please send a pull request to openapi.tools with an issue tracking the progress, and folks will have a way to subscribe for updates. LMK if you have any questions! |
@fenollp you can easily compile schemas from openapi document using here is the playground link that shows how to do it: https://go.dev/play/p/Hk077OKVi4e |
Just as a quick nudge on this - this appears to be blocking folks doing contract testing using one of the libraries I maintain that depends on this. I may start looking into this at some point to see if we can start getting - even if it's just partial - support for OpenAPI 3.1 |
Nice to see this moving forward, support for 3.1 is getting increasingly painful (at least in the GOlang world) as lots of tools rely on this library at the moment. |
I have played with the generics and created a small lib for openapi v3.1 https://github.com/sv-tools/openapi Feel free to use it as an example |
This also seems like it might be handy. https://github.com/pb33f/libopenapi |
Any (progress) update on this subject? Not trying to put any pressure, but some more info might give us some insight going forward. |
I've recently been chatting with @deepmap-marcinr around this with https://github.com/deepmap/oapi-codegen that we maintain. I've looked at this a few times to start trying to pick up this, but have been a little overwhelmed by the amount of work it may lead to 😅 that may not be a fair assumption, but I've not got full appreciation of all the differences between versions. @philsturgeon aside from the links above, do you have any reading / people that we may be able to chat to who've added support for 3.1 on top of 3.0? I've planned to look through things like I'm also considering seeing if folks fancy one-off sponsoring (not necessarily the $1000 option) work on this migration, as that may help with prioritising it. |
Bowtie is "a meta-validator for the JSON Schema specification" with test suites for multiple versions, including draft7, 2019-09, and 2020-12. The results for draft7 include gojsonschema with 10 errors, and jsonschema with zero errors. The results for 2020-12 include only jsonschema with, again, zero errors. |
Is it important to keep supporting the older OpenApi implementations? It might be easier to create a new version of this package (or a totally new one) that only starts supporting OpenApi from version 3.1, because you might be able to offload a larger part of the logic to an existing jsonschema package? |
I think it will be time for a V2 branch once this happens. I never anticipated that V1 would become this popular, so let's say it's not the greatest piece of code ever written. I've learned many things from the last couple of years which it would be good to get into a V2 and shed some old compatibility issues.
…________________________________________
From: Ilyes512 ***@***.***>
Sent: Monday, April 24, 2023 3:14 AM
To: getkin/kin-openapi
Cc: Marcin Romaszewicz; Mention
Subject: Re: [getkin/kin-openapi] OpenAPI 3.1.0 is coming (#230)
Is it important to keep supporting the older OpenApi implementations?
It might be easier to create a new version of this package (or a totally new one) that only starts supporting OpenApi from version 3.1, because you might be able to offload a larger part of the logic to an existing jsonschema package?
—
Reply to this email directly, view it on GitHub<#230 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALKC5DC5FKE3T6A64SRB4EDXCZHARANCNFSM4OC32QXQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@deepmap-marcinr I think you may be talking about oapi-codegen not kin-openapi? 😁 |
Haha, indeed. Sorry, I got mailing lists crossed.
…________________________________________
From: Jamie Tanna ***@***.***>
Sent: Monday, April 24, 2023 1:19 PM
To: getkin/kin-openapi
Cc: Marcin Romaszewicz; Mention
Subject: Re: [getkin/kin-openapi] OpenAPI 3.1.0 is coming (#230)
@deepmap-marcinr<https://github.com/deepmap-marcinr> I think you may be talking about oapi-codegen not kin-openapi? 😁
—
Reply to this email directly, view it on GitHub<#230 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALKC5DG5YCM36LWCXI4TDY3XC3N5PANCNFSM4OC32QXQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Indeed. As a smaller step, for example, creating an openapi31 directory and reimplementing everything might be a better flow? As for creating new package, I honestly have mixed feelings about seemingly ignoring kin-openapi's excellent contributions. |
Is this being worked on or abandoned? |
Any updates? |
Seems like it's time to move to https://github.com/pb33f/libopenapi |
I think @fenollp is pretty clear that he would like some support from the community in terms of sponsorship to take on this task. See this comment from him. It would be nice to lend him the support he is looking for especially given the fact that this library is used in so many different packages in the Go ecosystem. |
Is it coming? 🤔 Edit: So many people here are users of Googles Apigee framework. I think it is unfortunate that this project gets a barrage of people complaining about OAS3.1 support missing, when this really should be a feature contributed by the Apigee maintainers for free, it's only fair given what they get out of this project for nothing. Just my opinion! At least let's not barrage the maintainers of FOSS software. |
Maintainer EDIT: Want to see this move forward? Jump to this comment
First release candidate has been put up:
https://github.com/OAI/OpenAPI-Specification/releases/tag/3.1.0-rc0
Creating this issue to track what work needs to be done to support it. Of particular interest is the section on breaking changes to align with JSON Schema 2019-09.
The text was updated successfully, but these errors were encountered: