Unexpected json schema errors
Posted: Mon Jan 25, 2021 9:21 pm
Perhaps I'm just doing something invalid with json schema, but perhaps not. I have a StackOverflow question pending on this, if that's the issue.
I wanted to define an enum type in my schema, and also use that enum type in other types in the same schema. I noticed the following SO posting, which seemed to cover at least the definition part of this: https://stackoverflow.com/questions/377 ... son-schema .
So, I defined a schema, which this is an excerpt of:
On the line near the bottom of this, where I reference "costCategory_type", Oxygen gives me a syntax error, saying
I wanted to define an enum type in my schema, and also use that enum type in other types in the same schema. I noticed the following SO posting, which seemed to cover at least the definition part of this: https://stackoverflow.com/questions/377 ... son-schema .
So, I defined a schema, which this is an excerpt of:
Code: Select all
{
"$schema": "https://json-schema.org/draft/2019-09/schema#",
"type": "object",
"properties": {
"content": {"$ref": "#/definitions/content_type"}
},
"additionalProperties": false,
"definitions": {
"costCategory_type": {
"type": "object",
"enum": ["VH", "H", "M", "L"]
},
"allowedDevices_type": {
"type": "object",
"properties": {
"costCategory": {
"type": "costCategory_type"
},
What am I missing?#/definitions/allowedDevices_type/properties/costCategory/type: unknown type: [costCategory_type]