How will the Java REST API be changed to support the new GDPR privacy rules?

The Jira Java REST library currently has stuff like

issueInputBuilder.setAssigneeName(projectLead)
.setReporterName(projectLead)

etc.

How will this change to support the new GDPR privacy stuff ?

Hi, @robot,

If you are talking about jira-rest-java-client, then that library is dedicated to Jira Server and won’t be compatible with the latest changes in Jira Cloud.

In Jira Cloud, we recommend downloading the OpenAPI spec of the REST API from the documentation page (click on the three dots in the top-right corner) and generating a client based on it, using for example: API Code & Client Generator | Swagger Codegen

Best regards
Krzysztof

1 Like

Wow , That is a major change. Are you really saying that the jira-rest-java-client is depracated for Jira Cloud ? We have been using it for years on a cloud instance, when did this come about and what notice have you given about it ? This will cause many days of development work which my customer will not be too keen to cover …

OK so when I try to generate the Java client library using swagger

curl -X POST -H “content-type:application/json” -d ‘{“swaggerUrl”:“https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json”}’ https://generator.swagger.io/api/gen/clients/java

I get the error
{“code”:1,“type”:“error”,“message”:“The swagger specification supplied was not valid”}

I have also tried it with the bitbucket endpoint

ie.

(sorry can’t show this because this platform will not let me add more than 2 links … )

and that returns the generated stub code URL fine

So it would appear that your suggestion is not useful since the open API definition (which AFAIK is the same as the swagger definition) is invalid.

Can anyone please give me a way forward without having to handcraft an entire Java API ?

Anyone, anyone ? Surely I’m not the only one trying to do this ? Atlassian people ? @kkercz you made the suggestion , can you provide a reply ?

I had assumed those tools would work, but apparently they aren’t production ready yet; I was getting null pointer exceptions all over the place when I tried to use them.

However, the OpenAPI for the Jira public REST API we provide is correct (I just verified with GitHub - p1c2u/openapi-spec-validator: OpenAPI Spec validator).

I understand that this is a very unfortunate situation. At this point it might be a good idea to fork jira-rest-java-client and adjust it for Jira Cloud. It’s open source, so you are free to do it.

I have built a version of Java REST API with getAccountId and setAccountId if anyone is interested let me know and I can make it public