vocab-idl icon indicating copy to clipboard operation
vocab-idl copied to clipboard

How to handle root schemas that dont resolve to a data model

Open jonaslagoni opened this issue 4 years ago • 3 comments

Some root schemas might not resolve to a data model such as a "class" or enum, we need to define how we want to handle such simple types.

Example schemas:

{
  "type": "string"
}
{
  "type": "array",
  "items": { "type": "string" }
}

jonaslagoni avatar Oct 08 '21 11:10 jonaslagoni

Many language can handle this kind of thing without issue. In other languages you might need to a wrapper class of some kind to box the value.

jdesrosiers avatar Oct 13 '21 03:10 jdesrosiers

Now that I think about it, you are right many languages handle this thing without issue, and I am not even sure this is a case we need to handle or write a test for it.

Or do you think it is needed we define it? 🤔

jonaslagoni avatar Oct 17 '21 20:10 jonaslagoni

It's probably something we can leave up to implementations to figure out depending on what their target language supports.

jdesrosiers avatar Oct 18 '21 20:10 jdesrosiers