OAI / Overlay-Specification

The OAI Overlay Specification
Apache License 2.0
60 stars 15 forks source link

feat: add JSON Schema 2020-12 schemas #72

Closed jeremyfiel closed 2 weeks ago

jeremyfiel commented 1 month ago

closes #71

ralfhandl commented 1 month ago

Hi @jeremyfiel,

Thanks for contributing this!

We don't have the infrastructure in place for testing and publishing schemas, so I'll convert this PR to draft until we are ready.

jeremyfiel commented 1 month ago

Per #77 updated the schema to include a validation check for action-object.

If the target selects an object node, the value of this field MUST be an object with the properties and values to merge with the selected node.


Because an array update can be of type: any, I did not include an additional validation check for that scenario outlined as a MUST.

If the target selects an array, the value of this field MUST be an entry to append to the array.

rethinking this, I don't think this is possible to enforce from the schema because the target value will always be a string. There's no way to interpret the resolved value in the schema. This is a requirement for tooling, only.

jeremyfiel commented 1 month ago

related #86

ralfhandl commented 2 weeks ago

@jeremyfiel Can this PR be closed in favor of #94?

And do you want to include the README.mdin #94?

jeremyfiel commented 2 weeks ago

@jeremyfiel Can this PR be closed in favor of #94?

And do you want to include the README.mdin #94?

yes, can be closed and readme ported over.