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

Define Default behavior if parameters are not there. #54

Closed
joanma747 opened this issue Feb 19, 2021 · 2 comments
Closed

Define Default behavior if parameters are not there. #54

joanma747 opened this issue Feb 19, 2021 · 2 comments

Comments

@joanma747
Copy link
Collaborator

One rule that we are trying to use in defining APIs is that almost all parameters are optional and that there are default behavour for the lack of them

@pvretano
Copy link

I would word it slightly differently which is to say that there should be a default response at each endpoint. For example, features at /collection/{collectionId}/items without any parameters returns N features (based on the default value of the limit parameter). This is equivalent to saying that there should be a default value for each parameter but it is slightly different since some parameters may not have defaults defined in the specification.

Also, each response should include a minimum set of links that allow navigation to other parts of the API (e.g. links to the next/prev, link to landing page, link to source collection, alt links, etc.).

@joanma747
Copy link
Collaborator Author

New principle: Make default behaviors explicit
If you have a default behaviors ... It should be specified explicitly.

securedimensions added a commit that referenced this issue Mar 5, 2021
This update includes resolution of the issues #54 and #61.
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