gs1 / EPCIS

Draft files being shared for EPCIS 2.0 development
Other
20 stars 7 forks source link

JSON Schema: Remove redundant allOf. #353

Closed sgpinkus closed 2 years ago

mgh128 commented 2 years ago

Hi @jmcanterafonseca-iota - could you please take a look at this? Since EPCIS-JSON-Schema.json is being generated by your script at https://github.com/gs1/EPCIS/blob/master/JSON-Schema/inline-schema.js I'm wondering whether this needs some slight adjustment to remove the redundant allOf noted here?

sgpinkus commented 2 years ago

FYI, relatedly, on closer inspection there is also a lot of overly verbose definitions like this:

            {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "pattern": "^DELETE$"
                }
              }
            }

Which could be written:

            {
              "properties": {
                "action": { "const": "DELETE" }
            }