Skip to content
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

Error : missing swagger input or config! on docker image #12453

Open
enimiste opened this issue Aug 24, 2024 · 1 comment
Open

Error : missing swagger input or config! on docker image #12453

enimiste opened this issue Aug 24, 2024 · 1 comment

Comments

@enimiste
Copy link

enimiste commented Aug 24, 2024

Docker image : latest

Issue :
Unable to generate code from OpenAPI v3 documentation file. The command that i used is :

docker run --rm -v .:/app swaggerapi/swagger-codegen-cli generate \
    -i /app/openapi_hermes_v1.10.0.json \
    -l html2 \
    -o /app/output

Error that i got when running the command :

[main] INFO io.swagger.parser.Swagger20Parser - reading from /app/openapi_hermes_v1.10.0.json
[main] INFO io.swagger.parser.Swagger20Parser - reading from /app/openapi_hermes_v1.10.0.json
[main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No .swagger-codegen-ignore file found.
Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
	at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:766)
	at io.swagger.codegen.cmd.Generate.run(Generate.java:307)
	at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)

On Stackoverflow forum, i found that the 2.x version supports only the swagger schema.

@enimiste enimiste changed the title Latest docker image uses an old version of Swagger Codgen : 2.4.43 instead of the last stable one 3.x Error : missing swagger input or config! on docker image Aug 24, 2024
@defurn
Copy link

defurn commented Sep 13, 2024

you can use this one: https://hub.docker.com/r/swaggerapi/swagger-codegen-cli-v3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants