MobilityData / gbfs-json-schema

JSON Schema for GBFS feeds, managed by MobilityData. The versions are organized by folders. CC BY 4.0
Apache License 2.0
23 stars 24 forks source link

Incorrect schema for system_information.data.languages #89

Closed testower closed 1 year ago

testower commented 1 year ago

I noticed a problem with the generated java model. Given the following in system_information.data:

    "languages": {
      "description":
        "List of languages used in translated strings. Each element in the list must be of type Language.",
      "type": "array",
      "pattern": "^[a-z]{2,3}(-[A-Z]{2})?$"
    },

the generated type was simply List<Object>, while it should have been List<String>.

I belive this should be the correct schema:

    "languages": {
      "description":
        "List of languages used in translated strings. Each element in the list must be of type Language.",
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z]{2,3}(-[A-Z]{2})?$"
      }
    },