Skip to content

Conversation

@jay-low
Copy link
Contributor

@jay-low jay-low commented Dec 27, 2025

Q A
Branch? main
Tickets Closes #390
License MIT

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.

Copilot AI review requested due to automatic review settings December 27, 2025 15:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 <[email protected]>
@soyuka soyuka merged commit 1ed1f14 into api-platform:main Dec 27, 2025
0 of 2 checks passed
@soyuka
Copy link
Member

soyuka commented Dec 27, 2025

thanks!

@jay-low jay-low deleted the fix/default-empty-hydra-prefix branch December 28, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generator incompatible with current api-platform template

2 participants