core/source/logic/helpers/json_schema.ts

50 lines
629 B
TypeScript
Raw Normal View History

2023-06-18 23:29:57 +02:00
namespace _heimdall.helpers.json_schema
{
/**
*/
type type_type = (
"null"
|
"boolean"
|
"integer"
|
"float"
|
"string"
|
"array"
|
"object"
);
/**
*/
export type type_schema = {
type ?: (
type_type
|
Array<type_type>
);
additionalProperties ?: (
false
|
type_schema
);
properties ?: Record<string, type_schema>;
required ?: Array<string>;
description ?: string;
default ?: any;
minimum ?: int;
2023-06-19 13:05:17 +02:00
exclusiveMinimum ?: int;
2023-06-18 23:29:57 +02:00
maximum ?: int;
2023-06-19 13:05:17 +02:00
exclusiveMaximum ?: int;
2023-06-18 23:29:57 +02:00
enum ?: Array<any>;
items ?: type_schema;
anyOf ?: Array<type_schema>;
};
}