connect icon indicating copy to clipboard operation
connect copied to clipboard

Schema spec does not validate

Open foursixnine opened this issue 1 year ago • 0 comments

openapi-generator generate --skip-validate-spec -i ~/Downloads/swagger.yaml -g rust -o scc-package-search

When calling https://openapi-generator.tech to botstrap some rust code, I get the following error

openapi-generator generate -i ~/Downloads/swagger.yaml -g rust -o scc-package-search
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 4, Warning count: 0
Errors:
	-attribute paths.'/products'(get).[Accept].type is missing
	-attribute paths.'/products'(get).[Accept].schema is unexpected
	-attribute paths.'/packages'(get).[Accept].type is missing
	-attribute paths.'/packages'(get).[Accept].schema is unexpected

	at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:717)
	at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:744)
	at org.openapitools.codegen.cmd.Generate.execute(Generate.java:527)
	at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
	at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)

foursixnine avatar Feb 14 '24 10:02 foursixnine