AMWA-TV / is-13

AMWA IS-13 NMOS Annotation Specification [Work In Progress]
https://specs.amwa.tv/is-13
Apache License 2.0
1 stars 1 forks source link

Allow all tags to be reset in one operation? #12

Closed garethsb closed 1 year ago

garethsb commented 1 year ago

Should it be possible to remove/reset to default all tags on a resource in one request?

PATCH /self

{
  "tags": null
}

This would need to succeed even when the resource has one or more read-only tags and leave them unchanged. This begs the question about whether a request like the following should succeed (and leave the value(s) unchanged) or fail?

PATCH /self

{
  "tags": {
    "read-only-tag": null
  }
}

Thoughts?


FWIW, I think it's clear that a request to actually change the value(s) associated with a read-only tag must fail with 500 response.

PATCH /self

{
  "tags": {
    "read-only-tag": [...]
  }
}

Compare behaviour with read/write tags...

  1. Replace the value(s)

    PATCH /self

    {
     "tags": {
       "read-write-tag": [...]
     }
    }
  2. Remove the tag or reset to its default/underlying value(s)

    PATCH /self

    {
     "tags": {
       "read-write-tag": null
     }
    }
garethsb commented 1 year ago

This has the advantage of making a sensible looking "reset all request":

{
    "description": null,
    "label": null,
    "tags": null
}