We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oneOf
` % cat test-schemas.js ✭ module.exports = { oneOf: [ { description: "add category", type: "object", properties: { key: { description: "category", type: "string", enum: ["category"] }, value: { type: ["object"], required: ["name"], properties: { name: { description: "name", type: "string", maxLength: 20 }, isHidden: { description: "hiddend?", type: "string", enum: ["yes", "no"], defaultValue: "no" } } } }, required: ["key", "value"], additionalProperties: false }, { description: "add tag", type: "object", properties: { key: { description: "category", type: "string", enum: ["tag"] }, value: { type: "array", maxItems: 20, items: { description: "name of tag", type: "string", maxLength: 10 } } }, required: ["key", "value"], additionalProperties: false } ] }; [redstone@RedstoneZhaodeMacBook-Pro:~/data/github/mingpian/domain on master] % node ✭
parse = require('json-schema-to-markdown') [Function] schema = require('./test-schemas'); { oneOf: [ { description: 'add category', type: 'object', properties: [Object], required: [Array], additionalProperties: false }, { description: 'add tag', type: 'object', properties: [Object], required: [Array], additionalProperties: false } ] } console.log(parse(schema));
The object must be one of the following types:
undefined
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`
% cat test-schemas.js ✭
module.exports = {
oneOf: [
{
description: "add category",
type: "object",
properties: {
key: {
description: "category",
type: "string",
enum: ["category"]
},
value: {
type: ["object"],
required: ["name"],
properties: {
name: {
description: "name",
type: "string",
maxLength: 20
},
isHidden: {
description: "hiddend?",
type: "string",
enum: ["yes", "no"],
defaultValue: "no"
}
}
}
},
required: ["key", "value"],
additionalProperties: false
},
{
description: "add tag",
type: "object",
properties: {
key: {
description: "category",
type: "string",
enum: ["tag"]
},
value: {
type: "array",
maxItems: 20,
items: {
description: "name of tag",
type: "string",
maxLength: 10
}
}
},
required: ["key", "value"],
additionalProperties: false
}
]
};
[redstone@RedstoneZhaodeMacBook-Pro:~/data/github/mingpian/domain on master]
% node ✭
The object must be one of the following types:
undefined
undefined
`
The text was updated successfully, but these errors were encountered: