OpenAPITools / OpenAPITools/openapi-generator
[typescript-fetch] (4.0.X) Feature Request: Use OperationID to name Inline Responses
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Personal choice but I don't think the naming of inline models is very useful:

openapi-generator version
openapi-generator-cli-4.0.0-20181206.114535-69.
OpenAPI declaration file content or url
See #1563 for an example
Command line used for generation
openapi-generator generate -i openapi.yaml -l typescript-fetch -c es6.json -o ./typescript-api/
Steps to reproduce
See #1563 for an example
Related issues/PRs
N/A
Suggest a fix/enhancement
Is there any opposition to renaming these based on the OperationID? Each is required to be unique and is probably a more descriptive name to use. I think there's the option to add a title attribute to each, so maybe it can go title -> operationID_xxx vs the static inline_response_xxx fallback?
This change would be far-reaching, and I've only really seen the output for the typescript-fetch client, I'm not sure how its handled in other generators.
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 InlineModelResolver.java at the referenced line and review the OpenAPI example in issue #1563. Generate the typescript-fetch client with the provided command and compare inline response names; done means the naming convention is defined for operation IDs, titles, and the static fallback across affected generators.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- api, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100