Jira Cloud Api Rest Openapi swagger v3 format is invalid

Hi everyone,
I’m trying to generate model from this swagger https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json ( OpenApi v3 swagger format ) with swagger-codegen, but i got this error ‘Error generating java code : Could not process model ‘FieldValueClause’.Please make sure that your schema is correct!’ So can you give me the correct swagger correct, or at least the swagger at v2 format ? :slight_smile:
Thanks,
Thomas

Pro tip: tools like openapi-generator can’t actually support every possible type of openapi file just yet. As a result, we wrote a transformer to turn the openapi file that JIRA publishes into one that can be used with openapi-generator.

Now, while we have not made that transformer public yet, we do bundle the transformed openapi file with every npm package we release.

So, to get an openapi file that will work for you.

  1. Download https://www.npmjs.com/package/fetch-jira
  2. Unpack the npm package.
  3. Get the openapi file from it and use it for your purposes.

I hope this helps! Please let me know if it does!

You’re answer helped me a lot, i’m not far of what i wanted to do :slight_smile:
I was using swagger-codegen for gradle but the model generation for openapi model is not perfect, i tried as you said openapi-generator for gradle and this works perfectly with the openapi file i got from the npm fetch-jira package :slight_smile:
But unfortunately the models are not complete, i need to create an issue ( https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post ) according to this doc, so i was expecting to find all the models of all the fields that I can pass via the post as models, but that’s not the case, for example the Issue model is not contening the field " project " :slight_smile:


Maybe can you use you’re internal transfomer on this file https://developer.atlassian.com/cloud/jira/platform/swagger-v3.v3.json because he seems to have the models i need :slight_smile:
Thanks for your help anyway

Hi,
No solution for me at the moment @rmassaioli ? :slight_smile: