MapComplete/UI/Studio/jsonSchema.ts
Pieter Vander Vennet 7064d84fbd Studio: fix tests
2023-06-21 22:42:26 +02:00

20 lines
462 B
TypeScript

/**
* Extracts the data from the scheme file and writes them in a flatter structure
*/
export type JsonSchemaType =
| string
| { $ref: string; description?: string }
| { type: string }
| JsonSchemaType[]
export interface JsonSchema {
description?: string
type?: JsonSchemaType
properties?: any
items?: JsonSchema
allOf?: JsonSchema[]
anyOf: JsonSchema[]
enum: JsonSchema[]
$ref: string
required: string[]
}