sdmx-twg / sdmx-json

This repository is used for maintaining the SDMX-JSON message specifications.
54 stars 20 forks source link

JSON Schema V2: Is the Local Representation definition correct? #169

Open lazarpr opened 1 week ago

lazarpr commented 1 week ago

I am tying to validate a MetadataStructureDefinition JSON file against the schema and it is failing. This is a snippet of my JSON file:

"metadataStructureComponents":{
  "metadataAttributeList":{
    "id":"MetadataAttributeDescriptor",
      "metadataAttributes":[
        {
        "isPresentational":false,
        "minOccurs":1,
        "maxOccurs":1,
        "links":[
          {
            "rel":"self",
            "type":"metadataattribute",
            "uri":"https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/2.0.0/sdmx-json-structure-schema.json",
            "urn":"urn:sdmx:org.sdmx.infomodel.metadatastructure.MetadataAttribute=ACY:MSD1(1.1).COUNTRY"
          }
        ],
        "id":"COUNTRY",
        "localRepresentation":{
          "textFormat":{
              "maxLength":10,
              "minLength":5,
              "textType":"Integer"
          }
        },

I don't think there is an issue with the localRepresentation section, but the schema validator complains about it. The error is that either "format" or "enumeration" should be present. However the SDMX-ML schema defines "format" as "textFormat"

Also may a localRepresentaton by defined as an empty element ? i.e. is the following permitted:

"localRepresentation":{ }