Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Make a dictionary of all operations with response, operationId, path, variables #193

Open
sneko opened this issue Aug 14, 2023 · 0 comments

Comments

@sneko
Copy link

sneko commented Aug 14, 2023

Hi @fabien0102 ,

My use case: allow mocking easily while being type-safe.

I do see the QueryOperation type with the union but it misses the response type in each object. I can tweak with TypeScript to get for example ApiCategoriesGetCollectionVariables from QueryOperation, then remove the suffix and add as suffix Response but it's a bit annoying (but still doable).

On the other side, I'm stuck because for mutations there is no such union type, so it's impossible to infer operationId/path since they are used as hard values inside their fetch method.

Having them centralized and normalized would help extending the default generation.

Thank you,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant