tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Consider rules for specs

Open danielballan opened this issue 3 years ago • 2 comments

Some servers will want to impose restriction on specs, such as:

  1. Only specs for which we have a validator may be used. (The validator could be light, or even a no-op, but it must exist.)
  2. Every node written must have at least one spec.

This needs some careful consideration of a broad range of use cases. My initial reaction is that we may want to insist on (1) universally; i.e. all specs need to be registered with the server. But (2) is not tenable for use cases like tiled serve directory ... so that needs to be an optional configuration switch.


Summary of chat with @jmaruland

danielballan avatar Sep 02 '22 18:09 danielballan

Thinking on this for awhile, I lean toward:

  • Always enforce (1)
  • Provide a configurable boolean switch to opt in to (2).

danielballan avatar Sep 21 '22 13:09 danielballan

In #327 we enforced that each spec has to be declared, but having a validator is optional.

Still not sure if we should do anything with (2).

danielballan avatar Oct 15 '22 14:10 danielballan

in #383 we added a boolean switch for (2), reject_undeclared specs. By default, we are permissive, i.e. reject_undeclared_specs: false.

danielballan avatar Feb 04 '23 12:02 danielballan