swagger-api / swagger-api/swagger-codegen-generators
Options have String values that are `boolean-type`
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
There are some options on different languages that are string-type but the default values are boolean-type ( "true"/"false" ).
I think since there are no limitations on using the boolean type, why not change these options to corresponding types to maintain consistency.
Options for Go language for a V3 Client, using the online generator ( https://generator3.swagger.io/api/options?language=go&version=V3 ):
{
"packageName": {
"opt": "packageName",
"description": "Go package name (convention: lowercase).",
"type": "string",
"default": "swagger"
},
"hideGenerationTimestamp": {
"opt": "hideGenerationTimestamp",
"description": "Hides the generation timestamp when files are generated.",
"type": "string",
"default": "true"
},
"packageVersion": {
"opt": "packageVersion",
"description": "Go package version.",
"type": "string",
"default": "1.0.0"
},
"withXml": {
"opt": "withXml",
"description": "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)",
"type": "boolean",
"default": "false"
}
}
The hideGenerationTimestamp option is a String with a boolean-type value by default ( "true" ), but we also have the option withXml that is boolean type with a default value of "false".
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 generator options endpoint linked in the issue and locate the definitions of hideGenerationTimestamp across the affected language generators. Compare its declared type and default with the boolean withXml option, then verify that the affected options consistently expose boolean types and boolean defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100