swagger-api / swagger-api/swagger-codegen-generators
Spring server generated from yaml does not compile
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Q&A (please complete the following information)
- OS: [win10 pro 64 bit]
- Browser: [chrome]
- Version: [72.0.3626.121]
- Method of installation: [on line]
- Swagger-Editor version: [https://editor.swagger.io]
- Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0.1]
Content & configuration
Example Swagger/OpenAPI definition:
https://berlingroup.stackstorage.com/s/iVgP0TIgErYRpCi
Describe the bug you're encountering
To reproduce...
Steps to reproduce the behavior:
- Go to https://berlingroup.stackstorage.com/s/iVgP0TIgErYRpCi
- Download PSD2 yaml api
- Import api into: https://editor.swagger.io
- Generate Server -> spring
- Generated project does not compile
Expected behavior
Generated project should compile to be deployable
Additional context or thoughts
Problem seem to be incorrectly interpreted multiline comments, and quotation marks (") used in values, which are also java string denotation marks.
i.e.:
allowableValues = ""payments", "bulk-payments", "periodic-payments""
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 PSD2 YAML, import it into https://editor.swagger.io, and use Generate Server → spring to reproduce the failure. Inspect the generated code around multiline comments and quoted allowableValues, then confirm the generated project compiles successfully; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, yaml
- Domain
- backend, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100