swagger-api / swagger-api/swagger-codegen
Error generating code for 5GC_APIs
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Hello. I'm trying to generate code from TS29510_Nnrf_NFManagement.yaml at https://github.com/jdegre/5GC_APIs. However, it failed with errors. When I modified the original yaml then it succeeded. Errors are mostly related to allOf, oneOf, and anyOf keywords.
P.S. Please see the modified yaml file bellow:
TS29510_Nnrf_NFManagement.mod.yaml.txt
Swagger-codegen version
4.0.0-SNAPSHOT
Swagger declaration file content or url
https://github.com/jdegre/5GC_APIs/blob/master/TS29510_Nnrf_NFManagement.yaml
Command line used for generation
java -jar openapi-generator-cli.jar generate -g cpp-restsdk -i 5GC_APIs-master\TS29510_Nnrf_NFManagement.yaml -o MyOutput\
Error output
Exception in thread "main" java.lang.RuntimeException: Could not process model 'NotificationData'.Please make sure that your schema is correct!
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:457)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:892)
at org.openapitools.codegen.cmd.Generate.run(Generate.java:347)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:62)
Caused by: java.lang.RuntimeException: Please report the issue: Cannot process Composed Schema in addProperties: ...
Steps to reproduce
• Download 5GC_APIs-master.zip from https://github.com/jdegre/5GC_APIs and extract to directory 5GC_APIs-master.
• Create a directory called MyOutput.
• Run the command line mentioned above.
Thank you
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by downloading 5GC_APIs and running the reported java -jar openapi-generator-cli.jar command with TS29510_Nnrf_NFManagement.yaml and the cpp-restsdk generator. Trace DefaultGenerator.generateModels and the reported composed-schema failure in addProperties; done means the original YAML generates successfully without modification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, java, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100