forked from stoplightio/json-schema-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsts.ts
27 lines (22 loc) · 823 Bytes
/
consts.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { SchemaCombinerName } from '@stoplight/json-schema-tree';
import { SpaceVals } from '@stoplight/mosaic';
import { Dictionary } from '@stoplight/types';
export const COMBINER_PRETTY_NAMES: Readonly<Dictionary<string, SchemaCombinerName>> = {
[SchemaCombinerName.AllOf]: 'and',
[SchemaCombinerName.AnyOf]: 'and/or',
[SchemaCombinerName.OneOf]: 'or',
};
export const COMMON_JSON_SCHEMA_AND_OAS_FORMATS = {
// strings are omitted because they are the default type to apply format to
number: ['byte', 'int32', 'int64', 'float', 'double'],
get integer() {
return this.number;
},
};
export const NESTING_OFFSET: SpaceVals = 3;
export const CARET_ICON_SIZE = 'sm';
export const COMBINER_NAME_MAP: Dictionary<string, SchemaCombinerName> = {
allOf: 'all of',
anyOf: 'any of',
oneOf: 'one of',
};