OpenAPITools / OpenAPITools/openapi-generator
[BUG] Handling whitespaces in Type Names
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
In my swagger definition, I have models with whitespaces in their names (like Start page).
I want to generate the swagger.json using typescript-angular language, but the models that are generated have error like this:
export interface Start page {
I didn't find any option to change the name to resolve this whitespace conflict. I tried the config option
{
"modelPropertyNaming": "PascalCase"
}
but had no effect
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
Reproduce the issue with the typescript-angular generator using a model named "Start page" and review how model names are handled alongside the modelPropertyNaming option. Done means the generated swagger.json produces a valid TypeScript interface name without whitespace and the naming option behaves consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, openapi, typescript
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100