-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[BUG]missing swagger input or config #6442
Comments
Please provide more information about what exactly you're trying to do, such as the exact command you're running. |
Sorry, that yaml's a bit broken. Could you send it again in |
commandjava -jar swagger-codegen-cli-3.0.0-20170904.171256-3.jar generate -l spring -c config.json -i swagger.yaml -o E:\Swagger\demo config.json
swagger.yaml
|
I've tracked the issue to this line in swagger-parser. Correcting this to openapi let the generator complete successfully with the provided example yaml, so if you want a quick fix you could try that. The feature/3.0.0-rc2 branch there has thoroughly changed the structure of that directory, so I suspect there are changes made/being made which the 3.0.0 swagger-codegen branch isn't yet synchronised with. |
thanks |
Is there any update on when this fix will be available in a snapshot? |
Still broken as of 1/12/2018 |
any news on this? |
Is this still broken? |
I'm getting this same error when trying to use Open Api spec 3. However, it works fine with spec 2. Anyone have this issue as well? |
issue still present |
yeah I just hit this :/ |
Try using this experimental openapi codegen instead. It is v light and works for me: https://github.com/Mermade/openapi-codegen |
I tried downloading Swagger codegen 3.0.5 and that 'worked' with OpenApi 3 pretty much, although for some reason it misses out the names of properties in the model constructors and messes up the path to the projects from my sln file although I think these are probably all c# specific. (mentioned here #9241) |
Has this worked for anyone ? OpenApi Spec 3 does not work with io.swagger swagger-codegen-maven-plugin 2.3.1. - I'm getting this error when trying to use Open Api spec 3. However, it works fine with spec 2. |
Download source and generate swagger-codegen-cli.jar jar locally. This worked for me. |
hello, i have the same error with https://developer.atlassian.com/cloud/jira/platform/swagger-v3.v3.json |
Tried that and still get the same error:
Edit: I ended up using @openapitools/openapi-generator-cli and it worked flawlessly. |
I also gettting this error while using swagger-codegen-maven-plugin 2.4.7. Could you please fix this? |
I had that error too, but then I realize I made 2 mistakes when setting up the controller:
After fixing those 2 errors, and the code is generated |
Any update on this? |
Im getting this error on 2.4.13 as well.. Exception in thread "main" java.lang.RuntimeException: missing swagger input or config! Im using openapi 3.0.0 yaml, but converted it to json, neither work. |
By default the master branch supports 2.0. The 3.0 support is on the 3.0.0 branch, you have to change to this branch and build again to get it working.
|
Check using single space and not tab! |
I believe the issue here is that we are using a very old codegen version. It turns out the latest published docker image is Would the Swagger team be so kind to publish a fresh docker image for us, please? It would be really nice if we could use a dockerized version of the codegen. Thank you! CC @wing328 |
openapi-generator-cli has issues too docker run --rm -v C:\dev\client\projects:/local openapitools/openapi-generator-cli generate -i \ /local/temp/swagger.json\ -l typescript-angular -o /local/api-swagger-client/src Error
|
I get the same error as well docker run --rm -v C:\dev\client\projects:/local swaggerapi/swagger-codegen-cli generate -i \ /local/temp/swagger.json\ -l typescript-angular -o /local/api-swagger-client/src |
8 years later and still not fixed
|
Description
io.swagger.parser.Swagger20Parser can not parse "openapi"
Swagger-codegen version
3.0.0-SNAPSHOT
The text was updated successfully, but these errors were encountered: