json-schema-org / vocab-idl

Help and clarify how JSON Schema can be interpreted from validation rules to data definition. This extends to how those data definitions can be represented in any programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Define how properties with tuples can be interpreted

jonaslagoni opened this issue · comments

We need to define how properties with tuples should be interpreted, such as for the following schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/idl-schema",
  "name": "SomeTitle",
  "type": "object",
  "properties": {
    "ArrayProperty": {
      "type": "array",
       "prefixItems": { "type": "string" },
       "items": false
    }
  }
}

As most languages, dont support a native tuple type, should we expect an external class to be created? 🤔

should we expect an external class to be created?

Yes. It could be either a one-off class specifically for that type or a generic tuple class(s) that can be reused for any tuples. I'd prefer the later.