fix(hydra): use empty default prefix instead of 'hydra:'#392
Merged
soyuka merged 2 commits intoapi-platform:mainfrom Dec 27, 2025
Merged
fix(hydra): use empty default prefix instead of 'hydra:'#392soyuka merged 2 commits intoapi-platform:mainfrom
soyuka merged 2 commits intoapi-platform:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the default Hydra prefix from "hydra:" to an empty string (""), aligning with API Platform v4+ defaults which omit the Hydra prefix. The change is backward-compatible through the existing -p option for users who need the prefixed behavior.
- Updated default hydraPrefix value from "hydra:" to "" in the CLI option definition
- Updated all generator tests to reflect the new empty string default
- Added documentation explaining how to use a custom prefix when needed
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/index.js | Changed the default value for the --hydra-prefix option from "hydra:" to "" |
| src/generators/VuetifyGenerator.test.js | Updated test to use empty hydraPrefix default |
| src/generators/VueGenerator.test.js | Updated test to use empty hydraPrefix default |
| src/generators/ReactNativeGenerator.test.js | Updated test to use empty hydraPrefix default |
| src/generators/ReactGenerator.test.js | Updated test to use empty hydraPrefix default |
| src/generators/QuasarGenerator.test.js | Updated test to use empty hydraPrefix default |
| src/generators/NuxtGenerator.test.js | Updated test to use empty hydraPrefix default |
| src/generators/NextGenerator.test.js | Updated test to use empty hydraPrefix default |
| README.md | Added hint explaining how to customize the Hydra prefix using the CLI option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
thanks! |
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.
Api Platform (v4+) omits the hydra: prefix by default.
This PR aligns create-client with current Api Platform defaults by using an empty hydraPrefix by default.
A note was added to README.md explaining that a custom prefix can still be provided via the -p option for projects that rely on prefixed Hydra properties.