Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop + from hal+json and hal+xml for routing file extension. #14972

Merged
merged 1 commit into from Sep 10, 2020
Merged

Drop + from hal+json and hal+xml for routing file extension. #14972

merged 1 commit into from Sep 10, 2020

Conversation

cnizzardini
Copy link
Contributor

Drop + from hal+json and hal+xml for routing file extension. If a user wants to enable routing by extension, then I think having the plus in there is quite odd. In the absence of a standard on this I think this is fair.

See original PR #14867

@ADmad
Copy link
Member

ADmad commented Sep 10, 2020

Are such URL extensions normally used? I would expect the URL to be .json/.xml only.

@cnizzardini
Copy link
Contributor Author

Its unlikely, but I don't see the harm in providing the option.

@ADmad
Copy link
Member

ADmad commented Sep 10, 2020

Well adding things which aren't normally used increases unnecessary bloat.

@othercorey
Copy link
Member

I am ok with this since it looks like other types. Is there any code or framework that actually uses hal that we could ask about this for consistency? Someone else must be using this as a standard over us. Can we ask the owner of the type in the spec?

@cnizzardini
Copy link
Contributor Author

Not to my knowledge, symfony api platform does allow routes by .jsonld in their demo here https://demo.api-platform.com/, but when I try with .haljson its a no-go.

@cnizzardini
Copy link
Contributor Author

We're decreasing bloat by removing two characters ;-)

@markstory markstory added this to the 4.2.0 milestone Sep 10, 2020
@markstory markstory merged commit e763271 into cakephp:4.next Sep 10, 2020
@markstory
Copy link
Member

Having the + makes URL generation tricky as + also overlaps with the URL encoded space.

@cnizzardini cnizzardini deleted the 4.next-hal-extension branch September 11, 2020 03:34
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.

None yet

4 participants