swagger-api / swagger-api/swagger-codegen

[Java] [Spring] Generating Optional form parameters

Open
#8,043 1 comment 1 reaction 0 assignees View on GitHub

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

https://github.com/swagger-api/swagger-codegen/pull/5968

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.