specification icon indicating copy to clipboard operation
specification copied to clipboard

feat: allow a mix of tools of type `components` and `services`

Open mrutkows opened this issue 2 years ago • 1 comments

Going line-by-line through the v1.5 schema and see the following use of the

oneOf

constraint (i.e., “is valid if exactly one of the sub-schemas is valid”)…

"tools": {
  "oneOf":
    "properties": {
      "components": {
        ...
      },
      "services": {
        ...
      }
    }

However, if my tooling is a hybrid of both “components” and “services” the anyOf constraint (i.e. “valid if at least one of the sub-schemas is valid”) would make more sense and not restrict me to either just "components" or "services"?

This especially makes sense where “tools” is reused for many purposes, such as CI/CD in workflows… where it is almost always hybrid.

Spec. Ref: https://json-schema.org/understanding-json-schema/reference/combining.html

mrutkows avatar Jul 26 '23 17:07 mrutkows

this allso would affect the XML - where it is a choice - the equivalent of a oneOf

you are right, current XML and current JSON schema define tools as either a set of component or service.

changing the schema to allow a mixture of both would be a non-breaking change, i think.

jkowalleck avatar Jul 26 '23 18:07 jkowalleck