-
Notifications
You must be signed in to change notification settings - Fork 74
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
CMS API: Drop support for XML requests #3255
CMS API: Drop support for XML requests #3255
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some endpoints in your list that don't exist AFAIK:
Verb | Path | Action |
---|---|---|
GET | /admin/api/cms/sections/new | admin/api/cms/sections#new |
GET | /admin/api/cms/sections/:id/edit | admin/api/cms/sections#edit |
GET | /admin/api/cms/files/new | admin/api/cms/files#new |
GET | /admin/api/cms/files/:id/edit | admin/api/cms/files#edit |
Are those routes valid and working? because there's no action in the controllers for them.
Also, I didn't even know this one existed:
Verb | Path | Action |
---|---|---|
GET | /admin/api/cms/sections/:section_id/files | admin/api/cms/files#index |
I think we should remove it, if we provide sections/:section_id/files
we should also provide sections/:section_id/sections
and sections/:section_id/templates
. And we have an issue (THREESCALE-9191) to filter results by any parameter, so the client will be able to retrieve the same results by filtering by section_id
.
Yep... Those are "new" and "edit" endpoints that come from the "resources" Rails routes helper. Those don't really make sense for an API.
Agreed! Since those changes go out of the scope of the PR, I opened #3266 to remove the endpoints you mentioned @jlledom ✌️ |
What this PR does / why we need it:
This PR removes support for
XML
format requests from all CMS endpoints. It also makesJSON
the standard request format for the CMS API.Which issue(s) this PR fixes
THREESCALE-9433
Verification steps
The following endpoints should only respond to
JSON
requests. Any other format should return a406
status.Special notes for your reviewer: