xregistry / spec

xRegistry related specifications
https://xRegistry.io
Apache License 2.0
35 stars 6 forks source link

Is ?inline too overloaded? #126

Closed duglin closed 4 months ago

duglin commented 5 months ago

Today the ?inline query parameter can be used to mean that the client wants nested resources to be included in the response of a GET, and it can be used by a client to indicate that they want the nested resources present in the PUT/POST/PATCH request to be processed and not ignored. So, there's some consistency here.

Note that ?inline on a PUT/POST/PATCH does not influence the response - the response (as of today) MUST NOT include any nested resources. So while ?inline is used on write operations for "input processing", it is ignored for the "response processing" side of those write operations.

Is this ok? The consistency is nice, but is it too restrictive in that it precludes us from ever allowing a PUT response to be influenced by the ?inline semantics? Meaning, are we sure that we'll never want to extend the spec to support something like:

PUT /GROUPs ? inputInline & outputInline=*    + body=map of groups + nested resources

or something a little less verbose:

PUT /GROUPs ? nested & inline=* 
PUT /GROUPs ? nesting & inline=* 
PUT /GROUPs ? children & inline=* 
PUT /GROUPs ? collections & inline=* 
duglin commented 5 months ago

in general, I think splitting these into two distinct flags so we can control the input vs output processing independently would be a good thing

duglin commented 4 months ago

Manuel: nested - I'm giving you a nested resource

for now split into two words - decide for sure what the words are later (for now use "nested")