-
Notifications
You must be signed in to change notification settings - Fork 215
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
Add support for handling OpenAPI v3.1 definitions #3914
Comments
Hi @julealgon, |
@baywet Once OpenAPI 3.1 support is finalized, is support for generation of webhooks planned? I currently maintain https://github.com/octokit/webhooks.net manually, but am eager to switch over to automatic generation if possible. |
@JamieMagee if by generation of webhooks you mean generating the models for the incoming requests, sure we could add that. |
@baywet yes, that's exactly what I am talking about. A top level
As of release Footnotes |
Thanks for clarifying! |
Hello, |
Yes! It's absolutely something we'll start working on soon as there is a lot of demand for it! We have some other priorities right now but this should be in the next bucket of improvements! |
Have the priorities changed by now? 😄 |
adding a +1 for demand here - all our APIs are using OAI3.1 so having to down-convert to 3.0 is a little cumbersome. (also happy to help with contributing!) |
No updated timeline to share at this point. |
Please make sure that when this is implemented it fully supports proper enums with number/string representation in all languages that generate real enums with real numerical values attached like this:
The value should always be defined, never left to some automatic guess work based on the starting value too. See #5165 for examples of what should be correctly outputted as your test case. In the case where the key is a string, languages should use a const static class to represent those if they don't support string/string (i.e. c#) I've defined an example in #5165 as well of what the OpenAPI 3.1 version looks like. |
@baywet is there some preview version that we can try? I have a 3.1 spec that I want to use. Hopefully you get v3.1 support working soon. Great work on this tool already! |
Hey everyone, OpenAPI.net has released a preview of v2, which adds support for OpenAPI 3.1 🎉🎉🎉 We're using kiota (and other internal tools) to dog food this new version, so we can collect and address feedback on this new version before releasing a new major release (non-preview). This has already allowed us to collect a lot of issues with one that's currently blocking kiota and is being worked on. I have not opened a PR yet to reduce noise (but let me know if it would help you track progress), but my branch (feat/OAI-3-1) has ~150 failing unit tests, the vast majority caused by the bug mentioned above. Once this is fixed, we can think about previewing things in kiota (we don't need for all the feedback to be addressed as we can take a dependency on a preview release, and iterate on that). Now, when we refer to "OpenAPI 3.1 support" it's usually helpful to break it down into:
If during the testing phase we realize the basic parsing of OAS3.1 brings some breaking changes, we'll have to review the sequencing here. I hope this update is positive news to most of you, I do not have any timelines to share, but I'll be happy to answer questions :) |
Hi everyone, The incubation of the preview version resulted in lots of feedback, which is gradually being addressed. I've started a draft PR at #5936 You'll see we're down to ~15 unit tests failing at this point. They are all caused by two dependencies: Microsoft.Plugins.Manifest and Microsoft.OpenApi.ApiManifest which depend on Microsoft.OpenAPI 1.X, causing assemblies loading confusion. I'll be working with the library owners to get them to upgrade to Microsoft.OpenAPI 2.X as well to unblock us. Once that part is done, we might have additional adjustments to make since Microsoft.OpenAPI will have addressed additional feedback. And after that, we'll see what results we get from integration tests. Hopefully this is good news for all of you! Happy end of the year celebrations! |
We started using Kiota recently for a new integration, but the OpenAPI definition for the API we were to interface with uses the v3.1 OpenAPI spec. When attempting to generate a client for this spec, we get the following error message:
This forced us to down-convert the definition from v3.1 to v3.0 to be able to use Kiota to generate a C# client for it.
We'd like for Kiota to be able to handle OpenAPI v3.1 natively, so that we don't have to perform this extra, lossy conversion step. The conversion increases maintenance substantially for us, since now we cannot refer directly to the target API's OpenAPI definition, and instead, forces us to maintain a local converted definition file ourselves. Additionally, whenever the target API definition changes in any way, we are then required to perform the conversion step manually again and update our converted file, to only then be able to run Kiota on it again to generate the updated proxy.
For reference, this is the definition we are currently targeting (from SendGrid):
The text was updated successfully, but these errors were encountered: