1

I am trying to generate a Rest API Client using the OpenAPI spec published on the Atlassian site for the Jira cloud.

I have tried using the Swagger Codegen, Openapi-generator, and NSwag Studio. None of the auto-generated Rest API Client compiled. I have tried to generate for .Net 4.X and .Net 6 but nothing working.

Please let me know how to validate whether the OpenAPI spec is causing an issue. If that's causing the issue, is there an option to fix that OpenAPI spec and generate the Rest API Client? I prefer not to make any changes to the auto-generated code.

Thanks

2
  • I pasted the spec into editor.swagger.io and it shows 2 errors: Semantic error at paths./rest/api/2/issue/properties/{propertyKey}.delete.requestBody DELETE operations cannot have a requestBody. Semantic error at paths./rest/api/2/webhook.delete.requestBody DELETE operations cannot have a requestBody. Commented Jun 10, 2022 at 14:21
  • Thanks, I will remove that particular section and give a try. Commented Jun 13, 2022 at 5:46

1 Answer 1

1

I can generate a C# client using OpenAPI Generator 6.0.0 and compile it without issue:

openapi-generator-cli generate -g csharp-netcore -i https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json -o /tmp/jira-csharp/

(openapi-generator-cli can be installed via npm: npm install -g @openapitools/openapi-generator-cli )

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.