@takeshape/json-schema 11.143.2 → 11.154.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/dist/converters/index.d.ts +0 -1
- package/dist/converters/index.js +0 -1
- package/dist/converters/schema-converter.d.ts +0 -64
- package/dist/converters/schema-converter.js +0 -558
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/schema-validator.d.ts +0 -36
- package/dist/schema-validator.js +0 -207
- package/dist/utils/constants.d.ts +0 -3
- package/dist/utils/constants.js +0 -56
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.js +0 -4
- package/dist/utils/keys.d.ts +0 -5
- package/dist/utils/keys.js +0 -8
- package/dist/utils/references.d.ts +0 -145
- package/dist/utils/references.js +0 -113
- package/dist/utils/type-utils.d.ts +0 -18
- package/dist/utils/type-utils.js +0 -55
- package/dist/utils/types.d.ts +0 -76
- package/dist/utils/types.js +0 -1
package/dist/utils/types.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { JSONSchema7, JSONSchema7Definition, JSONSchema7Type, JSONSchema7TypeName } from 'json-schema';
|
|
2
|
-
import type { jsonSchema7PrimitiveTypes } from './constants.ts';
|
|
3
|
-
/**
|
|
4
|
-
* Add the discriminator property to JSONSchema7, which we make frequent use of.
|
|
5
|
-
*/
|
|
6
|
-
declare module 'json-schema' {
|
|
7
|
-
interface JSONSchema7 {
|
|
8
|
-
discriminator?: {
|
|
9
|
-
propertyName: string;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export type OneOfSchema = Omit<JSONSchema7, 'oneOf'> & {
|
|
14
|
-
oneOf: Exclude<JSONSchema7['oneOf'], undefined>;
|
|
15
|
-
};
|
|
16
|
-
export type AnyOfSchema = Omit<JSONSchema7, 'anyOf'> & {
|
|
17
|
-
anyOf: Exclude<JSONSchema7['anyOf'], undefined>;
|
|
18
|
-
};
|
|
19
|
-
export type AllOfSchema = Omit<JSONSchema7, 'allOf'> & {
|
|
20
|
-
allOf: Exclude<JSONSchema7['allOf'], undefined>;
|
|
21
|
-
};
|
|
22
|
-
export type ObjectSchema = Omit<JSONSchema7, 'type'> & {
|
|
23
|
-
type: 'object';
|
|
24
|
-
};
|
|
25
|
-
export type ObjectSchemaWithProperties = Omit<ObjectSchema, 'properties'> & {
|
|
26
|
-
properties: Exclude<JSONSchema7['properties'], undefined>;
|
|
27
|
-
};
|
|
28
|
-
export type ArraySchema = Omit<JSONSchema7, 'type'> & {
|
|
29
|
-
type: 'array';
|
|
30
|
-
};
|
|
31
|
-
export type ListSchema = Omit<ArraySchema, 'items'> & {
|
|
32
|
-
items: Exclude<JSONSchema7['items'], JSONSchema7Definition[] | undefined>;
|
|
33
|
-
};
|
|
34
|
-
export type TupleSchema = ArraySchema & {
|
|
35
|
-
items: Exclude<JSONSchema7['items'], JSONSchema7Definition | undefined>;
|
|
36
|
-
};
|
|
37
|
-
export type EnumSchema = Omit<JSONSchema7, 'enum'> & {
|
|
38
|
-
enum: Exclude<JSONSchema7['enum'], undefined>;
|
|
39
|
-
};
|
|
40
|
-
export type ConstSchema = Omit<JSONSchema7, 'const'> & {
|
|
41
|
-
const: Exclude<JSONSchema7['const'], undefined>;
|
|
42
|
-
};
|
|
43
|
-
export type RefSchema = Omit<JSONSchema7, '$ref'> & {
|
|
44
|
-
$ref: Exclude<JSONSchema7['$ref'], undefined>;
|
|
45
|
-
};
|
|
46
|
-
export type TypeUnionSchema = Omit<JSONSchema7, 'type'> & {
|
|
47
|
-
type: Exclude<JSONSchema7['type'], undefined | JSONSchema7TypeName>;
|
|
48
|
-
};
|
|
49
|
-
export type PrimitiveJSONSchema7TypeName = (typeof jsonSchema7PrimitiveTypes)[number];
|
|
50
|
-
export type PrimitiveSchema = Omit<JSONSchema7, 'type'> & {
|
|
51
|
-
type: PrimitiveJSONSchema7TypeName | PrimitiveJSONSchema7TypeName[] | undefined;
|
|
52
|
-
};
|
|
53
|
-
export type OpenAISchema = {
|
|
54
|
-
type?: JSONSchema7TypeName | JSONSchema7TypeName[];
|
|
55
|
-
enum?: JSONSchema7Type[];
|
|
56
|
-
const?: JSONSchema7Type;
|
|
57
|
-
$defs?: {
|
|
58
|
-
[key: string]: OpenAISchema;
|
|
59
|
-
};
|
|
60
|
-
properties?: {
|
|
61
|
-
[key: string]: OpenAISchema;
|
|
62
|
-
};
|
|
63
|
-
items?: OpenAISchema | OpenAISchema[];
|
|
64
|
-
anyOf?: OpenAISchema[];
|
|
65
|
-
additionalProperties?: false;
|
|
66
|
-
required?: string[];
|
|
67
|
-
title?: string;
|
|
68
|
-
description?: string;
|
|
69
|
-
$ref?: string;
|
|
70
|
-
};
|
|
71
|
-
export type OpenAIRootSchema = OpenAISchema & {
|
|
72
|
-
type: 'object';
|
|
73
|
-
properties: {
|
|
74
|
-
[key: string]: OpenAISchema;
|
|
75
|
-
};
|
|
76
|
-
};
|
package/dist/utils/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|