OpenAPITools / OpenAPITools/openapi-generator
[BUG] Description
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
Description
When attempting to compile the code generated for https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json the error "illegal escape character" is showing up in numerous locations. I am using the following options in my maven plugin:
For example, the generated class com.atlassian.jira.software.api.RemotelinksApi, there is a method argument annotion that looks like this:
@ApiParam("Free-form query parameters to specify which properties to delete by. Properties refer to the arbitrary information the provider tagged Remote Links with previously. For example, if the provider previously tagged a remote link with accountId: \"properties\": { \"accountId\": \"account-123\" } And now they want to delete Remote Links in bulk by that specific accountId as follows: e.g. DELETE /bulkByProperties?accountId=account-123 ")
Which doesn't compile. The \" within the spec has become "e;
I think either the \" should be retained or the "e; shouldn't be prefixed by the \
openapi-generator version
5.1.0 of the maven plugin
OpenAPI declaration file content or url
https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json
Generation Details
jaxrs-spec, using the maven plugin (see below)
Steps to reproduce
Here is a extract of my POM https://gist.github.com/taroquu/724c377a9ffd8ed273db7a16406b60bf
If you try to run it clean package you'll get the issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked swagger.v3.json and the Maven plugin configuration in the referenced POM gist, then run clean package to reproduce the generated RemotelinksApi output. Trace how the annotation text becomes escaped in the generated Java source; done means the generated classes compile without illegal escape character errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100