Skip to content

Instantly share code, notes, and snippets.

@naosim
Created February 11, 2024 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naosim/396f92ba897cd7985ac1f51fa30f0406 to your computer and use it in GitHub Desktop.
Save naosim/396f92ba897cd7985ac1f51fa30f0406 to your computer and use it in GitHub Desktop.
テーブル定義のためのJSON Schema
{
"type": "array",
"items": {
"$ref": "#/$defs/table"
},
"$defs": {
"table": {
"name": "table",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"columns": {
"type": "array",
"items": {
"$ref": "#/$defs/column"
}
}
},
"required": [
"name",
"columns"
]
},
"column": {
"name": "column",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"jpName": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"string",
"number"
],
"default": "string"
},
"pk": {
"type": "boolean",
"default": false
},
"index": {
"type": "boolean",
"default": false
},
"notNull": {
"type": "boolean",
"default": false
},
"note": {
"type": "string"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment