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
When using @rtk-query/codegen-openapi, we would like to automatically set providesTags and invalidatesTags for endpoints based on a custom OpenAPI extension we've added to our spec on operations.
I know of the existing tag option, but our existing OpenAPI spec uses tags to define much broader set of operations, so instead we would like to define an additional property for tags.
For example, if we have the following spec:
"/pets":
get:
operationId: getPets
responses: ...
summary: Get a list of all adopted pets
tags:
- unrelated-broader-tag
+ x-rtk-provides-tags: pet
post:
operationId: adoptPet
requestBody:
content: ...
required: true
x-originalParamName: body
responses: ...
summary: Adopts a new pet
tags:
- unrelated-broader-tag
+ x-rtk-invalidates-tags: pet
And I would like to configure @rtk-query/codegen-openapi with something like
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using
@rtk-query/codegen-openapi
, we would like to automatically setprovidesTags
andinvalidatesTags
for endpoints based on a custom OpenAPI extension we've added to our spec on operations.I know of the existing
tag
option, but our existing OpenAPI spec uses tags to define much broader set of operations, so instead we would like to define an additional property for tags.For example, if we have the following spec:
And I would like to configure
@rtk-query/codegen-openapi
with something liketo generate something like
If it would be accepted, I would be happy to contribute this in a PR.
Beta Was this translation helpful? Give feedback.
All reactions