openapi-typescript icon indicating copy to clipboard operation
openapi-typescript copied to clipboard

option to modify paths prefixes

Open maapteh opened this issue 3 years ago • 2 comments

Hi in toolings like Orval and Rapini you can replace the paths context. This is handy for clients who use a specific context in their frontend to point to that api. So example my service swagger tells endpoint is /profile but in our application we use /api/profile to internally forward to that service container.

Is this a feature you think adds value for your library? At the moment i can't use this library because of it but im first checking.

maapteh avatar Jul 29 '22 09:07 maapteh

Ah that’s really interesting. Does your schema take advantage of the servers part of the config? There could be something done with that automatically.

drwpow avatar Aug 06 '22 04:08 drwpow

@drwpow Its a microservice, so they don't really care where you expose things on the frontend application. Multiple apps use the same service but expose differently. This path can then be used in toolings like openapi-typescript-fetch (like this lib advises) to be really typesafe and more!

maapteh avatar Aug 06 '22 10:08 maapteh

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Aug 06 '24 12:08 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

github-actions[bot] avatar Aug 15 '24 02:08 github-actions[bot]