mapcomplete/UI/Studio/jsonSchema.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
462 B
TypeScript
Raw Normal View History

2023-06-16 02:36:11 +02:00
/**
* Extracts the data from the scheme file and writes them in a flatter structure
*/
export type JsonSchemaType =
| string
2023-06-21 22:42:26 +02:00
| { $ref: string; description?: string }
2023-06-16 02:36:11 +02:00
| { type: string }
| JsonSchemaType[]
export interface JsonSchema {
description?: string
type?: JsonSchemaType
properties?: any
items?: JsonSchema
allOf?: JsonSchema[]
anyOf: JsonSchema[]
enum: JsonSchema[]
$ref: string
required: string[]
}