Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting error while using jira cloud api from swagger

Getting this error while using swagger generated as discussed in this URL, Could anyone please take a look and suggest any workaround for this? 

It would be a great help if you could help with this issue?
Attaching Stack Trace and possible reasons due to which it is being generated.

Basically, the discriminator being generated is empty, how to solve this?

return getClassByDiscriminator(
getDiscriminatorValue(readElement, ""));


2 answers

@Ben Kelley, Can you please help?

Ben Kelley Atlassian Team Jan 17, 2022

What URL/API are you accessing? It's hard to get any context here.

Ben Kelley Atlassian Team Jan 17, 2022

Also, it looks like you are running a test that is failing. I don't think you can run the generated tests without modification.

What modification do I need to make, like added API token and userName getting data, but the problem occurs in deserialization of Data as swagger is creating multiple implementations, but doesn't give any discriminator.

Ben Kelley Atlassian Team Jan 18, 2022

Perhaps you could indicate what options you used to to generate your library, and give some sample code you are calling that is failing.

Hi, Could anyone help in this, or mention what more context should I provide ?

Suggest an answer

Log in or Sign up to answer
Site Admin

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you