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

Inconsistency between publishing geography and policy #1018

Open
d-koppenhagen opened this issue May 19, 2022 · 2 comments
Open

Inconsistency between publishing geography and policy #1018

d-koppenhagen opened this issue May 19, 2022 · 2 comments

Comments

@d-koppenhagen
Copy link

Currently there is an inconsistent behaviour between the geography and policy author APIs when publishing a policy/geography:

  • PUT for geography/geographies/{ID}/publish
  • POST for policy/policies/{ID}/publish

This behaviour should be unified.

@jschirrmacher
Copy link

Best would be, in my opinion, to have a route POST policy/policies/{ID}/versions (same for geographies, as you might have expected).

My reasons:

  • We create a new version of the resource identified by the ID in the path.
  • The versions of a resource are resources themselves.
  • Resources in REST paths are normally specified as plural.
  • The POST method is intended to create new resources.

However, to keep the change small, I would at least expect both services to use POST with .../publish. This might not quite be resource oriented (rather invoking a command, which is not REST, but RPC), but at least it is symmetric.

@avatarneil
Copy link

Cc. @janedotx

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

No branches or pull requests

3 participants