Repository navigation
Add api path to endpoint structure #5247
NicolasTroles
started this conversation in
Ideas
Replies: 2 comments
|
Is this about the reducer path ( I'm not immediately sure of a good way to expose this, because RTKQ at its core doesn't even have a concept of "URL" or "HTTP". It just tracks a promise's status and the result. It's specific adapters like Open to suggestions here if you have any! |
0 replies
|
It is the URL path, so we can reuse it in MSW or any other place. And isn't there another way to export the paths with the endpoint name? Something like:
We created a script to generate it based on our schema, but would be nice to have it automatically generated. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi there,
We are currently migrating our hardcoded API calls to use the hooks generated by @rtk-query/codegen-openapi.
Our generated endpoints follow a structure like the example below, where the API name is

deleteApiDashboardV1DeleteById:One of our requirements is to access the underlying API path so we can reuse it when mocking requests in tests with MSW. Using the example, we'd need
/api/dashboard/v1/delete/:idWe weren’t able to find a way to generate or export the endpoint path using RTK Query’s OpenAPI codegen. Is there currently a supported way to access or export these paths? If not, would implementing support for this be a reasonable feature request?
Thanks.
All reactions