You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I guess for my use-case it's somewhat repetitive, most of my inline responses are paginated and are an allOf composition of a pagination model and an array of the model for that API (e.g. User).
I realize this is personal preference but the current naming could (arguably) be made better without the user having to add more models to the spec.
If this isn't a direction to take the project in or is too big a breaking change, feel free to close! I knew opening it that it was more personal design choice.
The problem this is causing me is when I add new endpoints they're often inserted in the middle of the swagger json, and so some of the generated models are shuffled down, and if I have a named import to one of the inline responses I have to manually go back and change my client code.
It'd be really helpful if the response object names were deterministic based on the operation name rather than based on the order in the config.
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 gotitle
->operationID_xxx
vs the staticinline_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.
The text was updated successfully, but these errors were encountered: