-
Notifications
You must be signed in to change notification settings - Fork 6k
Does any codegen work for open api spec 3 yet? #6598
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
Comments
Not yet. Swagger Codegen relies on Swagger Parser to parse the spec and Swagger Parser 2.0.0 RC1 (which supports OAI 3.0 spec) was just released 2 days ago. cc @HugoMario, who is working adding OAI 3.0 support to Swagger Codegen. |
Open issue here as well, with no timeline for support mentioned yet. #4669 |
Please see #7003 for an experimental implementation of the generator engine in Node.js which supports OpenAPI 3.0 |
Did some testing using 3.0.0_enhancements branch (and by extension the 2.0.0-SNAPSHOT of swagger-parser) with a semi-complex openapi 3.0 contract and ran into a small issue with Java codegen that I'll put here in hopes of being helpful: localVarAccepts doesn't create a valid array when combining response content-types as in the below yaml:
results in
This also occurs when different content-types are used in different response codes. For now, I'm getting around this by only specifying the content-type in the 200 response. |
cc @HugoMario who's actively working on that branch to provide OAI 3.0 support. |
Any update? |
sorry for delay response. Right now we're focus on java (client/server) for oas 3. I'm working on it, btw. There is an estimate for 08/01/2018 to release this beta. |
@HugoMario Would that be Jan 8th or Aug 1st for the beta release? |
@jeroenhuinink it's Jan 8th, sorry for confusion. |
Any updates on this? |
yes, we're having a delay, but today or tomorrow we'll release the beta. |
@HugoMario any news? |
What's up folks? Can you give any predictions? |
Hey it's been a week, any update? |
@doodyparizada I saw that Unfortunately, it just supports |
any update on "go" and "nodejs-server" support for open API 3.0 ? ETA ? |
@nsFrankly There's no ETA. This depends on community contributions, and are based on availability and capacity of it. You're welcome to submit PRs as well to help push this forward. |
thx @webron , we will use swagger 2.0 , for a possible later auto conversion to open api 3 and code gen. I'll submit a new Issue request for "go" , "nodejs-server". If i have time i'll look into writing the generators |
Would it be possible to release a version, say 3.0.0-mininal, to support OpenApi spec 3.0 without the other major changes (handlebar, remote argument loading, moving templates, etc)? We are happy to see those major changes but our highest priority is just OpenApi spec 3.0 support with our own mustache templates. Thanks for great work! |
@LeonorAz You need to pull the |
Thanks for information. I hope the team will consider the minimal release to make the migration easier. |
I have tried this version : swagger-codegen-cli-3.0.0-20180221.003354-22.jar |
@slarti-b There is an alternative (community fork) supporting all languages of |
No comments for almost a year, what does this mean for openapi 3.0.0 support in the swagger codgen (and the swagger codegen maven plugin)? My first attempt with the openapi-generator wasn't promising :/ |
@chrisinmtown , it means that we have an answer and is: yes, there are codegen work for open api spec 3. check latest release https://github.com/swagger-api/swagger-codegen/releases |
Thanks - version 3.0.8 of the swagger codegen maven plugin is working well for generating Java client code from a openapi: 3.0.0 spec in yaml format. I configured my pom.xml file to use the plugin as follows, you have just have to define maven property client.base.package.name:
|
Hi All, Im using the latest version of but still when im calling the below try { It fails with Please guide |
Hi, I am using the https://github.com/swagger-api/swagger-codegen/archive/v3.0.21.zip to generate code for openapi 3.0. `
|
@gtarcoder download the compiled CLI JAR from |
That works, thanks for sharing. |
This probably needs a separate issue but for posterity... I saw this close a while back and was excited to start using it. I was however frustrated to find after spending a good bit of work on converting a spec that it may be "working" but there are no containers for the 3.x branch. This means it might "work" but if you're using those containers in your CI process it is still not available You'll have to use the jars with some java container and download it every time or the openapitools fork which generates slightly different code. 😞 |
@neclimdul if you mean Docker images for Codegen 3.x, see here: |
how to make the api path dynamic though. |
I know it's not released, but I got the impression much of the functionality was there for the version 3 spec. Particularly interested in the server stub generation.
I tried both the 3.0.0 branch (checkout and
mvn clean package
) and the snapshot from 24 Sept from https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/3.0.0-SNAPSHOT/I tried with a sample.yml which is a direct copy of the basic example from https://swagger.io/docs/specification/basic-structure/
It fails on the first line with Unrecognized token 'openapi': was expecting ('true', 'false' or 'null')
Full output (with -v)
Am I doing something wrong? Do I need to call it differently for version 3 (help generate seems the same, although I'm new to swagger and don't know what all the options do). I not ice it's using io.swagger.parser.Swagger20Parser, which I guess is the 2.0 parser. Or is this not implemented yet for 3.0
The text was updated successfully, but these errors were encountered: