Support Payload api route config#77
Open
mzronek wants to merge 4 commits into
Open
Conversation
…operation base paths
Owner
… hardcoding /api, add another test to check if the payload api route config works
…ches due to previously missing zed config
Author
|
@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. |
janbuchar
reviewed
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.