Skip to content

Instantly share code, notes, and snippets.

@cheerfyt
Last active May 24, 2023 03:42
Show Gist options
  • Save cheerfyt/3323f6832674c6168b950b40917f0a1b to your computer and use it in GitHub Desktop.
Save cheerfyt/3323f6832674c6168b950b40917f0a1b to your computer and use it in GitHub Desktop.
schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"default": {
"id": "",
"name": "",
"description": "",
"priority": 1
},
"title": "NuanYun cloud python subject schema",
"required": [
"id",
"name",
"surface",
"chapters"
],
"properties": {
"id": {
"type": "string",
"default": "",
"title": "The id Schema",
"examples": [
"xxxxx"
]
},
"name": {
"type": "string",
"default": "",
"title": "The name Schema",
"examples": [
"xxx"
]
},
"description": {
"type": "string",
"default": "",
"title": "The description of subject",
"examples": [
"xxxx"
]
},
"priority": {
"type": "integer",
"default": 0,
"title": "The priority property",
"examples": [
1
]
},
"surface": {
"type": "string",
"default": "",
"title": "The surface of subject",
"examples": [
"https://www.baidu.com/test.png"
]
},
"programeLang": {
"type": "string",
"default": "",
"title": "The programeLang of subject",
"examples": [
"python"
]
},
"chapters": {
"type": "array",
"default": [],
"title": "The chapters of subject",
"items": {
"type": "object",
"default": {},
"title": "A Schema",
"required": [
"id",
"title",
"description",
"priority",
"content"
],
"properties": {
"id": {
"type": "string",
"default": "",
"title": "The id Schema",
"examples": [
"xxx"
]
},
"title": {
"type": "string",
"default": "",
"title": "The title Schema",
"examples": [
""
]
},
"description": {
"type": "string",
"default": "",
"title": "The description Schema",
"examples": [
""
]
},
"priority": {
"type": "integer",
"default": 0,
"title": "The priority Schema",
"examples": [
0
]
},
"draft": {
"type": "integer",
"default": 0,
"title": "The draft Schema",
"examples": [
1
]
},
"initCode": {
"type": "string",
"default": "",
"title": "The initCode Schema",
"examples": [
""
]
},
"content": {
"type": "string",
"default": "",
"title": "The content Schema",
"examples": [
""
]
}
},
"examples": [{
"id": "xxx",
"title": "",
"description": "",
"priority": 0,
"draft": 1,
"initCode": "",
"content": ""
}]
},
"examples": [
[{
"id": "xxx",
"title": "",
"description": "",
"priority": 0,
"draft": 1,
"initCode": "",
"content": ""
}]
]
}
},
"examples": [{
"id": "xxxxx",
"name": "xxx",
"description": "xxxx",
"priority": 1,
"surface": "https://www.baidu.com",
"programeLang": "python",
"chapters": [{
"id": "xxx",
"title": "",
"description": "",
"priority": 0,
"draft": 1,
"initCode": "",
"content": ""
}]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment