Closed trevorloranger closed 4 years ago
Thank you for this :smiley:
You've done everything right, but there is a problem.
When I try and build the example app I get the following error:
> openapi-generator generate -i ../keycloak/11.0.json -g typescript-axios -o src/keycloak-client
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: 2, Warning count: 4
Errors:
-attribute paths.'/{realm}/roles'(get).responses.2XX.content.'application/json'.schema.#/components/schemas/Stream is missing
-attribute paths.'/{realm}/clients/{id}/roles'(get).responses.2XX.content.'application/json'.schema.#/components/schemas/Stream is missing
Warnings:
-attribute paths.'/{realm}/roles'(get).responses.2XX.content.'application/json'.schema.#/components/schemas/Stream is missing
-attribute paths.'/{realm}/clients/{id}/roles'(get).responses.2XX.content.'application/json'.schema.#/components/schemas/Stream is missing
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:480)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:507)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:423)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:61)
I guess this is because GET /{realm}/clients/{id}/roles is marked as returning a Stream
object which isn't defined.
I don't want to merge whilst it is broken.
I'm not going to have time to make changes to the transformer (to generate a working spec) in the next 2 weeks. In 2 weeks time I can either fix it or if you're interested, work with you to fix it.
Merged, Thank you @trevorloranger