Unexpected json schema errors
Oxygen general issues.
-
- Posts: 4
- Joined: Mon Jan 25, 2021 8:28 pm
Unexpected json schema errors
Post by davidmichaelkarr »
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]
-
- Posts: 4
- Joined: Mon Jan 25, 2021 8:28 pm
Re: Unexpected json schema errors
Post by davidmichaelkarr »
I got an answer on StackOverflow. I have to make them type "string" and use the "$ref" and "#/definitions/..." syntax.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service