OpenAPITools / OpenAPITools/openapi-generator
[BUG] [Spring] Upgrading api generator from 4.3.1 to 6.1.0 fails to parse "tags" descriptions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
After upgrading API generator from 4.3.1 to 6.1.0 fails to parse "tags" descriptions with new line pipe | failed to parse.
it's very easy to reproduce
All you need is to have a pipe as part of your description, new line and some text
openapi-generator version
6.1.0
OpenAPI declaration file content or url
tags:
- name: pets
description: |
# Everything about your Pets
Some very long description
Generation Details
Steps to reproduce
run the spring build, there will be an compilation error
Error snake-parsing yaml content
at io.swagger.v3.parser.util.DeseralizationUtils$CustomSnakeYamlConstructor.getSinglrData(DeseralizationUtils.java:417)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:491)
Related issues/PRs
Suggest a fix
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 failing Spring build and the stack trace location in DeseralizationUtils.java at line 417, where SnakeYAML reports the parsing error. Reproduce the issue using the provided OpenAPI tags description containing a pipe and a newline; done means the declaration parses and Spring generation completes without the compilation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, yaml
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100