OpenAPI v3.1 support, experimental re-implementation using libopenapi#2197
OpenAPI v3.1 support, experimental re-implementation using libopenapi#2197mromaszewicz merged 30 commits intooapi-codegen:mainfrom
Conversation
Allow users to control which content types are included in model generation for requests, responses.
Users can now fully control the struct tags that are generated, with default values of json and form encoding
Generated code must have a header saying it's generated.
Simplify names of schemas discovered by traversing the paths element of the spec.
Ensure that we're fixing existing open issues.
Recreate old issue tests to make sure everything still works as expected.
Add a Nullable type and use it where explicitly requested.
Add extension properties which match the old oapi-codegen behavior, and fix a bunch of related issues.
Parameter binding and styling will now be embedded into the generated code, and not rely on an external runtime package.
Add first server support, using built in http, and refine templates to make it work. Example perstore implementation.
Models can be imported into clients now, so they can live in a separate package. Clean up example client to use the models import, and clean up tests.
middleware and validation
Libopenapi now supports parsing the model without resolving external references, which is exactly what we wanted.
Add webhook and callback support, and show examples of how to use them.
This was an unnecessary complication and we'll cross this bridge if we ever get to it. Also, fix lint issues.
echo V5 needs go 1.25, so we can only validate it if running the 1.25 toolchain
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Since this doesn't affect existing users at all, I am merging it to gather feedback. |
jamietanna
left a comment
There was a problem hiding this comment.
Per discussion on Slack, let's move this into a separate repo to keep the main repo clean, and allow folks to opt in
|
@mromaszewicz where we're using AI-written code, please make sure it's called out in the PR and/or |
|
We've moved this into a separate fork for the time being: https://github.com/oapi-codegen/oapi-codegen-exp |
…oapi-codegen#2197) This is a prototype implementation of a future versions of oapi-codegen. It's almost a full rewrite, heavily inspired by previous code, and lessons learned. - much more flexibility in configuring generated code - move from kin-openapi to libopenapi to support 3.1 and 3.2 specs - webhook support - callback support - incompatible codegen changes to aggregate types (allOf, anyOf, oneOf) - many existing codegen bugs around schemas fixed
…bopenapi (oapi-codegen#2197)" This reverts commit 5206145.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Please ask in https://github.com/oapi-codegen/oapi-codegen-exp |
This is a prototype for a V3 versions of oapi-codegen, which addresses several issues, but mainly #373.
Please see the README.me in
experimental/for usage and changes.