-
Notifications
You must be signed in to change notification settings - Fork 25
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 generation not working #129
Comments
Hey @jahell , we've had a very hard time with openapi-generator and our schema. Specifically when it comes to references. Our schema is very large and complicated and a lot of the generators do not handle it well. Have you also opened a bug with the Kotlin Generator? |
@bzmw Thanks for the quick reply. The error is persistent for me regardless of what language I specify to generate the schema for. Hence, I don't think it's something specific to the Kotlin generator. I thought using openapi generation was the primary use case of this repository. Is there another way for me to use the schema references to generate an api client? |
@jahell - As for generating a client through another means- there are other generators but none nearly as popular as openapi generator. Sorry I can't help you more :( |
@bzmw looks it still doesn't work:
|
Encountering the same issue, any updates? |
Same issue here, I don't have a log file but the online OpenAPI generator (stable and master) give a 500 Internal Server Error, while they work with other schemas. |
The issue still exists. I tried with the latest schema file (https://github.com/PagerDuty/api-schema/blob/main/reference/REST/openapiv3.json) but getting the same error. command: |
Same issue here with the latest version of openapi-generator (with any language specified) and openapiv3.json openapi-generator version: 6.2.0 |
Can confirm same issue. Reproduce: brew install openapi-generator
cd <...>/api-schema/reference/REST
openapi-generator validate --input-spec openapiv3.json Error and Warning Output collapsable
You can also, quickly see a subset of those errors with the online Swagger editor: For impact context: these (and possibly other) spec errors are impacting the ability to derive client request and response code. (e.g. datamodel-code-generator as well as server mocking and client code generation for a multitude of languages (java, go rust, python, ruby, etc.))), which aid in building more robust PagerDuty integrations. Thanks in advance for helping resolve this. 🌮 👥 🚀 |
The codegen tool NSwag for dotnet also fails to generate code for PagerDuty OpenAPI schema for the same reason of invalid data model: dotnet tool install -g NSwag.ConsoleCore
nswag openapi2csclient /output:PagerDutyClient.cs /namespace:MyApp /input:https://raw.githubusercontent.com/PagerDuty/api-schema/main/reference/REST/openapiv3.json I believe there are 2 problems here: |
Also fails to generate code with Microsoft's AutoRest for the same reason of invalid data model: npm install -g autorest
autorest --csharp --input-file=https://raw.githubusercontent.com/PagerDuty/api-schema/main/reference/REST/openapiv3.json
|
Also fails to generate code with swagger-codegen for the same reason of invalid data model: iwr -OutFile swagger-codegen-cli-3.jar https://maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.61/swagger-codegen-cli-3.0.61.jar
java -jar swagger-codegen-cli-3.jar generate -l csharp-dotnet2 -i https://raw.githubusercontent.com/PagerDuty/api-schema/main/reference/REST/openapiv3.json
|
Hi there. I'm trying to generate a sdk for the REST API in kotlin. Following the instructions on https://github.com/OpenAPITools/openapi-generator, I'm running the following command to do so.
openapi-generator version: 4.3.1
OS: macOS
I'm getting the following error. Any pointers on what is going wrong here?
The text was updated successfully, but these errors were encountered: