Add schema generator

This commit is contained in:
khai96_ 2020-05-09 19:24:07 +07:00
parent d44b8c5e53
commit bb24f595c2
6 changed files with 708 additions and 9 deletions

View file

@ -8,7 +8,7 @@ interface RunInstall {
readonly args?: readonly string[]
}
type RunInstallInput =
export type RunInstallInput =
| null
| boolean
| RunInstall

View file

@ -0,0 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/ksxnodeapps/ts-schema-autogen/master/packages/schemas/config.schema.json",
"instruction": {
"compilerOptions": {
"strict": true,
"esModuleInterop": true
},
"input": "index.ts",
"symbol": "RunInstallInput",
"output": "run-install-input.schema.json"
}
}

View file

@ -0,0 +1,39 @@
{
"anyOf": [
{
"$ref": "#/definitions/RunInstall"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/RunInstall"
}
},
{
"type": [
"null",
"boolean"
]
}
],
"definitions": {
"RunInstall": {
"type": "object",
"properties": {
"recursive": {
"type": "boolean"
},
"cwd": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}