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

OpenAPI conversion doesn't translate definitions to components/schemas #169

Closed
alansill opened this issue Jan 23, 2019 · 1 comment
Closed

Comments

@alansill
Copy link

I’m getting an error when generating from the latest OpenAPI spec online via openapi-generator as below.

I can see the GenerateCSRResponse section, but it doesn’t seem to be under any structure called definitions.

[asill@redfish ~]$ openapi-generator generate -g python -o redfish-test-python -i https://redfish.dmtf.org/schemas/openapi.yaml
[main] WARN io.swagger.v3.parser.OpenAPIV3Parser - Exception while reading:
java.lang.RuntimeException: Could not find definitions/GenerateCSRResponse in contents of http://redfish.dmtf.org/schemas/v1/CertificateService.v1_0_0.yaml
at io.swagger.v3.parser.ResolverCache.loadRef(ResolverCache.java:140)
at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefToExternalSchema(ExternalRefProcessor.java:51)
at io.swagger.v3.parser.processors.SchemaProcessor.processReferenceSchema(SchemaProcessor.java:202)
at io.swagger.v3.parser.processors.SchemaProcessor.processSchema(SchemaProcessor.java:37)
at io.swagger.v3.parser.processors.ResponseProcessor.processResponse(ResponseProcessor.java:52)
at io.swagger.v3.parser.processors.OperationProcessor.processOperation(OperationProcessor.java:67)
at io.swagger.v3.parser.processors.PathsProcessor.processPaths(PathsProcessor.java:84)
at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:49)
at io.swagger.v3.parser.OpenAPIV3Parser.readLocation(OpenAPIV3Parser.java:53)
at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:19)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:561)
at org.openapitools.codegen.cmd.Generate.run(Generate.java:353)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:62)

This seems to be referred to by this line in the openapi.yaml file:

            $ref: http://redfish.dmtf.org/schemas/v1/CertificateService.v1_0_0.yaml#/definitions/GenerateCSRResponse
@mraineri mraineri self-assigned this Jan 23, 2019
@mraineri
Copy link
Contributor

The good news is this just seems limited to translation for how Action return payloads are converted.

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

No branches or pull requests

2 participants