Repository navigation
Conversation
…operation base paths
… hardcoding /api, add another test to check if the payload api route config works
…ches due to previously missing zed config
|
@janbuchar Glad to support the project! Unfortunately I missed this PR. It is very close to mine. The only difference is, that my approach allows the apiBasePath to bet set freely in the plugin options. Otherwise it defaults to the currently configured Payload api route. Sorry for any inconvenience. I updated my PR, because I liked the idea of the previous PR to use the sanitized payload config from the req object to avoid hardcoding "/api". I also added a second test to properly test changes to the Payload config. |
|
In the end, I decided to merge #76 and port over your changes. Thanks for the contribution! |
The current implementation always uses
/apias base path for all Payload routes. This will produce an invalid spec if the Payload config uses routes.api to customize the api route path. This PR fixes the issue and adds the possibility to customize it completely.