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

Ambiguity with GET and no included fields #8

Closed
philvarner opened this issue Apr 22, 2023 · 2 comments · Fixed by #12
Closed

Ambiguity with GET and no included fields #8

philvarner opened this issue Apr 22, 2023 · 2 comments · Fixed by #12
Assignees

Comments

@philvarner
Copy link
Contributor

philvarner commented Apr 22, 2023

The existing semantics were written with the POST JSON body format in mind, and have an ambiguity when using GET and query parameter fields.

Rules 3 & 4 state:

🥕 ~~~~~

If only exclude is specified, the specified fields should not be included, but every other field available for the Item should be included.

If exclude is specified and include is null or an empty array, then the exclude fields should be excluded from the default set.

🥕 ~~~~~

However, with GET, the non-existence of + or no prefixed fields could result in the semantics of starting with the full item or with the default fields.

@gadomski

@philvarner
Copy link
Contributor Author

I think the most reasonable thing here is to have GET with only excluded fields mean excluded from the default fields. In practice, clients should be explicitly stating the fields they want included and only excluding to ensure that possibly large default fields that arent' going to be included (e.g., geometry, assets)

@gadomski
Copy link
Member

I think the most reasonable thing here is to have GET with only excluded fields mean excluded from the default fields.

Makes sense to me.

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 a pull request may close this issue.

2 participants