swagger-api / swagger-api/swagger-codegen
[Java] [Spring] Generating Optional form parameters
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
In JavaSpring:
queryParams.mustache, headerParams.mustache, pathParams.mustache usees optionalDataType.mustche but formParams.mustache not. Is this expected behaviour?
Swagger-codegen version
2.4.0-SNAPSHOT
Suggest a fix/enhancement
If this is a bug need to replace {{{dataType}}} with {{>optionalDataType}} in formParams.mustache. as it was done in other files in commit ecf924e
Related 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
Inspect the JavaSpring queryParams.mustache, headerParams.mustache, pathParams.mustache, and formParams.mustache templates, comparing how each references optionalDataType. Review commit ecf924e and the related pull request for context; the work is done when form parameter generation handles optional data types consistently with the other parameter templates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100