xregistry / spec

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

Is ?nested too complex? #132

Open duglin opened 2 months ago

duglin commented 2 months ago

Today we require the use of the ?nested query parameter on a write operation request to indicate whether or not the server should process any nested collection. This was done to allow for someone to do a GET + ?inline followed by a PUT w/o fear of updating nested collections by mistake. However, is this "are you sure?" type of flag necessary? Are we being too pedantic? Should we just delete the flag and require people to be smart about what they send on the write request and either remove the nested collection first, or suggest they use a non-inline GET to retrieve the data in the first place?

Or, is the ?nested flag going to save a ton of people from making a serious mistake?

duglin commented 1 month ago

Jon suggested to invert things a bit... require a flag when nested collections are present and generate an error when nested collections are present w/o the flag. This will mean we don't silently ignore data provided by the user, but can still have the "are you sure?" semantics... assuming we want to keep that.