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

generate-api Please make sure that your schema is correct! #134

Open
pfwd opened this issue Oct 2, 2022 · 2 comments
Open

generate-api Please make sure that your schema is correct! #134

pfwd opened this issue Oct 2, 2022 · 2 comments
Assignees
Labels
api client Any thing to do with the API Client bug Something isn't working
Milestone

Comments

@pfwd
Copy link
Contributor

pfwd commented Oct 2, 2022

When running yarn run generate-api The following error is reported

Exception in thread "main" java.lang.RuntimeException: Could not process model 'Answer_jsonld_question_item__context_oneOf'.Please make sure that your schema is correct!
        at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:518)
        at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:912)
        at org.openapitools.codegen.cmd.Generate.execute(Generate.java:465)
        at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
        at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Caused by: java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class io.swagger.v3.oas.models.media.Schema (java.lang.Boolean is in module java.base of loader 'bootstrap'; io.swagger.v3.oas.models.media.Schema is in unnamed module of loader 'app')
        at org.openapitools.codegen.languages.TypeScriptClientCodegen.addAdditionPropertiesToCodeGenModel(TypeScriptClientCodegen.java:896)
        at org.openapitools.codegen.DefaultCodegen.updateModelForObject(DefaultCodegen.java:2726)
        at org.openapitools.codegen.DefaultCodegen.fromModel(DefaultCodegen.java:2951)
        at org.openapitools.codegen.DefaultGenerator.processModels(DefaultGenerator.java:1291)
        at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:513)
        ... 4 more
error Command failed with exit code 1.

Work should be done as part of #129

@pfwd pfwd self-assigned this Oct 2, 2022
@pfwd pfwd added this to the API setup milestone Oct 2, 2022
@pfwd
Copy link
Contributor Author

pfwd commented Oct 2, 2022

Could be related to the following info message

[main] INFO  o.o.codegen.DefaultGenerator - Model Answer-question.item not generated since it's a free-form object

@pfwd
Copy link
Contributor Author

pfwd commented Oct 13, 2022

Unsure if this is still an issue. I will need to check before closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api client Any thing to do with the API Client bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant