@alpic-ai/api 0.0.0-staging.g253d597 → 0.0.0-staging.g258815e
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/dist/index.d.mts +1300 -897
- package/dist/index.mjs +1889 -41
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AnyContractProcedure, AnySchema, ContractProcedureDef, ErrorMap, ErrorMapItem, InferContractRouterInputs, InferContractRouterOutputs, InferSchemaInput, Meta, OpenAPI } from "@orpc/contract";
|
|
3
|
-
//#region ../domains/src/intents/schemas.d.ts
|
|
4
3
|
export declare const intentCategoryColorSchema: z.ZodEnum<{
|
|
5
4
|
red: "red";
|
|
6
5
|
orange: "orange";
|
|
@@ -13,8 +12,6 @@ export declare const intentCategoryColorSchema: z.ZodEnum<{
|
|
|
13
12
|
}>;
|
|
14
13
|
type IntentCategoryColor = z.infer<typeof intentCategoryColorSchema>;
|
|
15
14
|
export declare const INTENT_CATEGORY_COLORS: ("red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "gray")[];
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region ../domains/src/platforms/schemas.d.ts
|
|
18
15
|
export declare const AI_PLATFORMS: readonly ["chatgpt", "claudeai"];
|
|
19
16
|
declare const platformSchema: z.ZodEnum<{
|
|
20
17
|
chatgpt: "chatgpt";
|
|
@@ -22,21 +19,19 @@ declare const platformSchema: z.ZodEnum<{
|
|
|
22
19
|
}>;
|
|
23
20
|
type Platform = z.infer<typeof platformSchema>;
|
|
24
21
|
export declare const PLATFORM_LABELS: Record<Platform, string>;
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region ../domains/src/projects/schemas.d.ts
|
|
27
22
|
export declare const runtimeSchema: z.ZodEnum<{
|
|
28
23
|
"python3.13": "python3.13";
|
|
29
24
|
"python3.14": "python3.14";
|
|
25
|
+
"python3.15": "python3.15";
|
|
30
26
|
node22: "node22";
|
|
31
27
|
node24: "node24";
|
|
28
|
+
node26: "node26";
|
|
32
29
|
}>;
|
|
33
30
|
export declare const transportSchema: z.ZodEnum<{
|
|
34
31
|
stdio: "stdio";
|
|
35
32
|
sse: "sse";
|
|
36
33
|
streamablehttp: "streamablehttp";
|
|
37
34
|
}>;
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region ../domains/src/submissions/schemas.d.ts
|
|
40
35
|
declare const claudeSubmissionSchemaInternal: z.ZodObject<{
|
|
41
36
|
id: z.ZodString;
|
|
42
37
|
environmentId: z.ZodString;
|
|
@@ -1382,8 +1377,17 @@ declare const chatgptSubmissionSchemaInternal: z.ZodObject<{
|
|
|
1382
1377
|
type ClaudeSubmission = z.infer<typeof claudeSubmissionSchemaInternal>;
|
|
1383
1378
|
type ChatgptSubmission = z.infer<typeof chatgptSubmissionSchemaInternal>;
|
|
1384
1379
|
type Submission = ClaudeSubmission | ChatgptSubmission;
|
|
1385
|
-
|
|
1386
|
-
|
|
1380
|
+
export declare const TELEMETRY_SIGNALS: readonly ["logs", "metrics", "traces"];
|
|
1381
|
+
export declare const telemetrySignalSchema: z.ZodEnum<{
|
|
1382
|
+
logs: "logs";
|
|
1383
|
+
metrics: "metrics";
|
|
1384
|
+
traces: "traces";
|
|
1385
|
+
}>;
|
|
1386
|
+
export declare const OTLP_PROTOCOLS: readonly ["http/protobuf", "http/json"];
|
|
1387
|
+
export declare const otlpProtocolSchema: z.ZodEnum<{
|
|
1388
|
+
"http/protobuf": "http/protobuf";
|
|
1389
|
+
"http/json": "http/json";
|
|
1390
|
+
}>;
|
|
1387
1391
|
export type ApiContext = {
|
|
1388
1392
|
request: Request & {
|
|
1389
1393
|
teamIds: string[];
|
|
@@ -2346,8 +2350,8 @@ export declare const contract: {
|
|
|
2346
2350
|
environmentId: z.ZodString;
|
|
2347
2351
|
content: z.ZodString;
|
|
2348
2352
|
source: z.ZodEnum<{
|
|
2349
|
-
model: "model";
|
|
2350
2353
|
user: "user";
|
|
2354
|
+
model: "model";
|
|
2351
2355
|
}>;
|
|
2352
2356
|
clientName: z.ZodNullable<z.ZodString>;
|
|
2353
2357
|
clientId: z.ZodNullable<z.ZodString>;
|
|
@@ -2675,6 +2679,206 @@ export declare const contract: {
|
|
|
2675
2679
|
}>, Record<never, never>>;
|
|
2676
2680
|
};
|
|
2677
2681
|
};
|
|
2682
|
+
telemetryDestinations: {
|
|
2683
|
+
list: {
|
|
2684
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2685
|
+
environmentId: z.ZodString;
|
|
2686
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
2687
|
+
id: z.ZodString;
|
|
2688
|
+
signal: z.ZodEnum<{
|
|
2689
|
+
logs: "logs";
|
|
2690
|
+
metrics: "metrics";
|
|
2691
|
+
traces: "traces";
|
|
2692
|
+
}>;
|
|
2693
|
+
endpoint: z.ZodString;
|
|
2694
|
+
protocol: z.ZodEnum<{
|
|
2695
|
+
"http/protobuf": "http/protobuf";
|
|
2696
|
+
"http/json": "http/json";
|
|
2697
|
+
}>;
|
|
2698
|
+
headers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2699
|
+
id: z.ZodString;
|
|
2700
|
+
name: z.ZodString;
|
|
2701
|
+
value: z.ZodNull;
|
|
2702
|
+
isSecret: z.ZodLiteral<true>;
|
|
2703
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2704
|
+
id: z.ZodString;
|
|
2705
|
+
name: z.ZodString;
|
|
2706
|
+
value: z.ZodString;
|
|
2707
|
+
isSecret: z.ZodLiteral<false>;
|
|
2708
|
+
}, z.core.$strip>], "isSecret">>;
|
|
2709
|
+
status: z.ZodEnum<{
|
|
2710
|
+
active: "active";
|
|
2711
|
+
suspended: "suspended";
|
|
2712
|
+
}>;
|
|
2713
|
+
lastFailureReason: z.ZodNullable<z.ZodEnum<{
|
|
2714
|
+
credentials: "credentials";
|
|
2715
|
+
"wrong-path": "wrong-path";
|
|
2716
|
+
"wrong-protocol": "wrong-protocol";
|
|
2717
|
+
"invalid-payload": "invalid-payload";
|
|
2718
|
+
"partial-rejection": "partial-rejection";
|
|
2719
|
+
"blocked-target": "blocked-target";
|
|
2720
|
+
timeout: "timeout";
|
|
2721
|
+
unreachable: "unreachable";
|
|
2722
|
+
"receiver-error": "receiver-error";
|
|
2723
|
+
"unexpected-status": "unexpected-status";
|
|
2724
|
+
}>>;
|
|
2725
|
+
isScopedToIntentionalRequestsOnly: z.ZodBoolean;
|
|
2726
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2727
|
+
BAD_REQUEST: {};
|
|
2728
|
+
}>, {
|
|
2729
|
+
NOT_FOUND: {};
|
|
2730
|
+
}>, Record<never, never>>;
|
|
2731
|
+
};
|
|
2732
|
+
create: {
|
|
2733
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2734
|
+
environmentId: z.ZodString;
|
|
2735
|
+
signal: z.ZodEnum<{
|
|
2736
|
+
logs: "logs";
|
|
2737
|
+
metrics: "metrics";
|
|
2738
|
+
traces: "traces";
|
|
2739
|
+
}>;
|
|
2740
|
+
endpoint: z.ZodString;
|
|
2741
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
2742
|
+
"http/protobuf": "http/protobuf";
|
|
2743
|
+
"http/json": "http/json";
|
|
2744
|
+
}>>;
|
|
2745
|
+
isScopedToIntentionalRequestsOnly: z.ZodDefault<z.ZodBoolean>;
|
|
2746
|
+
headers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2747
|
+
name: z.ZodString;
|
|
2748
|
+
value: z.ZodString;
|
|
2749
|
+
isSecret: z.ZodBoolean;
|
|
2750
|
+
}, z.core.$strip>>>;
|
|
2751
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2752
|
+
id: z.ZodString;
|
|
2753
|
+
signal: z.ZodEnum<{
|
|
2754
|
+
logs: "logs";
|
|
2755
|
+
metrics: "metrics";
|
|
2756
|
+
traces: "traces";
|
|
2757
|
+
}>;
|
|
2758
|
+
endpoint: z.ZodString;
|
|
2759
|
+
protocol: z.ZodEnum<{
|
|
2760
|
+
"http/protobuf": "http/protobuf";
|
|
2761
|
+
"http/json": "http/json";
|
|
2762
|
+
}>;
|
|
2763
|
+
headers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2764
|
+
id: z.ZodString;
|
|
2765
|
+
name: z.ZodString;
|
|
2766
|
+
value: z.ZodNull;
|
|
2767
|
+
isSecret: z.ZodLiteral<true>;
|
|
2768
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2769
|
+
id: z.ZodString;
|
|
2770
|
+
name: z.ZodString;
|
|
2771
|
+
value: z.ZodString;
|
|
2772
|
+
isSecret: z.ZodLiteral<false>;
|
|
2773
|
+
}, z.core.$strip>], "isSecret">>;
|
|
2774
|
+
status: z.ZodEnum<{
|
|
2775
|
+
active: "active";
|
|
2776
|
+
suspended: "suspended";
|
|
2777
|
+
}>;
|
|
2778
|
+
lastFailureReason: z.ZodNullable<z.ZodEnum<{
|
|
2779
|
+
credentials: "credentials";
|
|
2780
|
+
"wrong-path": "wrong-path";
|
|
2781
|
+
"wrong-protocol": "wrong-protocol";
|
|
2782
|
+
"invalid-payload": "invalid-payload";
|
|
2783
|
+
"partial-rejection": "partial-rejection";
|
|
2784
|
+
"blocked-target": "blocked-target";
|
|
2785
|
+
timeout: "timeout";
|
|
2786
|
+
unreachable: "unreachable";
|
|
2787
|
+
"receiver-error": "receiver-error";
|
|
2788
|
+
"unexpected-status": "unexpected-status";
|
|
2789
|
+
}>>;
|
|
2790
|
+
isScopedToIntentionalRequestsOnly: z.ZodBoolean;
|
|
2791
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2792
|
+
BAD_REQUEST: {};
|
|
2793
|
+
}>, {
|
|
2794
|
+
NOT_FOUND: {};
|
|
2795
|
+
FORBIDDEN: {};
|
|
2796
|
+
OTLP_DESTINATION_UNVERIFIED: {
|
|
2797
|
+
status: number;
|
|
2798
|
+
};
|
|
2799
|
+
INTERNAL_SERVER_ERROR: {};
|
|
2800
|
+
}>, Record<never, never>>;
|
|
2801
|
+
};
|
|
2802
|
+
update: {
|
|
2803
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2804
|
+
environmentId: z.ZodString;
|
|
2805
|
+
destinationId: z.ZodString;
|
|
2806
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
2807
|
+
protocol: z.ZodOptional<z.ZodEnum<{
|
|
2808
|
+
"http/protobuf": "http/protobuf";
|
|
2809
|
+
"http/json": "http/json";
|
|
2810
|
+
}>>;
|
|
2811
|
+
isScopedToIntentionalRequestsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
2812
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2813
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2814
|
+
name: z.ZodString;
|
|
2815
|
+
value: z.ZodOptional<z.ZodString>;
|
|
2816
|
+
isSecret: z.ZodBoolean;
|
|
2817
|
+
}, z.core.$strip>>>;
|
|
2818
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2819
|
+
id: z.ZodString;
|
|
2820
|
+
signal: z.ZodEnum<{
|
|
2821
|
+
logs: "logs";
|
|
2822
|
+
metrics: "metrics";
|
|
2823
|
+
traces: "traces";
|
|
2824
|
+
}>;
|
|
2825
|
+
endpoint: z.ZodString;
|
|
2826
|
+
protocol: z.ZodEnum<{
|
|
2827
|
+
"http/protobuf": "http/protobuf";
|
|
2828
|
+
"http/json": "http/json";
|
|
2829
|
+
}>;
|
|
2830
|
+
headers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2831
|
+
id: z.ZodString;
|
|
2832
|
+
name: z.ZodString;
|
|
2833
|
+
value: z.ZodNull;
|
|
2834
|
+
isSecret: z.ZodLiteral<true>;
|
|
2835
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2836
|
+
id: z.ZodString;
|
|
2837
|
+
name: z.ZodString;
|
|
2838
|
+
value: z.ZodString;
|
|
2839
|
+
isSecret: z.ZodLiteral<false>;
|
|
2840
|
+
}, z.core.$strip>], "isSecret">>;
|
|
2841
|
+
status: z.ZodEnum<{
|
|
2842
|
+
active: "active";
|
|
2843
|
+
suspended: "suspended";
|
|
2844
|
+
}>;
|
|
2845
|
+
lastFailureReason: z.ZodNullable<z.ZodEnum<{
|
|
2846
|
+
credentials: "credentials";
|
|
2847
|
+
"wrong-path": "wrong-path";
|
|
2848
|
+
"wrong-protocol": "wrong-protocol";
|
|
2849
|
+
"invalid-payload": "invalid-payload";
|
|
2850
|
+
"partial-rejection": "partial-rejection";
|
|
2851
|
+
"blocked-target": "blocked-target";
|
|
2852
|
+
timeout: "timeout";
|
|
2853
|
+
unreachable: "unreachable";
|
|
2854
|
+
"receiver-error": "receiver-error";
|
|
2855
|
+
"unexpected-status": "unexpected-status";
|
|
2856
|
+
}>>;
|
|
2857
|
+
isScopedToIntentionalRequestsOnly: z.ZodBoolean;
|
|
2858
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2859
|
+
BAD_REQUEST: {};
|
|
2860
|
+
}>, {
|
|
2861
|
+
NOT_FOUND: {};
|
|
2862
|
+
FORBIDDEN: {};
|
|
2863
|
+
OTLP_DESTINATION_UNVERIFIED: {
|
|
2864
|
+
status: number;
|
|
2865
|
+
};
|
|
2866
|
+
}>, Record<never, never>>;
|
|
2867
|
+
};
|
|
2868
|
+
delete: {
|
|
2869
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2870
|
+
environmentId: z.ZodString;
|
|
2871
|
+
destinationId: z.ZodString;
|
|
2872
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2873
|
+
success: z.ZodLiteral<true>;
|
|
2874
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2875
|
+
BAD_REQUEST: {};
|
|
2876
|
+
}>, {
|
|
2877
|
+
NOT_FOUND: {};
|
|
2878
|
+
INTERNAL_SERVER_ERROR: {};
|
|
2879
|
+
}>, Record<never, never>>;
|
|
2880
|
+
};
|
|
2881
|
+
};
|
|
2678
2882
|
projects: {
|
|
2679
2883
|
update: {
|
|
2680
2884
|
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -2689,8 +2893,10 @@ export declare const contract: {
|
|
|
2689
2893
|
runtime: z.ZodEnum<{
|
|
2690
2894
|
"python3.13": "python3.13";
|
|
2691
2895
|
"python3.14": "python3.14";
|
|
2896
|
+
"python3.15": "python3.15";
|
|
2692
2897
|
node22: "node22";
|
|
2693
2898
|
node24: "node24";
|
|
2899
|
+
node26: "node26";
|
|
2694
2900
|
}>;
|
|
2695
2901
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
2696
2902
|
stdio: "stdio";
|
|
@@ -2767,8 +2973,10 @@ export declare const contract: {
|
|
|
2767
2973
|
runtime: z.ZodEnum<{
|
|
2768
2974
|
"python3.13": "python3.13";
|
|
2769
2975
|
"python3.14": "python3.14";
|
|
2976
|
+
"python3.15": "python3.15";
|
|
2770
2977
|
node22: "node22";
|
|
2771
2978
|
node24: "node24";
|
|
2979
|
+
node26: "node26";
|
|
2772
2980
|
}>;
|
|
2773
2981
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
2774
2982
|
stdio: "stdio";
|
|
@@ -2844,8 +3052,10 @@ export declare const contract: {
|
|
|
2844
3052
|
runtime: z.ZodEnum<{
|
|
2845
3053
|
"python3.13": "python3.13";
|
|
2846
3054
|
"python3.14": "python3.14";
|
|
3055
|
+
"python3.15": "python3.15";
|
|
2847
3056
|
node22: "node22";
|
|
2848
3057
|
node24: "node24";
|
|
3058
|
+
node26: "node26";
|
|
2849
3059
|
}>;
|
|
2850
3060
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
2851
3061
|
stdio: "stdio";
|
|
@@ -2919,8 +3129,10 @@ export declare const contract: {
|
|
|
2919
3129
|
runtime: z.ZodEnum<{
|
|
2920
3130
|
"python3.13": "python3.13";
|
|
2921
3131
|
"python3.14": "python3.14";
|
|
3132
|
+
"python3.15": "python3.15";
|
|
2922
3133
|
node22: "node22";
|
|
2923
3134
|
node24: "node24";
|
|
3135
|
+
node26: "node26";
|
|
2924
3136
|
}>;
|
|
2925
3137
|
transport: z.ZodOptional<z.ZodEnum<{
|
|
2926
3138
|
stdio: "stdio";
|
|
@@ -2955,8 +3167,10 @@ export declare const contract: {
|
|
|
2955
3167
|
runtime: z.ZodEnum<{
|
|
2956
3168
|
"python3.13": "python3.13";
|
|
2957
3169
|
"python3.14": "python3.14";
|
|
3170
|
+
"python3.15": "python3.15";
|
|
2958
3171
|
node22: "node22";
|
|
2959
3172
|
node24: "node24";
|
|
3173
|
+
node26: "node26";
|
|
2960
3174
|
}>;
|
|
2961
3175
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
2962
3176
|
stdio: "stdio";
|
|
@@ -4317,8 +4531,8 @@ export declare const contractForDocs: {
|
|
|
4317
4531
|
environmentId: z.ZodString;
|
|
4318
4532
|
content: z.ZodString;
|
|
4319
4533
|
source: z.ZodEnum<{
|
|
4320
|
-
model: "model";
|
|
4321
4534
|
user: "user";
|
|
4535
|
+
model: "model";
|
|
4322
4536
|
}>;
|
|
4323
4537
|
clientName: z.ZodNullable<z.ZodString>;
|
|
4324
4538
|
clientId: z.ZodNullable<z.ZodString>;
|
|
@@ -4553,6 +4767,206 @@ export declare const contractForDocs: {
|
|
|
4553
4767
|
}>, Record<never, never>>;
|
|
4554
4768
|
};
|
|
4555
4769
|
};
|
|
4770
|
+
telemetryDestinations: {
|
|
4771
|
+
list: {
|
|
4772
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4773
|
+
environmentId: z.ZodString;
|
|
4774
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
4775
|
+
id: z.ZodString;
|
|
4776
|
+
signal: z.ZodEnum<{
|
|
4777
|
+
logs: "logs";
|
|
4778
|
+
metrics: "metrics";
|
|
4779
|
+
traces: "traces";
|
|
4780
|
+
}>;
|
|
4781
|
+
endpoint: z.ZodString;
|
|
4782
|
+
protocol: z.ZodEnum<{
|
|
4783
|
+
"http/protobuf": "http/protobuf";
|
|
4784
|
+
"http/json": "http/json";
|
|
4785
|
+
}>;
|
|
4786
|
+
headers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4787
|
+
id: z.ZodString;
|
|
4788
|
+
name: z.ZodString;
|
|
4789
|
+
value: z.ZodNull;
|
|
4790
|
+
isSecret: z.ZodLiteral<true>;
|
|
4791
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4792
|
+
id: z.ZodString;
|
|
4793
|
+
name: z.ZodString;
|
|
4794
|
+
value: z.ZodString;
|
|
4795
|
+
isSecret: z.ZodLiteral<false>;
|
|
4796
|
+
}, z.core.$strip>], "isSecret">>;
|
|
4797
|
+
status: z.ZodEnum<{
|
|
4798
|
+
active: "active";
|
|
4799
|
+
suspended: "suspended";
|
|
4800
|
+
}>;
|
|
4801
|
+
lastFailureReason: z.ZodNullable<z.ZodEnum<{
|
|
4802
|
+
credentials: "credentials";
|
|
4803
|
+
"wrong-path": "wrong-path";
|
|
4804
|
+
"wrong-protocol": "wrong-protocol";
|
|
4805
|
+
"invalid-payload": "invalid-payload";
|
|
4806
|
+
"partial-rejection": "partial-rejection";
|
|
4807
|
+
"blocked-target": "blocked-target";
|
|
4808
|
+
timeout: "timeout";
|
|
4809
|
+
unreachable: "unreachable";
|
|
4810
|
+
"receiver-error": "receiver-error";
|
|
4811
|
+
"unexpected-status": "unexpected-status";
|
|
4812
|
+
}>>;
|
|
4813
|
+
isScopedToIntentionalRequestsOnly: z.ZodBoolean;
|
|
4814
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
4815
|
+
BAD_REQUEST: {};
|
|
4816
|
+
}>, {
|
|
4817
|
+
NOT_FOUND: {};
|
|
4818
|
+
}>, Record<never, never>>;
|
|
4819
|
+
};
|
|
4820
|
+
create: {
|
|
4821
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4822
|
+
environmentId: z.ZodString;
|
|
4823
|
+
signal: z.ZodEnum<{
|
|
4824
|
+
logs: "logs";
|
|
4825
|
+
metrics: "metrics";
|
|
4826
|
+
traces: "traces";
|
|
4827
|
+
}>;
|
|
4828
|
+
endpoint: z.ZodString;
|
|
4829
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
4830
|
+
"http/protobuf": "http/protobuf";
|
|
4831
|
+
"http/json": "http/json";
|
|
4832
|
+
}>>;
|
|
4833
|
+
isScopedToIntentionalRequestsOnly: z.ZodDefault<z.ZodBoolean>;
|
|
4834
|
+
headers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
4835
|
+
name: z.ZodString;
|
|
4836
|
+
value: z.ZodString;
|
|
4837
|
+
isSecret: z.ZodBoolean;
|
|
4838
|
+
}, z.core.$strip>>>;
|
|
4839
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4840
|
+
id: z.ZodString;
|
|
4841
|
+
signal: z.ZodEnum<{
|
|
4842
|
+
logs: "logs";
|
|
4843
|
+
metrics: "metrics";
|
|
4844
|
+
traces: "traces";
|
|
4845
|
+
}>;
|
|
4846
|
+
endpoint: z.ZodString;
|
|
4847
|
+
protocol: z.ZodEnum<{
|
|
4848
|
+
"http/protobuf": "http/protobuf";
|
|
4849
|
+
"http/json": "http/json";
|
|
4850
|
+
}>;
|
|
4851
|
+
headers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4852
|
+
id: z.ZodString;
|
|
4853
|
+
name: z.ZodString;
|
|
4854
|
+
value: z.ZodNull;
|
|
4855
|
+
isSecret: z.ZodLiteral<true>;
|
|
4856
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4857
|
+
id: z.ZodString;
|
|
4858
|
+
name: z.ZodString;
|
|
4859
|
+
value: z.ZodString;
|
|
4860
|
+
isSecret: z.ZodLiteral<false>;
|
|
4861
|
+
}, z.core.$strip>], "isSecret">>;
|
|
4862
|
+
status: z.ZodEnum<{
|
|
4863
|
+
active: "active";
|
|
4864
|
+
suspended: "suspended";
|
|
4865
|
+
}>;
|
|
4866
|
+
lastFailureReason: z.ZodNullable<z.ZodEnum<{
|
|
4867
|
+
credentials: "credentials";
|
|
4868
|
+
"wrong-path": "wrong-path";
|
|
4869
|
+
"wrong-protocol": "wrong-protocol";
|
|
4870
|
+
"invalid-payload": "invalid-payload";
|
|
4871
|
+
"partial-rejection": "partial-rejection";
|
|
4872
|
+
"blocked-target": "blocked-target";
|
|
4873
|
+
timeout: "timeout";
|
|
4874
|
+
unreachable: "unreachable";
|
|
4875
|
+
"receiver-error": "receiver-error";
|
|
4876
|
+
"unexpected-status": "unexpected-status";
|
|
4877
|
+
}>>;
|
|
4878
|
+
isScopedToIntentionalRequestsOnly: z.ZodBoolean;
|
|
4879
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
4880
|
+
BAD_REQUEST: {};
|
|
4881
|
+
}>, {
|
|
4882
|
+
NOT_FOUND: {};
|
|
4883
|
+
FORBIDDEN: {};
|
|
4884
|
+
OTLP_DESTINATION_UNVERIFIED: {
|
|
4885
|
+
status: number;
|
|
4886
|
+
};
|
|
4887
|
+
INTERNAL_SERVER_ERROR: {};
|
|
4888
|
+
}>, Record<never, never>>;
|
|
4889
|
+
};
|
|
4890
|
+
update: {
|
|
4891
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4892
|
+
environmentId: z.ZodString;
|
|
4893
|
+
destinationId: z.ZodString;
|
|
4894
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
4895
|
+
protocol: z.ZodOptional<z.ZodEnum<{
|
|
4896
|
+
"http/protobuf": "http/protobuf";
|
|
4897
|
+
"http/json": "http/json";
|
|
4898
|
+
}>>;
|
|
4899
|
+
isScopedToIntentionalRequestsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4900
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4901
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4902
|
+
name: z.ZodString;
|
|
4903
|
+
value: z.ZodOptional<z.ZodString>;
|
|
4904
|
+
isSecret: z.ZodBoolean;
|
|
4905
|
+
}, z.core.$strip>>>;
|
|
4906
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4907
|
+
id: z.ZodString;
|
|
4908
|
+
signal: z.ZodEnum<{
|
|
4909
|
+
logs: "logs";
|
|
4910
|
+
metrics: "metrics";
|
|
4911
|
+
traces: "traces";
|
|
4912
|
+
}>;
|
|
4913
|
+
endpoint: z.ZodString;
|
|
4914
|
+
protocol: z.ZodEnum<{
|
|
4915
|
+
"http/protobuf": "http/protobuf";
|
|
4916
|
+
"http/json": "http/json";
|
|
4917
|
+
}>;
|
|
4918
|
+
headers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4919
|
+
id: z.ZodString;
|
|
4920
|
+
name: z.ZodString;
|
|
4921
|
+
value: z.ZodNull;
|
|
4922
|
+
isSecret: z.ZodLiteral<true>;
|
|
4923
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4924
|
+
id: z.ZodString;
|
|
4925
|
+
name: z.ZodString;
|
|
4926
|
+
value: z.ZodString;
|
|
4927
|
+
isSecret: z.ZodLiteral<false>;
|
|
4928
|
+
}, z.core.$strip>], "isSecret">>;
|
|
4929
|
+
status: z.ZodEnum<{
|
|
4930
|
+
active: "active";
|
|
4931
|
+
suspended: "suspended";
|
|
4932
|
+
}>;
|
|
4933
|
+
lastFailureReason: z.ZodNullable<z.ZodEnum<{
|
|
4934
|
+
credentials: "credentials";
|
|
4935
|
+
"wrong-path": "wrong-path";
|
|
4936
|
+
"wrong-protocol": "wrong-protocol";
|
|
4937
|
+
"invalid-payload": "invalid-payload";
|
|
4938
|
+
"partial-rejection": "partial-rejection";
|
|
4939
|
+
"blocked-target": "blocked-target";
|
|
4940
|
+
timeout: "timeout";
|
|
4941
|
+
unreachable: "unreachable";
|
|
4942
|
+
"receiver-error": "receiver-error";
|
|
4943
|
+
"unexpected-status": "unexpected-status";
|
|
4944
|
+
}>>;
|
|
4945
|
+
isScopedToIntentionalRequestsOnly: z.ZodBoolean;
|
|
4946
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
4947
|
+
BAD_REQUEST: {};
|
|
4948
|
+
}>, {
|
|
4949
|
+
NOT_FOUND: {};
|
|
4950
|
+
FORBIDDEN: {};
|
|
4951
|
+
OTLP_DESTINATION_UNVERIFIED: {
|
|
4952
|
+
status: number;
|
|
4953
|
+
};
|
|
4954
|
+
}>, Record<never, never>>;
|
|
4955
|
+
};
|
|
4956
|
+
delete: {
|
|
4957
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4958
|
+
environmentId: z.ZodString;
|
|
4959
|
+
destinationId: z.ZodString;
|
|
4960
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4961
|
+
success: z.ZodLiteral<true>;
|
|
4962
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
4963
|
+
BAD_REQUEST: {};
|
|
4964
|
+
}>, {
|
|
4965
|
+
NOT_FOUND: {};
|
|
4966
|
+
INTERNAL_SERVER_ERROR: {};
|
|
4967
|
+
}>, Record<never, never>>;
|
|
4968
|
+
};
|
|
4969
|
+
};
|
|
4556
4970
|
projects: {
|
|
4557
4971
|
update: {
|
|
4558
4972
|
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -4567,8 +4981,10 @@ export declare const contractForDocs: {
|
|
|
4567
4981
|
runtime: z.ZodEnum<{
|
|
4568
4982
|
"python3.13": "python3.13";
|
|
4569
4983
|
"python3.14": "python3.14";
|
|
4984
|
+
"python3.15": "python3.15";
|
|
4570
4985
|
node22: "node22";
|
|
4571
4986
|
node24: "node24";
|
|
4987
|
+
node26: "node26";
|
|
4572
4988
|
}>;
|
|
4573
4989
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
4574
4990
|
stdio: "stdio";
|
|
@@ -4645,8 +5061,10 @@ export declare const contractForDocs: {
|
|
|
4645
5061
|
runtime: z.ZodEnum<{
|
|
4646
5062
|
"python3.13": "python3.13";
|
|
4647
5063
|
"python3.14": "python3.14";
|
|
5064
|
+
"python3.15": "python3.15";
|
|
4648
5065
|
node22: "node22";
|
|
4649
5066
|
node24: "node24";
|
|
5067
|
+
node26: "node26";
|
|
4650
5068
|
}>;
|
|
4651
5069
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
4652
5070
|
stdio: "stdio";
|
|
@@ -4722,8 +5140,10 @@ export declare const contractForDocs: {
|
|
|
4722
5140
|
runtime: z.ZodEnum<{
|
|
4723
5141
|
"python3.13": "python3.13";
|
|
4724
5142
|
"python3.14": "python3.14";
|
|
5143
|
+
"python3.15": "python3.15";
|
|
4725
5144
|
node22: "node22";
|
|
4726
5145
|
node24: "node24";
|
|
5146
|
+
node26: "node26";
|
|
4727
5147
|
}>;
|
|
4728
5148
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
4729
5149
|
stdio: "stdio";
|
|
@@ -4797,8 +5217,10 @@ export declare const contractForDocs: {
|
|
|
4797
5217
|
runtime: z.ZodEnum<{
|
|
4798
5218
|
"python3.13": "python3.13";
|
|
4799
5219
|
"python3.14": "python3.14";
|
|
5220
|
+
"python3.15": "python3.15";
|
|
4800
5221
|
node22: "node22";
|
|
4801
5222
|
node24: "node24";
|
|
5223
|
+
node26: "node26";
|
|
4802
5224
|
}>;
|
|
4803
5225
|
transport: z.ZodOptional<z.ZodEnum<{
|
|
4804
5226
|
stdio: "stdio";
|
|
@@ -4833,8 +5255,10 @@ export declare const contractForDocs: {
|
|
|
4833
5255
|
runtime: z.ZodEnum<{
|
|
4834
5256
|
"python3.13": "python3.13";
|
|
4835
5257
|
"python3.14": "python3.14";
|
|
5258
|
+
"python3.15": "python3.15";
|
|
4836
5259
|
node22: "node22";
|
|
4837
5260
|
node24: "node24";
|
|
5261
|
+
node26: "node26";
|
|
4838
5262
|
}>;
|
|
4839
5263
|
transport: z.ZodNullable<z.ZodEnum<{
|
|
4840
5264
|
stdio: "stdio";
|
|
@@ -5830,8 +6254,6 @@ export declare const contractForDocs: {
|
|
|
5830
6254
|
};
|
|
5831
6255
|
export type RouterInput = InferContractRouterInputs<typeof contract>;
|
|
5832
6256
|
export type RouterOutput = InferContractRouterOutputs<typeof contract>;
|
|
5833
|
-
//#endregion
|
|
5834
|
-
//#region src/auth-scope.d.ts
|
|
5835
6257
|
/** Credential scope required by an API route. */
|
|
5836
6258
|
export type AuthScope = "any" | "user";
|
|
5837
6259
|
/** Accepts an API key or OAuth access token (default for most routes). */
|
|
@@ -5841,8 +6263,6 @@ export declare const AUTH_SCOPE_USER = "user";
|
|
|
5841
6263
|
export type RouteAuthMeta = {
|
|
5842
6264
|
authScope?: AuthScope;
|
|
5843
6265
|
};
|
|
5844
|
-
//#endregion
|
|
5845
|
-
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/promisable.d.ts
|
|
5846
6266
|
/**
|
|
5847
6267
|
Create a type that represents either the value or the value wrapped in `PromiseLike`.
|
|
5848
6268
|
|
|
@@ -5868,12 +6288,8 @@ await logger(() => Promise.resolve('bar'));
|
|
|
5868
6288
|
@category Async
|
|
5869
6289
|
*/
|
|
5870
6290
|
type Promisable<T> = T | PromiseLike<T>;
|
|
5871
|
-
//#endregion
|
|
5872
|
-
//#region ../../node_modules/.pnpm/@orpc+shared@1.15.2_@opentelemetry+api@1.9.1/node_modules/@orpc/shared/dist/index.d.mts
|
|
5873
6291
|
type MaybeOptionalOptions<TOptions> = Record<never, never> extends TOptions ? [options?: TOptions] : [options: TOptions];
|
|
5874
6292
|
type Value<T, TArgs extends any[] = []> = T | ((...args: TArgs) => T);
|
|
5875
|
-
//#endregion
|
|
5876
|
-
//#region ../../node_modules/.pnpm/@orpc+client@1.15.2_@opentelemetry+api@1.9.1/node_modules/@orpc/client/dist/index.d.mts
|
|
5877
6293
|
declare const COMMON_ORPC_ERROR_DEFS: {
|
|
5878
6294
|
readonly BAD_REQUEST: {
|
|
5879
6295
|
readonly status: 400;
|
|
@@ -5985,8 +6401,6 @@ declare class ORPCError<TCode extends ORPCErrorCode, TData> extends Error {
|
|
|
5985
6401
|
static [Symbol.hasInstance](instance: unknown): boolean;
|
|
5986
6402
|
}
|
|
5987
6403
|
type ORPCErrorJSON<TCode extends string, TData> = Pick<ORPCError<TCode, TData>, 'defined' | 'code' | 'status' | 'message' | 'data'>;
|
|
5988
|
-
//#endregion
|
|
5989
|
-
//#region ../../node_modules/.pnpm/@orpc+server@1.15.2_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/server/dist/shared/server.qKsRrdxW.d.mts
|
|
5990
6404
|
type Context = Record<PropertyKey, any>;
|
|
5991
6405
|
type ORPCErrorConstructorMapItemOptions<TData> = Omit<ORPCErrorOptions<TData>, 'defined' | 'status'>;
|
|
5992
6406
|
type ORPCErrorConstructorMapItem<TCode extends ORPCErrorCode, TInData> = (...rest: MaybeOptionalOptions<ORPCErrorConstructorMapItemOptions<TInData>>) => ORPCError<TCode, TInData>;
|
|
@@ -6056,986 +6470,982 @@ interface Middleware<TInContext extends Context, TOutContext extends Context, TI
|
|
|
6056
6470
|
(options: MiddlewareOptions<TInContext, TOutput, TErrorConstructorMap, TMeta>, input: TInput, output: MiddlewareOutputFn<TOutput>): Promisable<MiddlewareResult<TOutContext, TOutput>>;
|
|
6057
6471
|
}
|
|
6058
6472
|
type AnyMiddleware = Middleware<any, any, any, any, any, any>;
|
|
6059
|
-
//#endregion
|
|
6060
|
-
//#region ../../node_modules/.pnpm/@orpc+server@1.15.2_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/server/dist/shared/server.C8_sRzQB.d.mts
|
|
6061
6473
|
interface TraverseContractProcedureCallbackOptions {
|
|
6062
6474
|
contract: AnyContractProcedure | AnyProcedure;
|
|
6063
6475
|
path: readonly string[];
|
|
6064
6476
|
}
|
|
6065
|
-
//#endregion
|
|
6066
|
-
//#region ../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts
|
|
6067
6477
|
type MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>;
|
|
6068
6478
|
type ValueOf<T> = T[keyof T];
|
|
6069
|
-
/**
|
|
6070
|
-
* JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html)
|
|
6479
|
+
/**
|
|
6480
|
+
* JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html)
|
|
6071
6481
|
*/
|
|
6072
6482
|
type JSONSchema<Value = any, SchemaType = Value extends boolean ? "boolean" : Value extends null ? "null" : Value extends number ? "number" | "integer" : Value extends string ? "string" : Value extends unknown[] ? "array" : Value extends Record<string | number, unknown> ? "object" : JSONSchema.TypeValue> = boolean | {
|
|
6073
|
-
/**
|
|
6074
|
-
* Using JSON Pointer fragments requires knowledge of the structure of the
|
|
6075
|
-
* schema. When writing schema documents with the intention to provide
|
|
6076
|
-
* re-usable schemas, it may be preferable to use a plain name fragment
|
|
6077
|
-
* that is not tied to any particular structural location. This allows a
|
|
6078
|
-
* subschema to be relocated without requiring JSON Pointer references to
|
|
6079
|
-
* be updated.
|
|
6080
|
-
*
|
|
6081
|
-
* The `$anchor` keyword is used to specify such a fragment. It is an
|
|
6082
|
-
* identifier keyword that can only be used to create plain name fragments.
|
|
6083
|
-
*
|
|
6084
|
-
* If present, the value of this keyword MUST be a string, which MUST start
|
|
6085
|
-
* with a letter `[A-Za-z]`, followed by any number of letters, digits
|
|
6086
|
-
* `[0-9]`, hyphens `-`, underscores `_`, colons `:`,
|
|
6087
|
-
* or periods `.`.
|
|
6088
|
-
*
|
|
6089
|
-
* Note that the anchor string does not include the `#` character,
|
|
6090
|
-
* as it is not a URI-reference. An `{"$anchor": "foo"}` becomes the
|
|
6091
|
-
* fragment `#foo` when used in a URI.
|
|
6092
|
-
*
|
|
6093
|
-
* The base URI to which the resulting fragment is appended is determined
|
|
6094
|
-
* by the `$id` keyword as explained in the previous section.
|
|
6095
|
-
* Two `$anchor` keywords in the same schema document MAY have the same
|
|
6096
|
-
* value if they apply to different base URIs, as the resulting full URIs
|
|
6097
|
-
* will be distinct. However, the effect of two `$anchor` keywords
|
|
6098
|
-
* with the same value and the same base URI is undefined. Implementations
|
|
6099
|
-
* MAY raise an error if such usage is detected.
|
|
6483
|
+
/**
|
|
6484
|
+
* Using JSON Pointer fragments requires knowledge of the structure of the
|
|
6485
|
+
* schema. When writing schema documents with the intention to provide
|
|
6486
|
+
* re-usable schemas, it may be preferable to use a plain name fragment
|
|
6487
|
+
* that is not tied to any particular structural location. This allows a
|
|
6488
|
+
* subschema to be relocated without requiring JSON Pointer references to
|
|
6489
|
+
* be updated.
|
|
6490
|
+
*
|
|
6491
|
+
* The `$anchor` keyword is used to specify such a fragment. It is an
|
|
6492
|
+
* identifier keyword that can only be used to create plain name fragments.
|
|
6493
|
+
*
|
|
6494
|
+
* If present, the value of this keyword MUST be a string, which MUST start
|
|
6495
|
+
* with a letter `[A-Za-z]`, followed by any number of letters, digits
|
|
6496
|
+
* `[0-9]`, hyphens `-`, underscores `_`, colons `:`,
|
|
6497
|
+
* or periods `.`.
|
|
6498
|
+
*
|
|
6499
|
+
* Note that the anchor string does not include the `#` character,
|
|
6500
|
+
* as it is not a URI-reference. An `{"$anchor": "foo"}` becomes the
|
|
6501
|
+
* fragment `#foo` when used in a URI.
|
|
6502
|
+
*
|
|
6503
|
+
* The base URI to which the resulting fragment is appended is determined
|
|
6504
|
+
* by the `$id` keyword as explained in the previous section.
|
|
6505
|
+
* Two `$anchor` keywords in the same schema document MAY have the same
|
|
6506
|
+
* value if they apply to different base URIs, as the resulting full URIs
|
|
6507
|
+
* will be distinct. However, the effect of two `$anchor` keywords
|
|
6508
|
+
* with the same value and the same base URI is undefined. Implementations
|
|
6509
|
+
* MAY raise an error if such usage is detected.
|
|
6100
6510
|
*/
|
|
6101
6511
|
$anchor?: string;
|
|
6102
|
-
/**
|
|
6103
|
-
* This keyword reserves a location for comments from schema authors to
|
|
6104
|
-
* readers or maintainers of the schema.
|
|
6105
|
-
*
|
|
6106
|
-
* The value of this keyword MUST be a string. Implementations MUST NOT
|
|
6107
|
-
* present this string to end users. Tools for editing schemas SHOULD
|
|
6108
|
-
* support displaying and editing this keyword. The value of this keyword
|
|
6109
|
-
* MAY be used in debug or error output which is intended for developers
|
|
6110
|
-
* making use of schemas.
|
|
6111
|
-
*
|
|
6112
|
-
* Schema vocabularies SHOULD allow `$comment` within any object
|
|
6113
|
-
* containing vocabulary keywords. Implementations MAY assume `$comment`
|
|
6114
|
-
* is allowed unless the vocabulary specifically forbids it. Vocabularies
|
|
6115
|
-
* MUST NOT specify any effect of `$comment` beyond what is described in
|
|
6116
|
-
* this specification.
|
|
6117
|
-
*
|
|
6118
|
-
* Tools that translate other media types or programming languages
|
|
6119
|
-
* to and from `application/schema+json` MAY choose to convert that media
|
|
6120
|
-
* type or programming language's native comments to or from `$comment`
|
|
6121
|
-
* values. The behavior of such translation when both native comments and
|
|
6122
|
-
* `$comment` properties are present is implementation-dependent.
|
|
6123
|
-
*
|
|
6124
|
-
* Implementations MAY strip `$comment` values at any point during
|
|
6125
|
-
* processing. In particular, this allows for shortening schemas when the
|
|
6126
|
-
* size of deployed schemas is a concern.
|
|
6127
|
-
*
|
|
6128
|
-
* Implementations MUST NOT take any other action based on the presence,
|
|
6129
|
-
* absence, or contents of `$comment` properties. In particular, the
|
|
6130
|
-
* value of `$comment` MUST NOT be collected as an annotation result.
|
|
6512
|
+
/**
|
|
6513
|
+
* This keyword reserves a location for comments from schema authors to
|
|
6514
|
+
* readers or maintainers of the schema.
|
|
6515
|
+
*
|
|
6516
|
+
* The value of this keyword MUST be a string. Implementations MUST NOT
|
|
6517
|
+
* present this string to end users. Tools for editing schemas SHOULD
|
|
6518
|
+
* support displaying and editing this keyword. The value of this keyword
|
|
6519
|
+
* MAY be used in debug or error output which is intended for developers
|
|
6520
|
+
* making use of schemas.
|
|
6521
|
+
*
|
|
6522
|
+
* Schema vocabularies SHOULD allow `$comment` within any object
|
|
6523
|
+
* containing vocabulary keywords. Implementations MAY assume `$comment`
|
|
6524
|
+
* is allowed unless the vocabulary specifically forbids it. Vocabularies
|
|
6525
|
+
* MUST NOT specify any effect of `$comment` beyond what is described in
|
|
6526
|
+
* this specification.
|
|
6527
|
+
*
|
|
6528
|
+
* Tools that translate other media types or programming languages
|
|
6529
|
+
* to and from `application/schema+json` MAY choose to convert that media
|
|
6530
|
+
* type or programming language's native comments to or from `$comment`
|
|
6531
|
+
* values. The behavior of such translation when both native comments and
|
|
6532
|
+
* `$comment` properties are present is implementation-dependent.
|
|
6533
|
+
*
|
|
6534
|
+
* Implementations MAY strip `$comment` values at any point during
|
|
6535
|
+
* processing. In particular, this allows for shortening schemas when the
|
|
6536
|
+
* size of deployed schemas is a concern.
|
|
6537
|
+
*
|
|
6538
|
+
* Implementations MUST NOT take any other action based on the presence,
|
|
6539
|
+
* absence, or contents of `$comment` properties. In particular, the
|
|
6540
|
+
* value of `$comment` MUST NOT be collected as an annotation result.
|
|
6131
6541
|
*/
|
|
6132
6542
|
$comment?: string;
|
|
6133
|
-
/**
|
|
6134
|
-
* The `$defs` keyword reserves a location for schema authors to inline
|
|
6135
|
-
* re-usable JSON Schemas into a more general schema. The keyword does not
|
|
6136
|
-
* directly affect the validation result.
|
|
6137
|
-
*
|
|
6138
|
-
* This keyword's value MUST be an object. Each member value of this object
|
|
6139
|
-
* MUST be a valid JSON Schema.
|
|
6543
|
+
/**
|
|
6544
|
+
* The `$defs` keyword reserves a location for schema authors to inline
|
|
6545
|
+
* re-usable JSON Schemas into a more general schema. The keyword does not
|
|
6546
|
+
* directly affect the validation result.
|
|
6547
|
+
*
|
|
6548
|
+
* This keyword's value MUST be an object. Each member value of this object
|
|
6549
|
+
* MUST be a valid JSON Schema.
|
|
6140
6550
|
*/
|
|
6141
6551
|
$defs?: Record<string, JSONSchema>;
|
|
6142
|
-
/**
|
|
6143
|
-
* "The `$dynamicAnchor` indicates that the fragment is an extension
|
|
6144
|
-
* point when used with the `$dynamicRef` keyword. This low-level,
|
|
6145
|
-
* advanced feature makes it easier to extend recursive schemas such as the
|
|
6146
|
-
* meta-schemas, without imposing any particular semantics on that
|
|
6147
|
-
* extension. See `$dynamicRef` for more details.
|
|
6552
|
+
/**
|
|
6553
|
+
* "The `$dynamicAnchor` indicates that the fragment is an extension
|
|
6554
|
+
* point when used with the `$dynamicRef` keyword. This low-level,
|
|
6555
|
+
* advanced feature makes it easier to extend recursive schemas such as the
|
|
6556
|
+
* meta-schemas, without imposing any particular semantics on that
|
|
6557
|
+
* extension. See `$dynamicRef` for more details.
|
|
6148
6558
|
*/
|
|
6149
6559
|
$dynamicAnchor?: string;
|
|
6150
|
-
/**
|
|
6151
|
-
* The `$dynamicRef` keyword is an applicator that allows for deferring
|
|
6152
|
-
* the full resolution until runtime, at which point it is resolved each
|
|
6153
|
-
* time it is encountered while evaluating an instance.
|
|
6154
|
-
*
|
|
6155
|
-
* Together with `$dynamicAnchor`, `$dynamicRef` implements a
|
|
6156
|
-
* cooperative extension mechanism that is primarily useful with recursive
|
|
6157
|
-
* schemas (schemas that reference themselves). Both the extension point
|
|
6158
|
-
* and the runtime-determined extension target are defined with
|
|
6159
|
-
* `$dynamicAnchor`, and only exhibit runtime dynamic behavior when
|
|
6160
|
-
* referenced with `$dynamicRef`.
|
|
6161
|
-
*
|
|
6162
|
-
* The value of the `$dynamicRef` property MUST be a string which is
|
|
6163
|
-
* a URI-Reference. Resolved against the current URI base, it produces
|
|
6164
|
-
* the URI used as the starting point for runtime resolution. This initial
|
|
6165
|
-
* resolution is safe to perform on schema load.
|
|
6166
|
-
*
|
|
6167
|
-
* If the initially resolved starting point URI includes a fragment that
|
|
6168
|
-
* was created by the `$dynamicAnchor` keyword, the initial URI MUST be
|
|
6169
|
-
* replaced by the URI (including the fragment) for the outermost schema
|
|
6170
|
-
* resource in the [dynamic scope][scopes] that defines
|
|
6171
|
-
* an identically named fragment with `$dynamicAnchor`.
|
|
6172
|
-
*
|
|
6173
|
-
* Otherwise, its behavior is identical to `$ref`, and no runtime
|
|
6174
|
-
* resolution is needed.
|
|
6175
|
-
*
|
|
6176
|
-
* [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes
|
|
6177
|
-
*
|
|
6178
|
-
* @format "uri-reference"
|
|
6560
|
+
/**
|
|
6561
|
+
* The `$dynamicRef` keyword is an applicator that allows for deferring
|
|
6562
|
+
* the full resolution until runtime, at which point it is resolved each
|
|
6563
|
+
* time it is encountered while evaluating an instance.
|
|
6564
|
+
*
|
|
6565
|
+
* Together with `$dynamicAnchor`, `$dynamicRef` implements a
|
|
6566
|
+
* cooperative extension mechanism that is primarily useful with recursive
|
|
6567
|
+
* schemas (schemas that reference themselves). Both the extension point
|
|
6568
|
+
* and the runtime-determined extension target are defined with
|
|
6569
|
+
* `$dynamicAnchor`, and only exhibit runtime dynamic behavior when
|
|
6570
|
+
* referenced with `$dynamicRef`.
|
|
6571
|
+
*
|
|
6572
|
+
* The value of the `$dynamicRef` property MUST be a string which is
|
|
6573
|
+
* a URI-Reference. Resolved against the current URI base, it produces
|
|
6574
|
+
* the URI used as the starting point for runtime resolution. This initial
|
|
6575
|
+
* resolution is safe to perform on schema load.
|
|
6576
|
+
*
|
|
6577
|
+
* If the initially resolved starting point URI includes a fragment that
|
|
6578
|
+
* was created by the `$dynamicAnchor` keyword, the initial URI MUST be
|
|
6579
|
+
* replaced by the URI (including the fragment) for the outermost schema
|
|
6580
|
+
* resource in the [dynamic scope][scopes] that defines
|
|
6581
|
+
* an identically named fragment with `$dynamicAnchor`.
|
|
6582
|
+
*
|
|
6583
|
+
* Otherwise, its behavior is identical to `$ref`, and no runtime
|
|
6584
|
+
* resolution is needed.
|
|
6585
|
+
*
|
|
6586
|
+
* [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes
|
|
6587
|
+
*
|
|
6588
|
+
* @format "uri-reference"
|
|
6179
6589
|
*/
|
|
6180
6590
|
$dynamicRef?: string;
|
|
6181
|
-
/**
|
|
6182
|
-
* The `$id` keyword identifies a schema resource with its
|
|
6183
|
-
* [canonical][[RFC6596]] URI.
|
|
6184
|
-
*
|
|
6185
|
-
* Note that this URI is an identifier and not necessarily a network
|
|
6186
|
-
* locator. In the case of a network-addressable URL, a schema need not be
|
|
6187
|
-
* downloadable from its canonical URI.
|
|
6188
|
-
*
|
|
6189
|
-
* If present, the value for this keyword MUST be a string, and MUST
|
|
6190
|
-
* represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD
|
|
6191
|
-
* be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a
|
|
6192
|
-
* fragment). Therefore, `$id` MUST NOT contain a non-empty fragment,
|
|
6193
|
-
* and SHOULD NOT contain an empty fragment.
|
|
6194
|
-
*
|
|
6195
|
-
* Since an empty fragment in the context of the
|
|
6196
|
-
* `application/schema+json` media type refers to the same resource as
|
|
6197
|
-
* the base URI without a fragment, an implementation MAY normalize a URI
|
|
6198
|
-
* ending with an empty fragment by removing the fragment. However, schema
|
|
6199
|
-
* authors SHOULD NOT rely on this behavior across implementations.
|
|
6200
|
-
*
|
|
6201
|
-
* This URI also serves as the base URI for relative URI-references in
|
|
6202
|
-
* keywords within the schema resource, in accordance with
|
|
6203
|
-
* [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in
|
|
6204
|
-
* content.
|
|
6205
|
-
*
|
|
6206
|
-
* The presence of `$id` in a subschema indicates that the subschema
|
|
6207
|
-
* constitutes a distinct schema resource within a single schema document.
|
|
6208
|
-
* Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2
|
|
6209
|
-
* regarding encapsulating entities, if an `$id` in a subschema is a
|
|
6210
|
-
* relative URI-reference, the base URI for resolving that reference is the
|
|
6211
|
-
* URI of the parent schema resource.
|
|
6212
|
-
*
|
|
6213
|
-
* If no parent schema object explicitly identifies itself as a resource
|
|
6214
|
-
* with `$id`, the base URI is that of the entire document.
|
|
6215
|
-
*
|
|
6216
|
-
* The root schema of a JSON Schema document SHOULD contain an `$id`
|
|
6217
|
-
* keyword with an [absolute-URI][RFC3986] (containing a scheme, but no
|
|
6218
|
-
* fragment).
|
|
6219
|
-
*
|
|
6220
|
-
* [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596
|
|
6221
|
-
* [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986
|
|
6222
|
-
*
|
|
6223
|
-
* @format "uri-reference"
|
|
6591
|
+
/**
|
|
6592
|
+
* The `$id` keyword identifies a schema resource with its
|
|
6593
|
+
* [canonical][[RFC6596]] URI.
|
|
6594
|
+
*
|
|
6595
|
+
* Note that this URI is an identifier and not necessarily a network
|
|
6596
|
+
* locator. In the case of a network-addressable URL, a schema need not be
|
|
6597
|
+
* downloadable from its canonical URI.
|
|
6598
|
+
*
|
|
6599
|
+
* If present, the value for this keyword MUST be a string, and MUST
|
|
6600
|
+
* represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD
|
|
6601
|
+
* be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a
|
|
6602
|
+
* fragment). Therefore, `$id` MUST NOT contain a non-empty fragment,
|
|
6603
|
+
* and SHOULD NOT contain an empty fragment.
|
|
6604
|
+
*
|
|
6605
|
+
* Since an empty fragment in the context of the
|
|
6606
|
+
* `application/schema+json` media type refers to the same resource as
|
|
6607
|
+
* the base URI without a fragment, an implementation MAY normalize a URI
|
|
6608
|
+
* ending with an empty fragment by removing the fragment. However, schema
|
|
6609
|
+
* authors SHOULD NOT rely on this behavior across implementations.
|
|
6610
|
+
*
|
|
6611
|
+
* This URI also serves as the base URI for relative URI-references in
|
|
6612
|
+
* keywords within the schema resource, in accordance with
|
|
6613
|
+
* [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in
|
|
6614
|
+
* content.
|
|
6615
|
+
*
|
|
6616
|
+
* The presence of `$id` in a subschema indicates that the subschema
|
|
6617
|
+
* constitutes a distinct schema resource within a single schema document.
|
|
6618
|
+
* Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2
|
|
6619
|
+
* regarding encapsulating entities, if an `$id` in a subschema is a
|
|
6620
|
+
* relative URI-reference, the base URI for resolving that reference is the
|
|
6621
|
+
* URI of the parent schema resource.
|
|
6622
|
+
*
|
|
6623
|
+
* If no parent schema object explicitly identifies itself as a resource
|
|
6624
|
+
* with `$id`, the base URI is that of the entire document.
|
|
6625
|
+
*
|
|
6626
|
+
* The root schema of a JSON Schema document SHOULD contain an `$id`
|
|
6627
|
+
* keyword with an [absolute-URI][RFC3986] (containing a scheme, but no
|
|
6628
|
+
* fragment).
|
|
6629
|
+
*
|
|
6630
|
+
* [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596
|
|
6631
|
+
* [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986
|
|
6632
|
+
*
|
|
6633
|
+
* @format "uri-reference"
|
|
6224
6634
|
*/
|
|
6225
6635
|
$id?: string;
|
|
6226
|
-
/**
|
|
6227
|
-
* The `$ref` keyword is an applicator that is used to reference a
|
|
6228
|
-
* statically identified schema. Its results are the results of the
|
|
6229
|
-
* referenced schema. Other keywords can appear alongside of `$ref` in
|
|
6230
|
-
* the same schema object.
|
|
6231
|
-
*
|
|
6232
|
-
* The value of the `$ref` property MUST be a string which is a
|
|
6233
|
-
* URI-Reference. Resolved against the current URI base, it produces the
|
|
6234
|
-
* URI of the schema to apply.
|
|
6235
|
-
*
|
|
6236
|
-
* @format "uri-reference"
|
|
6636
|
+
/**
|
|
6637
|
+
* The `$ref` keyword is an applicator that is used to reference a
|
|
6638
|
+
* statically identified schema. Its results are the results of the
|
|
6639
|
+
* referenced schema. Other keywords can appear alongside of `$ref` in
|
|
6640
|
+
* the same schema object.
|
|
6641
|
+
*
|
|
6642
|
+
* The value of the `$ref` property MUST be a string which is a
|
|
6643
|
+
* URI-Reference. Resolved against the current URI base, it produces the
|
|
6644
|
+
* URI of the schema to apply.
|
|
6645
|
+
*
|
|
6646
|
+
* @format "uri-reference"
|
|
6237
6647
|
*/
|
|
6238
6648
|
$ref?: string;
|
|
6239
|
-
/**
|
|
6240
|
-
* The `$schema` keyword is both used as a JSON Schema dialect identifier
|
|
6241
|
-
* and as the identifier of a resource which is itself a JSON Schema, which
|
|
6242
|
-
* describes the set of valid schemas written for this particular dialect.
|
|
6243
|
-
*
|
|
6244
|
-
* The value of this keyword MUST be a [URI][RFC3986] (containing a scheme)
|
|
6245
|
-
* and this URI MUST be normalized. The current schema MUST be valid
|
|
6246
|
-
* against the meta-schema identified by this URI.
|
|
6247
|
-
*
|
|
6248
|
-
* If this URI identifies a retrievable resource, that resource SHOULD be
|
|
6249
|
-
* of media type `application/schema+json`.
|
|
6250
|
-
*
|
|
6251
|
-
* The `$schema` keyword SHOULD be used in the document root schema
|
|
6252
|
-
* object, and MAY be used in the root schema objects of embedded schema
|
|
6253
|
-
* resources. It MUST NOT appear in non-resource root schema objects. If
|
|
6254
|
-
* absent from the document root schema, the resulting behavior is
|
|
6255
|
-
* implementation-defined.
|
|
6256
|
-
*
|
|
6257
|
-
* Values for this property are defined elsewhere in this and other
|
|
6258
|
-
* documents, and by other parties.
|
|
6259
|
-
*
|
|
6260
|
-
* [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986
|
|
6261
|
-
*
|
|
6262
|
-
* @format "uri"
|
|
6649
|
+
/**
|
|
6650
|
+
* The `$schema` keyword is both used as a JSON Schema dialect identifier
|
|
6651
|
+
* and as the identifier of a resource which is itself a JSON Schema, which
|
|
6652
|
+
* describes the set of valid schemas written for this particular dialect.
|
|
6653
|
+
*
|
|
6654
|
+
* The value of this keyword MUST be a [URI][RFC3986] (containing a scheme)
|
|
6655
|
+
* and this URI MUST be normalized. The current schema MUST be valid
|
|
6656
|
+
* against the meta-schema identified by this URI.
|
|
6657
|
+
*
|
|
6658
|
+
* If this URI identifies a retrievable resource, that resource SHOULD be
|
|
6659
|
+
* of media type `application/schema+json`.
|
|
6660
|
+
*
|
|
6661
|
+
* The `$schema` keyword SHOULD be used in the document root schema
|
|
6662
|
+
* object, and MAY be used in the root schema objects of embedded schema
|
|
6663
|
+
* resources. It MUST NOT appear in non-resource root schema objects. If
|
|
6664
|
+
* absent from the document root schema, the resulting behavior is
|
|
6665
|
+
* implementation-defined.
|
|
6666
|
+
*
|
|
6667
|
+
* Values for this property are defined elsewhere in this and other
|
|
6668
|
+
* documents, and by other parties.
|
|
6669
|
+
*
|
|
6670
|
+
* [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986
|
|
6671
|
+
*
|
|
6672
|
+
* @format "uri"
|
|
6263
6673
|
*/
|
|
6264
6674
|
$schema?: string;
|
|
6265
|
-
/**
|
|
6266
|
-
* The `$vocabulary` keyword is used in meta-schemas to identify the
|
|
6267
|
-
* vocabularies available for use in schemas described by that meta-schema.
|
|
6268
|
-
* It is also used to indicate whether each vocabulary is required or
|
|
6269
|
-
* optional, in the sense that an implementation MUST understand the
|
|
6270
|
-
* required vocabularies in order to successfully process the schema.
|
|
6271
|
-
* Together, this information forms a dialect. Any vocabulary that is
|
|
6272
|
-
* understood by the implementation MUST be processed in a manner
|
|
6273
|
-
* consistent with the semantic definitions contained within the
|
|
6274
|
-
* vocabulary.
|
|
6275
|
-
*
|
|
6276
|
-
* The value of this keyword MUST be an object. The property names in the
|
|
6277
|
-
* object MUST be URIs (containing a scheme) and this URI MUST be
|
|
6278
|
-
* normalized. Each URI that appears as a property name identifies a
|
|
6279
|
-
* specific set of keywords and their semantics.
|
|
6280
|
-
*
|
|
6281
|
-
* The URI MAY be a URL, but the nature of the retrievable resource is
|
|
6282
|
-
* currently undefined, and reserved for future use. Vocabulary authors
|
|
6283
|
-
* MAY use the URL of the vocabulary specification, in a human-readable
|
|
6284
|
-
* media type such as `text/html` or `text/plain`, as the vocabulary
|
|
6285
|
-
* URI.
|
|
6286
|
-
*
|
|
6287
|
-
* The values of the object properties MUST be booleans. If the value is
|
|
6288
|
-
* `true`, then implementations that do not recognize the vocabulary MUST
|
|
6289
|
-
* refuse to process any schemas that declare this meta-schema with
|
|
6290
|
-
* `$schema`. If the value is `false`, implementations that do not
|
|
6291
|
-
* recognize the vocabulary SHOULD proceed with processing such schemas.
|
|
6292
|
-
* The value has no impact if the implementation understands the
|
|
6293
|
-
* vocabulary.
|
|
6294
|
-
*
|
|
6295
|
-
* Unrecognized keywords SHOULD be ignored. This remains the case for
|
|
6296
|
-
* keywords defined by unrecognized vocabularies. It is not currently
|
|
6297
|
-
* possible to distinguish between unrecognized keywords that are defined
|
|
6298
|
-
* in vocabularies from those that are not part of any vocabulary.
|
|
6299
|
-
*
|
|
6300
|
-
* The `$vocabulary` keyword SHOULD be used in the root schema of any
|
|
6301
|
-
* schema document intended for use as a meta-schema. It MUST NOT appear
|
|
6302
|
-
* in subschemas.
|
|
6303
|
-
*
|
|
6304
|
-
* The `$vocabulary` keyword MUST be ignored in schema documents that are
|
|
6305
|
-
* not being processed as a meta-schema.
|
|
6675
|
+
/**
|
|
6676
|
+
* The `$vocabulary` keyword is used in meta-schemas to identify the
|
|
6677
|
+
* vocabularies available for use in schemas described by that meta-schema.
|
|
6678
|
+
* It is also used to indicate whether each vocabulary is required or
|
|
6679
|
+
* optional, in the sense that an implementation MUST understand the
|
|
6680
|
+
* required vocabularies in order to successfully process the schema.
|
|
6681
|
+
* Together, this information forms a dialect. Any vocabulary that is
|
|
6682
|
+
* understood by the implementation MUST be processed in a manner
|
|
6683
|
+
* consistent with the semantic definitions contained within the
|
|
6684
|
+
* vocabulary.
|
|
6685
|
+
*
|
|
6686
|
+
* The value of this keyword MUST be an object. The property names in the
|
|
6687
|
+
* object MUST be URIs (containing a scheme) and this URI MUST be
|
|
6688
|
+
* normalized. Each URI that appears as a property name identifies a
|
|
6689
|
+
* specific set of keywords and their semantics.
|
|
6690
|
+
*
|
|
6691
|
+
* The URI MAY be a URL, but the nature of the retrievable resource is
|
|
6692
|
+
* currently undefined, and reserved for future use. Vocabulary authors
|
|
6693
|
+
* MAY use the URL of the vocabulary specification, in a human-readable
|
|
6694
|
+
* media type such as `text/html` or `text/plain`, as the vocabulary
|
|
6695
|
+
* URI.
|
|
6696
|
+
*
|
|
6697
|
+
* The values of the object properties MUST be booleans. If the value is
|
|
6698
|
+
* `true`, then implementations that do not recognize the vocabulary MUST
|
|
6699
|
+
* refuse to process any schemas that declare this meta-schema with
|
|
6700
|
+
* `$schema`. If the value is `false`, implementations that do not
|
|
6701
|
+
* recognize the vocabulary SHOULD proceed with processing such schemas.
|
|
6702
|
+
* The value has no impact if the implementation understands the
|
|
6703
|
+
* vocabulary.
|
|
6704
|
+
*
|
|
6705
|
+
* Unrecognized keywords SHOULD be ignored. This remains the case for
|
|
6706
|
+
* keywords defined by unrecognized vocabularies. It is not currently
|
|
6707
|
+
* possible to distinguish between unrecognized keywords that are defined
|
|
6708
|
+
* in vocabularies from those that are not part of any vocabulary.
|
|
6709
|
+
*
|
|
6710
|
+
* The `$vocabulary` keyword SHOULD be used in the root schema of any
|
|
6711
|
+
* schema document intended for use as a meta-schema. It MUST NOT appear
|
|
6712
|
+
* in subschemas.
|
|
6713
|
+
*
|
|
6714
|
+
* The `$vocabulary` keyword MUST be ignored in schema documents that are
|
|
6715
|
+
* not being processed as a meta-schema.
|
|
6306
6716
|
*/
|
|
6307
6717
|
$vocabulary?: Record<string, string>;
|
|
6308
|
-
/**
|
|
6309
|
-
* @deprecated `additionalItems` has been deprecated in favor of `prefixItems`
|
|
6310
|
-
* paired with `items`.
|
|
6718
|
+
/**
|
|
6719
|
+
* @deprecated `additionalItems` has been deprecated in favor of `prefixItems`
|
|
6720
|
+
* paired with `items`.
|
|
6311
6721
|
*/
|
|
6312
6722
|
additionalItems?: JSONSchema;
|
|
6313
|
-
/**
|
|
6314
|
-
* The value of `additionalProperties` MUST be a valid JSON Schema.
|
|
6315
|
-
*
|
|
6316
|
-
* The behavior of this keyword depends on the presence and annotation
|
|
6317
|
-
* results of `properties` and `patternProperties` within the same
|
|
6318
|
-
* schema object. Validation with `additionalProperties` applies only to
|
|
6319
|
-
* the child values of instance names that do not appear in the annotation
|
|
6320
|
-
* results of either `properties` or `patternProperties`.
|
|
6321
|
-
*
|
|
6322
|
-
* For all such properties, validation succeeds if the child instance
|
|
6323
|
-
* validates against the `additionalProperties` schema.
|
|
6324
|
-
*
|
|
6325
|
-
* The annotation result of this keyword is the set of instance property
|
|
6326
|
-
* names validated by this keyword's subschema. Annotation results for
|
|
6327
|
-
* `additionalProperties` keywords from multiple schemas applied to the
|
|
6328
|
-
* same instance location are combined by taking the union of the sets.
|
|
6329
|
-
*
|
|
6330
|
-
* Omitting this keyword has the same assertion behavior as an empty
|
|
6331
|
-
* schema.
|
|
6332
|
-
*
|
|
6333
|
-
* Implementations MAY choose to implement or optimize this keyword in
|
|
6334
|
-
* another way that produces the same effect, such as by directly checking
|
|
6335
|
-
* the names in `properties` and the patterns in `patternProperties`
|
|
6336
|
-
* against the instance property set.
|
|
6723
|
+
/**
|
|
6724
|
+
* The value of `additionalProperties` MUST be a valid JSON Schema.
|
|
6725
|
+
*
|
|
6726
|
+
* The behavior of this keyword depends on the presence and annotation
|
|
6727
|
+
* results of `properties` and `patternProperties` within the same
|
|
6728
|
+
* schema object. Validation with `additionalProperties` applies only to
|
|
6729
|
+
* the child values of instance names that do not appear in the annotation
|
|
6730
|
+
* results of either `properties` or `patternProperties`.
|
|
6731
|
+
*
|
|
6732
|
+
* For all such properties, validation succeeds if the child instance
|
|
6733
|
+
* validates against the `additionalProperties` schema.
|
|
6734
|
+
*
|
|
6735
|
+
* The annotation result of this keyword is the set of instance property
|
|
6736
|
+
* names validated by this keyword's subschema. Annotation results for
|
|
6737
|
+
* `additionalProperties` keywords from multiple schemas applied to the
|
|
6738
|
+
* same instance location are combined by taking the union of the sets.
|
|
6739
|
+
*
|
|
6740
|
+
* Omitting this keyword has the same assertion behavior as an empty
|
|
6741
|
+
* schema.
|
|
6742
|
+
*
|
|
6743
|
+
* Implementations MAY choose to implement or optimize this keyword in
|
|
6744
|
+
* another way that produces the same effect, such as by directly checking
|
|
6745
|
+
* the names in `properties` and the patterns in `patternProperties`
|
|
6746
|
+
* against the instance property set.
|
|
6337
6747
|
*/
|
|
6338
6748
|
additionalProperties?: JSONSchema;
|
|
6339
|
-
/**
|
|
6340
|
-
* This keyword's value MUST be a non-empty array. Each item of the array
|
|
6341
|
-
* MUST be a valid JSON Schema.
|
|
6342
|
-
*
|
|
6343
|
-
* An instance validates successfully against this keyword if it validates
|
|
6344
|
-
* successfully against all schemas defined by this keyword's value.
|
|
6749
|
+
/**
|
|
6750
|
+
* This keyword's value MUST be a non-empty array. Each item of the array
|
|
6751
|
+
* MUST be a valid JSON Schema.
|
|
6752
|
+
*
|
|
6753
|
+
* An instance validates successfully against this keyword if it validates
|
|
6754
|
+
* successfully against all schemas defined by this keyword's value.
|
|
6345
6755
|
*/
|
|
6346
6756
|
allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;
|
|
6347
|
-
/**
|
|
6348
|
-
* This keyword's value MUST be a non-empty array. Each item of the array
|
|
6349
|
-
* MUST be a valid JSON Schema.
|
|
6350
|
-
*
|
|
6351
|
-
* An instance validates successfully against this keyword if it validates
|
|
6352
|
-
* successfully against at least one schema defined by this keyword's
|
|
6353
|
-
* value.
|
|
6757
|
+
/**
|
|
6758
|
+
* This keyword's value MUST be a non-empty array. Each item of the array
|
|
6759
|
+
* MUST be a valid JSON Schema.
|
|
6760
|
+
*
|
|
6761
|
+
* An instance validates successfully against this keyword if it validates
|
|
6762
|
+
* successfully against at least one schema defined by this keyword's
|
|
6763
|
+
* value.
|
|
6354
6764
|
*/
|
|
6355
6765
|
anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;
|
|
6356
|
-
/**
|
|
6357
|
-
* An instance validates successfully against this keyword if its value is
|
|
6358
|
-
* equal to the value of the keyword.
|
|
6359
|
-
*
|
|
6360
|
-
* Use of this keyword is functionally equivalent to the `enum` keyword
|
|
6361
|
-
* with a single value.
|
|
6766
|
+
/**
|
|
6767
|
+
* An instance validates successfully against this keyword if its value is
|
|
6768
|
+
* equal to the value of the keyword.
|
|
6769
|
+
*
|
|
6770
|
+
* Use of this keyword is functionally equivalent to the `enum` keyword
|
|
6771
|
+
* with a single value.
|
|
6362
6772
|
*/
|
|
6363
6773
|
const?: Value;
|
|
6364
|
-
/**
|
|
6365
|
-
* The value of this keyword MUST be a valid JSON Schema.
|
|
6366
|
-
*
|
|
6367
|
-
* An array instance is valid against `contains` if at least one of its
|
|
6368
|
-
* elements is valid against the given schema. The subschema MUST be
|
|
6369
|
-
* applied to every array element even after the first match has been
|
|
6370
|
-
* found, in order to collect annotations for use by other keywords.
|
|
6371
|
-
* This is to ensure that all possible annotations are collected.
|
|
6372
|
-
*
|
|
6373
|
-
* Logically, the validation result of applying the value subschema to each
|
|
6374
|
-
* item in the array MUST be OR'ed with `false`, resulting in an overall
|
|
6375
|
-
* validation result.
|
|
6376
|
-
*
|
|
6377
|
-
* This keyword produces an annotation value which is an array of the
|
|
6378
|
-
* indexes to which this keyword validates successfully when applying its
|
|
6379
|
-
* subschema, in ascending order. The value MAY be a boolean `true` if
|
|
6380
|
-
* the subschema validates successfully when applied to every index of the
|
|
6381
|
-
* instance. The annotation MUST be present if the instance array to which
|
|
6382
|
-
* this keyword's schema applies is empty.
|
|
6774
|
+
/**
|
|
6775
|
+
* The value of this keyword MUST be a valid JSON Schema.
|
|
6776
|
+
*
|
|
6777
|
+
* An array instance is valid against `contains` if at least one of its
|
|
6778
|
+
* elements is valid against the given schema. The subschema MUST be
|
|
6779
|
+
* applied to every array element even after the first match has been
|
|
6780
|
+
* found, in order to collect annotations for use by other keywords.
|
|
6781
|
+
* This is to ensure that all possible annotations are collected.
|
|
6782
|
+
*
|
|
6783
|
+
* Logically, the validation result of applying the value subschema to each
|
|
6784
|
+
* item in the array MUST be OR'ed with `false`, resulting in an overall
|
|
6785
|
+
* validation result.
|
|
6786
|
+
*
|
|
6787
|
+
* This keyword produces an annotation value which is an array of the
|
|
6788
|
+
* indexes to which this keyword validates successfully when applying its
|
|
6789
|
+
* subschema, in ascending order. The value MAY be a boolean `true` if
|
|
6790
|
+
* the subschema validates successfully when applied to every index of the
|
|
6791
|
+
* instance. The annotation MUST be present if the instance array to which
|
|
6792
|
+
* this keyword's schema applies is empty.
|
|
6383
6793
|
*/
|
|
6384
6794
|
contains?: JSONSchema<Value, SchemaType>;
|
|
6385
|
-
/**
|
|
6386
|
-
* If the instance value is a string, this property defines that the
|
|
6387
|
-
* string SHOULD be interpreted as binary data and decoded using the
|
|
6388
|
-
* encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the
|
|
6389
|
-
* possible values for this property.
|
|
6390
|
-
*
|
|
6391
|
-
* The value of this property SHOULD be ignored if the instance described
|
|
6392
|
-
* is not a string.
|
|
6393
|
-
*
|
|
6394
|
-
* If this keyword is absent, but `contentMediaType` is present, this
|
|
6395
|
-
* indicates that the media type could be encoded into `UTF-8` like any
|
|
6396
|
-
* other JSON string value, and does not require additional decoding.
|
|
6397
|
-
*
|
|
6398
|
-
* The value of this property MUST be a string.
|
|
6399
|
-
*
|
|
6400
|
-
* [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1
|
|
6795
|
+
/**
|
|
6796
|
+
* If the instance value is a string, this property defines that the
|
|
6797
|
+
* string SHOULD be interpreted as binary data and decoded using the
|
|
6798
|
+
* encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the
|
|
6799
|
+
* possible values for this property.
|
|
6800
|
+
*
|
|
6801
|
+
* The value of this property SHOULD be ignored if the instance described
|
|
6802
|
+
* is not a string.
|
|
6803
|
+
*
|
|
6804
|
+
* If this keyword is absent, but `contentMediaType` is present, this
|
|
6805
|
+
* indicates that the media type could be encoded into `UTF-8` like any
|
|
6806
|
+
* other JSON string value, and does not require additional decoding.
|
|
6807
|
+
*
|
|
6808
|
+
* The value of this property MUST be a string.
|
|
6809
|
+
*
|
|
6810
|
+
* [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1
|
|
6401
6811
|
*/
|
|
6402
6812
|
contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
|
|
6403
|
-
/**
|
|
6404
|
-
* If the instance is a string, this property indicates the media type
|
|
6405
|
-
* of the contents of the string. If `contentEncoding` is present,
|
|
6406
|
-
* this property describes the decoded string.
|
|
6407
|
-
*
|
|
6408
|
-
* The value of this property must be a media type, as defined by
|
|
6409
|
-
* [RFC 2046][RFC2046]. This property defines the media type of instances
|
|
6410
|
-
* which this schema defines.
|
|
6411
|
-
*
|
|
6412
|
-
* The value of this property SHOULD be ignored if the instance described
|
|
6413
|
-
* is not a string.
|
|
6414
|
-
*
|
|
6415
|
-
* If the `contentEncoding` property is not present, but the instance
|
|
6416
|
-
* value is a string, then the value of this property SHOULD specify a text
|
|
6417
|
-
* document type, and the character set SHOULD be the character set into
|
|
6418
|
-
* which the JSON string value was decoded (for which the default is
|
|
6419
|
-
* Unicode).
|
|
6420
|
-
*
|
|
6421
|
-
* [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046
|
|
6813
|
+
/**
|
|
6814
|
+
* If the instance is a string, this property indicates the media type
|
|
6815
|
+
* of the contents of the string. If `contentEncoding` is present,
|
|
6816
|
+
* this property describes the decoded string.
|
|
6817
|
+
*
|
|
6818
|
+
* The value of this property must be a media type, as defined by
|
|
6819
|
+
* [RFC 2046][RFC2046]. This property defines the media type of instances
|
|
6820
|
+
* which this schema defines.
|
|
6821
|
+
*
|
|
6822
|
+
* The value of this property SHOULD be ignored if the instance described
|
|
6823
|
+
* is not a string.
|
|
6824
|
+
*
|
|
6825
|
+
* If the `contentEncoding` property is not present, but the instance
|
|
6826
|
+
* value is a string, then the value of this property SHOULD specify a text
|
|
6827
|
+
* document type, and the character set SHOULD be the character set into
|
|
6828
|
+
* which the JSON string value was decoded (for which the default is
|
|
6829
|
+
* Unicode).
|
|
6830
|
+
*
|
|
6831
|
+
* [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046
|
|
6422
6832
|
*/
|
|
6423
6833
|
contentMediaType?: string;
|
|
6424
|
-
/**
|
|
6425
|
-
* If the instance is a string, and if `contentMediaType` is present,
|
|
6426
|
-
* this property contains a schema which describes the structure of the
|
|
6427
|
-
* string.
|
|
6428
|
-
*
|
|
6429
|
-
* This keyword MAY be used with any media type that can be mapped into
|
|
6430
|
-
* JSON Schema's data model.
|
|
6431
|
-
*
|
|
6432
|
-
* The value of this property MUST be a valid JSON schema. It SHOULD be
|
|
6433
|
-
* ignored if `contentMediaType` is not present.
|
|
6834
|
+
/**
|
|
6835
|
+
* If the instance is a string, and if `contentMediaType` is present,
|
|
6836
|
+
* this property contains a schema which describes the structure of the
|
|
6837
|
+
* string.
|
|
6838
|
+
*
|
|
6839
|
+
* This keyword MAY be used with any media type that can be mapped into
|
|
6840
|
+
* JSON Schema's data model.
|
|
6841
|
+
*
|
|
6842
|
+
* The value of this property MUST be a valid JSON schema. It SHOULD be
|
|
6843
|
+
* ignored if `contentMediaType` is not present.
|
|
6434
6844
|
*/
|
|
6435
6845
|
contentSchema?: JSONSchema<Value, SchemaType>;
|
|
6436
|
-
/**
|
|
6437
|
-
* This keyword can be used to supply a default JSON value associated with
|
|
6438
|
-
* a particular schema. It is RECOMMENDED that a `default` value be valid
|
|
6439
|
-
* against the associated schema.
|
|
6846
|
+
/**
|
|
6847
|
+
* This keyword can be used to supply a default JSON value associated with
|
|
6848
|
+
* a particular schema. It is RECOMMENDED that a `default` value be valid
|
|
6849
|
+
* against the associated schema.
|
|
6440
6850
|
*/
|
|
6441
6851
|
default?: Value;
|
|
6442
|
-
/**
|
|
6443
|
-
* @deprecated `definitions` has been renamed to `$defs`.
|
|
6852
|
+
/**
|
|
6853
|
+
* @deprecated `definitions` has been renamed to `$defs`.
|
|
6444
6854
|
*/
|
|
6445
6855
|
definitions?: Record<string, JSONSchema>;
|
|
6446
|
-
/**
|
|
6447
|
-
* @deprecated `dependencies` has been split into two keywords:
|
|
6448
|
-
* `dependentSchemas` and `dependentRequired`.
|
|
6856
|
+
/**
|
|
6857
|
+
* @deprecated `dependencies` has been split into two keywords:
|
|
6858
|
+
* `dependentSchemas` and `dependentRequired`.
|
|
6449
6859
|
*/
|
|
6450
6860
|
dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>;
|
|
6451
|
-
/**
|
|
6452
|
-
* The value of this keyword MUST be an object. Properties in
|
|
6453
|
-
* this object, if any, MUST be arrays. Elements in each array,
|
|
6454
|
-
* if any, MUST be strings, and MUST be unique.
|
|
6455
|
-
*
|
|
6456
|
-
* This keyword specifies properties that are required if a specific
|
|
6457
|
-
* other property is present. Their requirement is dependent on the
|
|
6458
|
-
* presence of the other property.
|
|
6459
|
-
*
|
|
6460
|
-
* Validation succeeds if, for each name that appears in both
|
|
6461
|
-
* the instance and as a name within this keyword's value, every
|
|
6462
|
-
* item in the corresponding array is also the name of a property
|
|
6463
|
-
* in the instance.
|
|
6464
|
-
*
|
|
6465
|
-
* Omitting this keyword has the same behavior as an empty object.
|
|
6861
|
+
/**
|
|
6862
|
+
* The value of this keyword MUST be an object. Properties in
|
|
6863
|
+
* this object, if any, MUST be arrays. Elements in each array,
|
|
6864
|
+
* if any, MUST be strings, and MUST be unique.
|
|
6865
|
+
*
|
|
6866
|
+
* This keyword specifies properties that are required if a specific
|
|
6867
|
+
* other property is present. Their requirement is dependent on the
|
|
6868
|
+
* presence of the other property.
|
|
6869
|
+
*
|
|
6870
|
+
* Validation succeeds if, for each name that appears in both
|
|
6871
|
+
* the instance and as a name within this keyword's value, every
|
|
6872
|
+
* item in the corresponding array is also the name of a property
|
|
6873
|
+
* in the instance.
|
|
6874
|
+
*
|
|
6875
|
+
* Omitting this keyword has the same behavior as an empty object.
|
|
6466
6876
|
*/
|
|
6467
6877
|
dependentRequired?: Record<string, MaybeReadonlyArray<string>>;
|
|
6468
|
-
/**
|
|
6469
|
-
* This keyword specifies subschemas that are evaluated if the instance is
|
|
6470
|
-
* an object and contains a certain property.
|
|
6471
|
-
*
|
|
6472
|
-
* This keyword's value MUST be an object. Each value in the object MUST be
|
|
6473
|
-
* a valid JSON Schema.
|
|
6474
|
-
*
|
|
6475
|
-
* If the object key is a property in the instance, the entire instance
|
|
6476
|
-
* must validate against the subschema. Its use is dependent on the
|
|
6477
|
-
* presence of the property.
|
|
6478
|
-
*
|
|
6479
|
-
* Omitting this keyword has the same behavior as an empty object.
|
|
6878
|
+
/**
|
|
6879
|
+
* This keyword specifies subschemas that are evaluated if the instance is
|
|
6880
|
+
* an object and contains a certain property.
|
|
6881
|
+
*
|
|
6882
|
+
* This keyword's value MUST be an object. Each value in the object MUST be
|
|
6883
|
+
* a valid JSON Schema.
|
|
6884
|
+
*
|
|
6885
|
+
* If the object key is a property in the instance, the entire instance
|
|
6886
|
+
* must validate against the subschema. Its use is dependent on the
|
|
6887
|
+
* presence of the property.
|
|
6888
|
+
*
|
|
6889
|
+
* Omitting this keyword has the same behavior as an empty object.
|
|
6480
6890
|
*/
|
|
6481
6891
|
dependentSchemas?: Record<string, JSONSchema>;
|
|
6482
|
-
/**
|
|
6483
|
-
* The value of this keyword MUST be a boolean. When multiple occurrences
|
|
6484
|
-
* of this keyword are applicable to a single sub-instance, applications
|
|
6485
|
-
* SHOULD consider the instance location to be deprecated if any occurrence
|
|
6486
|
-
* specifies a `true` value.
|
|
6487
|
-
*
|
|
6488
|
-
* If `deprecated` has a value of boolean `true`, it indicates that
|
|
6489
|
-
* applications SHOULD refrain from usage of the declared property. It MAY
|
|
6490
|
-
* mean the property is going to be removed in the future.
|
|
6491
|
-
*
|
|
6492
|
-
* A root schema containing `deprecated` with a value of `true`
|
|
6493
|
-
* indicates that the entire resource being described MAY be removed in the
|
|
6494
|
-
* future.
|
|
6495
|
-
*
|
|
6496
|
-
* The `deprecated` keyword applies to each instance location to which
|
|
6497
|
-
* the schema object containing the keyword successfully applies. This can
|
|
6498
|
-
* result in scenarios where every array item or object property is
|
|
6499
|
-
* deprecated even though the containing array or object is not.
|
|
6500
|
-
*
|
|
6501
|
-
* Omitting this keyword has the same behavior as a value of `false`.
|
|
6892
|
+
/**
|
|
6893
|
+
* The value of this keyword MUST be a boolean. When multiple occurrences
|
|
6894
|
+
* of this keyword are applicable to a single sub-instance, applications
|
|
6895
|
+
* SHOULD consider the instance location to be deprecated if any occurrence
|
|
6896
|
+
* specifies a `true` value.
|
|
6897
|
+
*
|
|
6898
|
+
* If `deprecated` has a value of boolean `true`, it indicates that
|
|
6899
|
+
* applications SHOULD refrain from usage of the declared property. It MAY
|
|
6900
|
+
* mean the property is going to be removed in the future.
|
|
6901
|
+
*
|
|
6902
|
+
* A root schema containing `deprecated` with a value of `true`
|
|
6903
|
+
* indicates that the entire resource being described MAY be removed in the
|
|
6904
|
+
* future.
|
|
6905
|
+
*
|
|
6906
|
+
* The `deprecated` keyword applies to each instance location to which
|
|
6907
|
+
* the schema object containing the keyword successfully applies. This can
|
|
6908
|
+
* result in scenarios where every array item or object property is
|
|
6909
|
+
* deprecated even though the containing array or object is not.
|
|
6910
|
+
*
|
|
6911
|
+
* Omitting this keyword has the same behavior as a value of `false`.
|
|
6502
6912
|
*/
|
|
6503
6913
|
deprecated?: boolean;
|
|
6504
|
-
/**
|
|
6505
|
-
* Can be used to decorate a user interface with explanation or information
|
|
6506
|
-
* about the data produced.
|
|
6914
|
+
/**
|
|
6915
|
+
* Can be used to decorate a user interface with explanation or information
|
|
6916
|
+
* about the data produced.
|
|
6507
6917
|
*/
|
|
6508
6918
|
description?: string;
|
|
6509
|
-
/**
|
|
6510
|
-
* This keyword's value MUST be a valid JSON Schema.
|
|
6511
|
-
*
|
|
6512
|
-
* When `if` is present, and the instance fails to validate against its
|
|
6513
|
-
* subschema, then validation succeeds against this keyword if the instance
|
|
6514
|
-
* successfully validates against this keyword's subschema.
|
|
6515
|
-
*
|
|
6516
|
-
* This keyword has no effect when `if` is absent, or when the instance
|
|
6517
|
-
* successfully validates against its subschema. Implementations MUST NOT
|
|
6518
|
-
* evaluate the instance against this keyword, for either validation or
|
|
6519
|
-
* annotation collection purposes, in such cases.
|
|
6919
|
+
/**
|
|
6920
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
6921
|
+
*
|
|
6922
|
+
* When `if` is present, and the instance fails to validate against its
|
|
6923
|
+
* subschema, then validation succeeds against this keyword if the instance
|
|
6924
|
+
* successfully validates against this keyword's subschema.
|
|
6925
|
+
*
|
|
6926
|
+
* This keyword has no effect when `if` is absent, or when the instance
|
|
6927
|
+
* successfully validates against its subschema. Implementations MUST NOT
|
|
6928
|
+
* evaluate the instance against this keyword, for either validation or
|
|
6929
|
+
* annotation collection purposes, in such cases.
|
|
6520
6930
|
*/
|
|
6521
6931
|
else?: JSONSchema<Value, SchemaType>;
|
|
6522
|
-
/**
|
|
6523
|
-
* The value of this keyword MUST be an array. This array SHOULD have at
|
|
6524
|
-
* least one element. Elements in the array SHOULD be unique.
|
|
6525
|
-
*
|
|
6526
|
-
* An instance validates successfully against this keyword if its value is
|
|
6527
|
-
* equal to one of the elements in this keyword's array value.
|
|
6528
|
-
*
|
|
6529
|
-
* Elements in the array might be of any type, including `null`.
|
|
6932
|
+
/**
|
|
6933
|
+
* The value of this keyword MUST be an array. This array SHOULD have at
|
|
6934
|
+
* least one element. Elements in the array SHOULD be unique.
|
|
6935
|
+
*
|
|
6936
|
+
* An instance validates successfully against this keyword if its value is
|
|
6937
|
+
* equal to one of the elements in this keyword's array value.
|
|
6938
|
+
*
|
|
6939
|
+
* Elements in the array might be of any type, including `null`.
|
|
6530
6940
|
*/
|
|
6531
6941
|
enum?: MaybeReadonlyArray<Value>;
|
|
6532
|
-
/**
|
|
6533
|
-
* The value of this keyword MUST be an array. When multiple occurrences of
|
|
6534
|
-
* this keyword are applicable to a single sub-instance, implementations
|
|
6535
|
-
* MUST provide a flat array of all values rather than an array of arrays.
|
|
6536
|
-
*
|
|
6537
|
-
* This keyword can be used to provide sample JSON values associated with a
|
|
6538
|
-
* particular schema, for the purpose of illustrating usage. It is
|
|
6539
|
-
* RECOMMENDED that these values be valid against the associated schema.
|
|
6540
|
-
*
|
|
6541
|
-
* Implementations MAY use the value(s) of `default`, if present, as an
|
|
6542
|
-
* additional example. If `examples` is absent, `default` MAY still be
|
|
6543
|
-
* used in this manner.
|
|
6942
|
+
/**
|
|
6943
|
+
* The value of this keyword MUST be an array. When multiple occurrences of
|
|
6944
|
+
* this keyword are applicable to a single sub-instance, implementations
|
|
6945
|
+
* MUST provide a flat array of all values rather than an array of arrays.
|
|
6946
|
+
*
|
|
6947
|
+
* This keyword can be used to provide sample JSON values associated with a
|
|
6948
|
+
* particular schema, for the purpose of illustrating usage. It is
|
|
6949
|
+
* RECOMMENDED that these values be valid against the associated schema.
|
|
6950
|
+
*
|
|
6951
|
+
* Implementations MAY use the value(s) of `default`, if present, as an
|
|
6952
|
+
* additional example. If `examples` is absent, `default` MAY still be
|
|
6953
|
+
* used in this manner.
|
|
6544
6954
|
*/
|
|
6545
6955
|
examples?: MaybeReadonlyArray<Value>;
|
|
6546
|
-
/**
|
|
6547
|
-
* The value of `exclusiveMaximum` MUST be a number, representing an
|
|
6548
|
-
* exclusive upper limit for a numeric instance.
|
|
6549
|
-
*
|
|
6550
|
-
* If the instance is a number, then the instance is valid only if it has a
|
|
6551
|
-
* value strictly less than (not equal to) `exclusiveMaximum`.
|
|
6956
|
+
/**
|
|
6957
|
+
* The value of `exclusiveMaximum` MUST be a number, representing an
|
|
6958
|
+
* exclusive upper limit for a numeric instance.
|
|
6959
|
+
*
|
|
6960
|
+
* If the instance is a number, then the instance is valid only if it has a
|
|
6961
|
+
* value strictly less than (not equal to) `exclusiveMaximum`.
|
|
6552
6962
|
*/
|
|
6553
6963
|
exclusiveMaximum?: number;
|
|
6554
|
-
/**
|
|
6555
|
-
* The value of `exclusiveMinimum` MUST be a number, representing an
|
|
6556
|
-
* exclusive lower limit for a numeric instance.
|
|
6557
|
-
*
|
|
6558
|
-
* If the instance is a number, then the instance is valid only if it has a
|
|
6559
|
-
* value strictly greater than (not equal to) `exclusiveMinimum`.
|
|
6964
|
+
/**
|
|
6965
|
+
* The value of `exclusiveMinimum` MUST be a number, representing an
|
|
6966
|
+
* exclusive lower limit for a numeric instance.
|
|
6967
|
+
*
|
|
6968
|
+
* If the instance is a number, then the instance is valid only if it has a
|
|
6969
|
+
* value strictly greater than (not equal to) `exclusiveMinimum`.
|
|
6560
6970
|
*/
|
|
6561
6971
|
exclusiveMinimum?: number;
|
|
6562
|
-
/**
|
|
6563
|
-
* Implementations MAY treat `format` as an assertion in addition to an
|
|
6564
|
-
* annotation, and attempt to validate the value's conformance to the
|
|
6565
|
-
* specified semantics.
|
|
6566
|
-
*
|
|
6567
|
-
* The value of this keyword is called a format attribute. It MUST be a
|
|
6568
|
-
* string. A format attribute can generally only validate a given set
|
|
6569
|
-
* of instance types. If the type of the instance to validate is not in
|
|
6570
|
-
* this set, validation for this format attribute and instance SHOULD
|
|
6571
|
-
* succeed. Format attributes are most often applied to strings, but can
|
|
6572
|
-
* be specified to apply to any type.
|
|
6573
|
-
*
|
|
6574
|
-
* Implementations MAY support custom format attributes. Save for agreement
|
|
6575
|
-
* between parties, schema authors SHALL NOT expect a peer implementation
|
|
6576
|
-
* to support such custom format attributes. An implementation MUST NOT
|
|
6577
|
-
* fail validation or cease processing due to an unknown format attribute.
|
|
6578
|
-
* When treating `format` as an annotation, implementations SHOULD
|
|
6579
|
-
* collect both known and unknown format attribute values.
|
|
6972
|
+
/**
|
|
6973
|
+
* Implementations MAY treat `format` as an assertion in addition to an
|
|
6974
|
+
* annotation, and attempt to validate the value's conformance to the
|
|
6975
|
+
* specified semantics.
|
|
6976
|
+
*
|
|
6977
|
+
* The value of this keyword is called a format attribute. It MUST be a
|
|
6978
|
+
* string. A format attribute can generally only validate a given set
|
|
6979
|
+
* of instance types. If the type of the instance to validate is not in
|
|
6980
|
+
* this set, validation for this format attribute and instance SHOULD
|
|
6981
|
+
* succeed. Format attributes are most often applied to strings, but can
|
|
6982
|
+
* be specified to apply to any type.
|
|
6983
|
+
*
|
|
6984
|
+
* Implementations MAY support custom format attributes. Save for agreement
|
|
6985
|
+
* between parties, schema authors SHALL NOT expect a peer implementation
|
|
6986
|
+
* to support such custom format attributes. An implementation MUST NOT
|
|
6987
|
+
* fail validation or cease processing due to an unknown format attribute.
|
|
6988
|
+
* When treating `format` as an annotation, implementations SHOULD
|
|
6989
|
+
* collect both known and unknown format attribute values.
|
|
6580
6990
|
*/
|
|
6581
6991
|
format?: string;
|
|
6582
|
-
/**
|
|
6583
|
-
* This keyword's value MUST be a valid JSON Schema.
|
|
6584
|
-
*
|
|
6585
|
-
* This validation outcome of this keyword's subschema has no direct effect
|
|
6586
|
-
* on the overall validation result. Rather, it controls which of the
|
|
6587
|
-
* `then` or `else` keywords are evaluated.
|
|
6588
|
-
*
|
|
6589
|
-
* Instances that successfully validate against this keyword's subschema
|
|
6590
|
-
* MUST also be valid against the subschema value of the `then` keyword,
|
|
6591
|
-
* if present.
|
|
6592
|
-
*
|
|
6593
|
-
* Instances that fail to validate against this keyword's subschema MUST
|
|
6594
|
-
* also be valid against the subschema value of the `else` keyword, if
|
|
6595
|
-
* present.
|
|
6596
|
-
*
|
|
6597
|
-
* If annotations are being collected, they are collected
|
|
6598
|
-
* from this keyword's subschema in the usual way, including when the
|
|
6599
|
-
* keyword is present without either `then` or `else`.
|
|
6992
|
+
/**
|
|
6993
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
6994
|
+
*
|
|
6995
|
+
* This validation outcome of this keyword's subschema has no direct effect
|
|
6996
|
+
* on the overall validation result. Rather, it controls which of the
|
|
6997
|
+
* `then` or `else` keywords are evaluated.
|
|
6998
|
+
*
|
|
6999
|
+
* Instances that successfully validate against this keyword's subschema
|
|
7000
|
+
* MUST also be valid against the subschema value of the `then` keyword,
|
|
7001
|
+
* if present.
|
|
7002
|
+
*
|
|
7003
|
+
* Instances that fail to validate against this keyword's subschema MUST
|
|
7004
|
+
* also be valid against the subschema value of the `else` keyword, if
|
|
7005
|
+
* present.
|
|
7006
|
+
*
|
|
7007
|
+
* If annotations are being collected, they are collected
|
|
7008
|
+
* from this keyword's subschema in the usual way, including when the
|
|
7009
|
+
* keyword is present without either `then` or `else`.
|
|
6600
7010
|
*/
|
|
6601
7011
|
if?: JSONSchema<Value, SchemaType>;
|
|
6602
|
-
/**
|
|
6603
|
-
* The value of `items` MUST be a valid JSON Schema.
|
|
6604
|
-
*
|
|
6605
|
-
* This keyword applies its subschema to all instance elements at indexes
|
|
6606
|
-
* greater than the length of the `prefixItems` array in the same schema
|
|
6607
|
-
* object, as reported by the annotation result of that `prefixItems`
|
|
6608
|
-
* keyword. If no such annotation result exists, `items` applies its
|
|
6609
|
-
* subschema to all instance array elements.
|
|
6610
|
-
*
|
|
6611
|
-
* Note that the behavior of `items` without `prefixItems` is identical
|
|
6612
|
-
* to that of the schema form of `items` in prior drafts.
|
|
6613
|
-
*
|
|
6614
|
-
* When `prefixItems` is present, the behavior of `items` is identical
|
|
6615
|
-
* to the former `additionalItems` keyword.
|
|
6616
|
-
*
|
|
6617
|
-
* If the `items` subschema is applied to any positions within the
|
|
6618
|
-
* instance array, it produces an annotation result of boolean `true`,
|
|
6619
|
-
* indicating that all remaining array elements have been evaluated against
|
|
6620
|
-
* this keyword's subschema.
|
|
6621
|
-
*
|
|
6622
|
-
* Omitting this keyword has the same assertion behavior as an empty
|
|
6623
|
-
* schema.
|
|
6624
|
-
*
|
|
6625
|
-
* Implementations MAY choose to implement or optimize this keyword
|
|
6626
|
-
* in another way that produces the same effect, such as by directly
|
|
6627
|
-
* checking for the presence and size of a `prefixItems` array.
|
|
7012
|
+
/**
|
|
7013
|
+
* The value of `items` MUST be a valid JSON Schema.
|
|
7014
|
+
*
|
|
7015
|
+
* This keyword applies its subschema to all instance elements at indexes
|
|
7016
|
+
* greater than the length of the `prefixItems` array in the same schema
|
|
7017
|
+
* object, as reported by the annotation result of that `prefixItems`
|
|
7018
|
+
* keyword. If no such annotation result exists, `items` applies its
|
|
7019
|
+
* subschema to all instance array elements.
|
|
7020
|
+
*
|
|
7021
|
+
* Note that the behavior of `items` without `prefixItems` is identical
|
|
7022
|
+
* to that of the schema form of `items` in prior drafts.
|
|
7023
|
+
*
|
|
7024
|
+
* When `prefixItems` is present, the behavior of `items` is identical
|
|
7025
|
+
* to the former `additionalItems` keyword.
|
|
7026
|
+
*
|
|
7027
|
+
* If the `items` subschema is applied to any positions within the
|
|
7028
|
+
* instance array, it produces an annotation result of boolean `true`,
|
|
7029
|
+
* indicating that all remaining array elements have been evaluated against
|
|
7030
|
+
* this keyword's subschema.
|
|
7031
|
+
*
|
|
7032
|
+
* Omitting this keyword has the same assertion behavior as an empty
|
|
7033
|
+
* schema.
|
|
7034
|
+
*
|
|
7035
|
+
* Implementations MAY choose to implement or optimize this keyword
|
|
7036
|
+
* in another way that produces the same effect, such as by directly
|
|
7037
|
+
* checking for the presence and size of a `prefixItems` array.
|
|
6628
7038
|
*/
|
|
6629
7039
|
items?: JSONSchema;
|
|
6630
|
-
/**
|
|
6631
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6632
|
-
*
|
|
6633
|
-
* If `contains` is not present within the same schema object, then this
|
|
6634
|
-
* keyword has no effect.
|
|
6635
|
-
*
|
|
6636
|
-
* An instance array is valid against `maxContains` in two ways,
|
|
6637
|
-
* depending on the form of the annotation result of an adjacent
|
|
6638
|
-
* `contains` keyword. The first way is if the annotation result is an
|
|
6639
|
-
* array and the length of that array is less than or equal to the
|
|
6640
|
-
* `maxContains` value. The second way is if the annotation result is a
|
|
6641
|
-
* boolean `true` and the instance array length is less than or equal to
|
|
6642
|
-
* the `maxContains` value.
|
|
7040
|
+
/**
|
|
7041
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7042
|
+
*
|
|
7043
|
+
* If `contains` is not present within the same schema object, then this
|
|
7044
|
+
* keyword has no effect.
|
|
7045
|
+
*
|
|
7046
|
+
* An instance array is valid against `maxContains` in two ways,
|
|
7047
|
+
* depending on the form of the annotation result of an adjacent
|
|
7048
|
+
* `contains` keyword. The first way is if the annotation result is an
|
|
7049
|
+
* array and the length of that array is less than or equal to the
|
|
7050
|
+
* `maxContains` value. The second way is if the annotation result is a
|
|
7051
|
+
* boolean `true` and the instance array length is less than or equal to
|
|
7052
|
+
* the `maxContains` value.
|
|
6643
7053
|
*/
|
|
6644
7054
|
maxContains?: number;
|
|
6645
|
-
/**
|
|
6646
|
-
* The value of `maximum` MUST be a number, representing an inclusive
|
|
6647
|
-
* upper limit for a numeric instance.
|
|
6648
|
-
*
|
|
6649
|
-
* If the instance is a number, then this keyword validates only if the
|
|
6650
|
-
* instance is less than or exactly equal to `maximum`.
|
|
7055
|
+
/**
|
|
7056
|
+
* The value of `maximum` MUST be a number, representing an inclusive
|
|
7057
|
+
* upper limit for a numeric instance.
|
|
7058
|
+
*
|
|
7059
|
+
* If the instance is a number, then this keyword validates only if the
|
|
7060
|
+
* instance is less than or exactly equal to `maximum`.
|
|
6651
7061
|
*/
|
|
6652
7062
|
maximum?: number;
|
|
6653
|
-
/**
|
|
6654
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6655
|
-
*
|
|
6656
|
-
* An array instance is valid against `maxItems` if its size is less
|
|
6657
|
-
* than, or equal to, the value of this keyword.
|
|
6658
|
-
*
|
|
6659
|
-
* @minimum 0
|
|
7063
|
+
/**
|
|
7064
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7065
|
+
*
|
|
7066
|
+
* An array instance is valid against `maxItems` if its size is less
|
|
7067
|
+
* than, or equal to, the value of this keyword.
|
|
7068
|
+
*
|
|
7069
|
+
* @minimum 0
|
|
6660
7070
|
*/
|
|
6661
7071
|
maxItems?: number;
|
|
6662
|
-
/**
|
|
6663
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6664
|
-
*
|
|
6665
|
-
* A string instance is valid against this keyword if its length is less
|
|
6666
|
-
* than, or equal to, the value of this keyword.
|
|
6667
|
-
*
|
|
6668
|
-
* The length of a string instance is defined as the number of its
|
|
6669
|
-
* characters as defined by [RFC 8259][RFC8259].
|
|
6670
|
-
*
|
|
6671
|
-
* [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259
|
|
6672
|
-
*
|
|
6673
|
-
* @minimum 0
|
|
7072
|
+
/**
|
|
7073
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7074
|
+
*
|
|
7075
|
+
* A string instance is valid against this keyword if its length is less
|
|
7076
|
+
* than, or equal to, the value of this keyword.
|
|
7077
|
+
*
|
|
7078
|
+
* The length of a string instance is defined as the number of its
|
|
7079
|
+
* characters as defined by [RFC 8259][RFC8259].
|
|
7080
|
+
*
|
|
7081
|
+
* [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259
|
|
7082
|
+
*
|
|
7083
|
+
* @minimum 0
|
|
6674
7084
|
*/
|
|
6675
7085
|
maxLength?: number;
|
|
6676
|
-
/**
|
|
6677
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6678
|
-
*
|
|
6679
|
-
* An object instance is valid against `maxProperties` if its number of
|
|
6680
|
-
* `properties` is less than, or equal to, the value of this keyword.
|
|
6681
|
-
*
|
|
6682
|
-
* @minimum 0
|
|
7086
|
+
/**
|
|
7087
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7088
|
+
*
|
|
7089
|
+
* An object instance is valid against `maxProperties` if its number of
|
|
7090
|
+
* `properties` is less than, or equal to, the value of this keyword.
|
|
7091
|
+
*
|
|
7092
|
+
* @minimum 0
|
|
6683
7093
|
*/
|
|
6684
7094
|
maxProperties?: number;
|
|
6685
|
-
/**
|
|
6686
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6687
|
-
*
|
|
6688
|
-
* If `contains` is not present within the same schema object, then this
|
|
6689
|
-
* keyword has no effect.
|
|
6690
|
-
*
|
|
6691
|
-
* An instance array is valid against `minContains` in two ways,
|
|
6692
|
-
* depending on the form of the annotation result of an adjacent
|
|
6693
|
-
* `contains` keyword. The first way is if the annotation result is an
|
|
6694
|
-
* array and the length of that array is greater than or equal to the
|
|
6695
|
-
* `minContains` value. The second way is if the annotation result is a
|
|
6696
|
-
* boolean `true` and the instance array length is greater than or equal
|
|
6697
|
-
* to the `minContains` value.
|
|
6698
|
-
*
|
|
6699
|
-
* A value of `0` is allowed, but is only useful for setting a range
|
|
6700
|
-
* of occurrences from `0` to the value of `maxContains`. A value of
|
|
6701
|
-
* `0` with no `maxContains` causes `contains` to always pass
|
|
6702
|
-
* validation.
|
|
6703
|
-
*
|
|
6704
|
-
* Omitting this keyword has the same behavior as a value of `1`.
|
|
6705
|
-
*
|
|
6706
|
-
* @default 1
|
|
7095
|
+
/**
|
|
7096
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7097
|
+
*
|
|
7098
|
+
* If `contains` is not present within the same schema object, then this
|
|
7099
|
+
* keyword has no effect.
|
|
7100
|
+
*
|
|
7101
|
+
* An instance array is valid against `minContains` in two ways,
|
|
7102
|
+
* depending on the form of the annotation result of an adjacent
|
|
7103
|
+
* `contains` keyword. The first way is if the annotation result is an
|
|
7104
|
+
* array and the length of that array is greater than or equal to the
|
|
7105
|
+
* `minContains` value. The second way is if the annotation result is a
|
|
7106
|
+
* boolean `true` and the instance array length is greater than or equal
|
|
7107
|
+
* to the `minContains` value.
|
|
7108
|
+
*
|
|
7109
|
+
* A value of `0` is allowed, but is only useful for setting a range
|
|
7110
|
+
* of occurrences from `0` to the value of `maxContains`. A value of
|
|
7111
|
+
* `0` with no `maxContains` causes `contains` to always pass
|
|
7112
|
+
* validation.
|
|
7113
|
+
*
|
|
7114
|
+
* Omitting this keyword has the same behavior as a value of `1`.
|
|
7115
|
+
*
|
|
7116
|
+
* @default 1
|
|
6707
7117
|
*/
|
|
6708
7118
|
minContains?: number;
|
|
6709
|
-
/**
|
|
6710
|
-
* The value of `minimum` MUST be a number, representing an inclusive
|
|
6711
|
-
* lower limit for a numeric instance.
|
|
6712
|
-
*
|
|
6713
|
-
* If the instance is a number, then this keyword validates only if the
|
|
6714
|
-
* instance is greater than or exactly equal to `minimum`.
|
|
7119
|
+
/**
|
|
7120
|
+
* The value of `minimum` MUST be a number, representing an inclusive
|
|
7121
|
+
* lower limit for a numeric instance.
|
|
7122
|
+
*
|
|
7123
|
+
* If the instance is a number, then this keyword validates only if the
|
|
7124
|
+
* instance is greater than or exactly equal to `minimum`.
|
|
6715
7125
|
*/
|
|
6716
7126
|
minimum?: number;
|
|
6717
|
-
/**
|
|
6718
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6719
|
-
*
|
|
6720
|
-
* An array instance is valid against `minItems` if its size is greater
|
|
6721
|
-
* than, or equal to, the value of this keyword.
|
|
6722
|
-
*
|
|
6723
|
-
* Omitting this keyword has the same behavior as a value of `0`.
|
|
6724
|
-
*
|
|
6725
|
-
* @default 0
|
|
6726
|
-
* @minimum 0
|
|
7127
|
+
/**
|
|
7128
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7129
|
+
*
|
|
7130
|
+
* An array instance is valid against `minItems` if its size is greater
|
|
7131
|
+
* than, or equal to, the value of this keyword.
|
|
7132
|
+
*
|
|
7133
|
+
* Omitting this keyword has the same behavior as a value of `0`.
|
|
7134
|
+
*
|
|
7135
|
+
* @default 0
|
|
7136
|
+
* @minimum 0
|
|
6727
7137
|
*/
|
|
6728
7138
|
minItems?: number;
|
|
6729
|
-
/**
|
|
6730
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6731
|
-
*
|
|
6732
|
-
* A string instance is valid against this keyword if its length is greater
|
|
6733
|
-
* than, or equal to, the value of this keyword.
|
|
6734
|
-
*
|
|
6735
|
-
* The length of a string instance is defined as the number of its
|
|
6736
|
-
* characters as defined by [RFC 8259][RFC8259].
|
|
6737
|
-
*
|
|
6738
|
-
* Omitting this keyword has the same behavior as a value of `0`.
|
|
6739
|
-
*
|
|
6740
|
-
* [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259
|
|
6741
|
-
*
|
|
6742
|
-
* @default 0
|
|
6743
|
-
* @minimum 0
|
|
7139
|
+
/**
|
|
7140
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7141
|
+
*
|
|
7142
|
+
* A string instance is valid against this keyword if its length is greater
|
|
7143
|
+
* than, or equal to, the value of this keyword.
|
|
7144
|
+
*
|
|
7145
|
+
* The length of a string instance is defined as the number of its
|
|
7146
|
+
* characters as defined by [RFC 8259][RFC8259].
|
|
7147
|
+
*
|
|
7148
|
+
* Omitting this keyword has the same behavior as a value of `0`.
|
|
7149
|
+
*
|
|
7150
|
+
* [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259
|
|
7151
|
+
*
|
|
7152
|
+
* @default 0
|
|
7153
|
+
* @minimum 0
|
|
6744
7154
|
*/
|
|
6745
7155
|
minLength?: number;
|
|
6746
|
-
/**
|
|
6747
|
-
* The value of this keyword MUST be a non-negative integer.
|
|
6748
|
-
*
|
|
6749
|
-
* An object instance is valid against `minProperties` if its number of
|
|
6750
|
-
* `properties` is greater than, or equal to, the value of this keyword.
|
|
6751
|
-
*
|
|
6752
|
-
* Omitting this keyword has the same behavior as a value of `0`.
|
|
6753
|
-
*
|
|
6754
|
-
* @default 0
|
|
6755
|
-
* @minimum 0
|
|
7156
|
+
/**
|
|
7157
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7158
|
+
*
|
|
7159
|
+
* An object instance is valid against `minProperties` if its number of
|
|
7160
|
+
* `properties` is greater than, or equal to, the value of this keyword.
|
|
7161
|
+
*
|
|
7162
|
+
* Omitting this keyword has the same behavior as a value of `0`.
|
|
7163
|
+
*
|
|
7164
|
+
* @default 0
|
|
7165
|
+
* @minimum 0
|
|
6756
7166
|
*/
|
|
6757
7167
|
minProperties?: number;
|
|
6758
|
-
/**
|
|
6759
|
-
* The value of `multipleOf` MUST be a number, strictly greater than
|
|
6760
|
-
* `0`.
|
|
6761
|
-
*
|
|
6762
|
-
* A numeric instance is valid only if division by this keyword's value
|
|
6763
|
-
* results in an integer.
|
|
6764
|
-
*
|
|
6765
|
-
* @exclusiveMinimum 0
|
|
7168
|
+
/**
|
|
7169
|
+
* The value of `multipleOf` MUST be a number, strictly greater than
|
|
7170
|
+
* `0`.
|
|
7171
|
+
*
|
|
7172
|
+
* A numeric instance is valid only if division by this keyword's value
|
|
7173
|
+
* results in an integer.
|
|
7174
|
+
*
|
|
7175
|
+
* @exclusiveMinimum 0
|
|
6766
7176
|
*/
|
|
6767
7177
|
multipleOf?: number;
|
|
6768
|
-
/**
|
|
6769
|
-
* This keyword's value MUST be a valid JSON Schema.
|
|
6770
|
-
*
|
|
6771
|
-
* An instance is valid against this keyword if it fails to validate
|
|
6772
|
-
* successfully against the schema defined by this keyword.
|
|
7178
|
+
/**
|
|
7179
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
7180
|
+
*
|
|
7181
|
+
* An instance is valid against this keyword if it fails to validate
|
|
7182
|
+
* successfully against the schema defined by this keyword.
|
|
6773
7183
|
*/
|
|
6774
7184
|
not?: JSONSchema<Value, SchemaType>;
|
|
6775
|
-
/**
|
|
6776
|
-
* This keyword's value MUST be a non-empty array. Each item of the array
|
|
6777
|
-
* MUST be a valid JSON Schema.
|
|
6778
|
-
*
|
|
6779
|
-
* An instance validates successfully against this keyword if it validates
|
|
6780
|
-
* successfully against exactly one schema defined by this keyword's value.
|
|
7185
|
+
/**
|
|
7186
|
+
* This keyword's value MUST be a non-empty array. Each item of the array
|
|
7187
|
+
* MUST be a valid JSON Schema.
|
|
7188
|
+
*
|
|
7189
|
+
* An instance validates successfully against this keyword if it validates
|
|
7190
|
+
* successfully against exactly one schema defined by this keyword's value.
|
|
6781
7191
|
*/
|
|
6782
7192
|
oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;
|
|
6783
|
-
/**
|
|
6784
|
-
* The value of this keyword MUST be a string. This string SHOULD be a
|
|
6785
|
-
* valid regular expression, according to the [ECMA-262][ecma262] regular
|
|
6786
|
-
* expression dialect.
|
|
6787
|
-
*
|
|
6788
|
-
* A string instance is considered valid if the regular expression matches
|
|
6789
|
-
* the instance successfully. Recall: regular expressions are not
|
|
6790
|
-
* implicitly anchored.
|
|
6791
|
-
*
|
|
6792
|
-
* [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/
|
|
6793
|
-
*
|
|
6794
|
-
* @format "regex"
|
|
7193
|
+
/**
|
|
7194
|
+
* The value of this keyword MUST be a string. This string SHOULD be a
|
|
7195
|
+
* valid regular expression, according to the [ECMA-262][ecma262] regular
|
|
7196
|
+
* expression dialect.
|
|
7197
|
+
*
|
|
7198
|
+
* A string instance is considered valid if the regular expression matches
|
|
7199
|
+
* the instance successfully. Recall: regular expressions are not
|
|
7200
|
+
* implicitly anchored.
|
|
7201
|
+
*
|
|
7202
|
+
* [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/
|
|
7203
|
+
*
|
|
7204
|
+
* @format "regex"
|
|
6795
7205
|
*/
|
|
6796
7206
|
pattern?: string;
|
|
6797
|
-
/**
|
|
6798
|
-
* The value of `patternProperties` MUST be an object. Each property name
|
|
6799
|
-
* of this object SHOULD be a valid regular expression, according to the
|
|
6800
|
-
* [ECMA-262][ecma262] regular expression dialect. Each property value of
|
|
6801
|
-
* this object MUST be a valid JSON Schema.
|
|
6802
|
-
*
|
|
6803
|
-
* Validation succeeds if, for each instance name that matches any regular
|
|
6804
|
-
* expressions that appear as a property name in this keyword's value,
|
|
6805
|
-
* the child instance for that name successfully validates against each
|
|
6806
|
-
* schema that corresponds to a matching regular expression.
|
|
6807
|
-
*
|
|
6808
|
-
* The annotation result of this keyword is the set of instance property
|
|
6809
|
-
* names matched by this keyword. Omitting this keyword has the same
|
|
6810
|
-
* assertion behavior as an empty object.
|
|
6811
|
-
*
|
|
6812
|
-
* [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/
|
|
7207
|
+
/**
|
|
7208
|
+
* The value of `patternProperties` MUST be an object. Each property name
|
|
7209
|
+
* of this object SHOULD be a valid regular expression, according to the
|
|
7210
|
+
* [ECMA-262][ecma262] regular expression dialect. Each property value of
|
|
7211
|
+
* this object MUST be a valid JSON Schema.
|
|
7212
|
+
*
|
|
7213
|
+
* Validation succeeds if, for each instance name that matches any regular
|
|
7214
|
+
* expressions that appear as a property name in this keyword's value,
|
|
7215
|
+
* the child instance for that name successfully validates against each
|
|
7216
|
+
* schema that corresponds to a matching regular expression.
|
|
7217
|
+
*
|
|
7218
|
+
* The annotation result of this keyword is the set of instance property
|
|
7219
|
+
* names matched by this keyword. Omitting this keyword has the same
|
|
7220
|
+
* assertion behavior as an empty object.
|
|
7221
|
+
*
|
|
7222
|
+
* [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/
|
|
6813
7223
|
*/
|
|
6814
7224
|
patternProperties?: Record<string, JSONSchema>;
|
|
6815
|
-
/**
|
|
6816
|
-
* The value of `prefixItems` MUST be a non-empty array of valid JSON
|
|
6817
|
-
* Schemas.
|
|
6818
|
-
*
|
|
6819
|
-
* Validation succeeds if each element of the instance validates against
|
|
6820
|
-
* the schema at the same position, if any. This keyword does not
|
|
6821
|
-
* constrain the length of the array. If the array is longer than this
|
|
6822
|
-
* keyword's value, this keyword validates only the prefix of matching
|
|
6823
|
-
* length.
|
|
6824
|
-
*
|
|
6825
|
-
* This keyword produces an annotation value which is the largest index to
|
|
6826
|
-
* which this keyword applied a subschema. The value MAY be a boolean
|
|
6827
|
-
* `true` if a subschema was applied to every index of the instance, such
|
|
6828
|
-
* as is produced by the `items` keyword.
|
|
6829
|
-
* This annotation affects the behavior of `items` and
|
|
6830
|
-
* `unevaluatedItems`.
|
|
6831
|
-
*
|
|
6832
|
-
* Omitting this keyword has the same assertion behavior as an empty array.
|
|
7225
|
+
/**
|
|
7226
|
+
* The value of `prefixItems` MUST be a non-empty array of valid JSON
|
|
7227
|
+
* Schemas.
|
|
7228
|
+
*
|
|
7229
|
+
* Validation succeeds if each element of the instance validates against
|
|
7230
|
+
* the schema at the same position, if any. This keyword does not
|
|
7231
|
+
* constrain the length of the array. If the array is longer than this
|
|
7232
|
+
* keyword's value, this keyword validates only the prefix of matching
|
|
7233
|
+
* length.
|
|
7234
|
+
*
|
|
7235
|
+
* This keyword produces an annotation value which is the largest index to
|
|
7236
|
+
* which this keyword applied a subschema. The value MAY be a boolean
|
|
7237
|
+
* `true` if a subschema was applied to every index of the instance, such
|
|
7238
|
+
* as is produced by the `items` keyword.
|
|
7239
|
+
* This annotation affects the behavior of `items` and
|
|
7240
|
+
* `unevaluatedItems`.
|
|
7241
|
+
*
|
|
7242
|
+
* Omitting this keyword has the same assertion behavior as an empty array.
|
|
6833
7243
|
*/
|
|
6834
7244
|
prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema;
|
|
6835
|
-
/**
|
|
6836
|
-
* The value of `properties` MUST be an object. Each value of this object
|
|
6837
|
-
* MUST be a valid JSON Schema.
|
|
6838
|
-
*
|
|
6839
|
-
* Validation succeeds if, for each name that appears in both the instance
|
|
6840
|
-
* and as a name within this keyword's value, the child instance for that
|
|
6841
|
-
* name successfully validates against the corresponding schema.
|
|
6842
|
-
*
|
|
6843
|
-
* The annotation result of this keyword is the set of instance property
|
|
6844
|
-
* names matched by this keyword.
|
|
6845
|
-
*
|
|
6846
|
-
* Omitting this keyword has the same assertion behavior as an empty
|
|
6847
|
-
* object.
|
|
7245
|
+
/**
|
|
7246
|
+
* The value of `properties` MUST be an object. Each value of this object
|
|
7247
|
+
* MUST be a valid JSON Schema.
|
|
7248
|
+
*
|
|
7249
|
+
* Validation succeeds if, for each name that appears in both the instance
|
|
7250
|
+
* and as a name within this keyword's value, the child instance for that
|
|
7251
|
+
* name successfully validates against the corresponding schema.
|
|
7252
|
+
*
|
|
7253
|
+
* The annotation result of this keyword is the set of instance property
|
|
7254
|
+
* names matched by this keyword.
|
|
7255
|
+
*
|
|
7256
|
+
* Omitting this keyword has the same assertion behavior as an empty
|
|
7257
|
+
* object.
|
|
6848
7258
|
*/
|
|
6849
7259
|
properties?: Record<string, JSONSchema>;
|
|
6850
|
-
/**
|
|
6851
|
-
* The value of `propertyNames` MUST be a valid JSON Schema.
|
|
6852
|
-
*
|
|
6853
|
-
* If the instance is an object, this keyword validates if every property
|
|
6854
|
-
* name in the instance validates against the provided schema.
|
|
6855
|
-
* Note the property name that the schema is testing will always be a
|
|
6856
|
-
* string.
|
|
6857
|
-
*
|
|
6858
|
-
* Omitting this keyword has the same behavior as an empty schema.
|
|
7260
|
+
/**
|
|
7261
|
+
* The value of `propertyNames` MUST be a valid JSON Schema.
|
|
7262
|
+
*
|
|
7263
|
+
* If the instance is an object, this keyword validates if every property
|
|
7264
|
+
* name in the instance validates against the provided schema.
|
|
7265
|
+
* Note the property name that the schema is testing will always be a
|
|
7266
|
+
* string.
|
|
7267
|
+
*
|
|
7268
|
+
* Omitting this keyword has the same behavior as an empty schema.
|
|
6859
7269
|
*/
|
|
6860
7270
|
propertyNames?: JSONSchema;
|
|
6861
|
-
/**
|
|
6862
|
-
* The value of this keyword MUST be a boolean. When multiple occurrences
|
|
6863
|
-
* of this keyword are applicable to a single sub-instance, the resulting
|
|
6864
|
-
* value MUST be `true` if any occurrence specifies a `true` value, and
|
|
6865
|
-
* MUST be `false` otherwise.
|
|
6866
|
-
*
|
|
6867
|
-
* If `readOnly` has a value of boolean `true`, it indicates that the
|
|
6868
|
-
* value of the instance is managed exclusively by the owning authority,
|
|
6869
|
-
* and attempts by an application to modify the value of this property are
|
|
6870
|
-
* expected to be ignored or rejected by that owning authority.
|
|
6871
|
-
*
|
|
6872
|
-
* An instance document that is marked as `readOnly` for the entire
|
|
6873
|
-
* document MAY be ignored if sent to the owning authority, or MAY result
|
|
6874
|
-
* in an error, at the authority's discretion.
|
|
6875
|
-
*
|
|
6876
|
-
* For example, `readOnly` would be used to mark a database-generated
|
|
6877
|
-
* serial number as read-only.
|
|
6878
|
-
*
|
|
6879
|
-
* This keyword can be used to assist in user interface instance
|
|
6880
|
-
* generation.
|
|
6881
|
-
*
|
|
6882
|
-
* @default false
|
|
7271
|
+
/**
|
|
7272
|
+
* The value of this keyword MUST be a boolean. When multiple occurrences
|
|
7273
|
+
* of this keyword are applicable to a single sub-instance, the resulting
|
|
7274
|
+
* value MUST be `true` if any occurrence specifies a `true` value, and
|
|
7275
|
+
* MUST be `false` otherwise.
|
|
7276
|
+
*
|
|
7277
|
+
* If `readOnly` has a value of boolean `true`, it indicates that the
|
|
7278
|
+
* value of the instance is managed exclusively by the owning authority,
|
|
7279
|
+
* and attempts by an application to modify the value of this property are
|
|
7280
|
+
* expected to be ignored or rejected by that owning authority.
|
|
7281
|
+
*
|
|
7282
|
+
* An instance document that is marked as `readOnly` for the entire
|
|
7283
|
+
* document MAY be ignored if sent to the owning authority, or MAY result
|
|
7284
|
+
* in an error, at the authority's discretion.
|
|
7285
|
+
*
|
|
7286
|
+
* For example, `readOnly` would be used to mark a database-generated
|
|
7287
|
+
* serial number as read-only.
|
|
7288
|
+
*
|
|
7289
|
+
* This keyword can be used to assist in user interface instance
|
|
7290
|
+
* generation.
|
|
7291
|
+
*
|
|
7292
|
+
* @default false
|
|
6883
7293
|
*/
|
|
6884
7294
|
readOnly?: boolean;
|
|
6885
|
-
/**
|
|
6886
|
-
* The value of this keyword MUST be an array. Elements of this array, if
|
|
6887
|
-
* any, MUST be strings, and MUST be unique.
|
|
6888
|
-
*
|
|
6889
|
-
* An object instance is valid against this keyword if every item in the
|
|
6890
|
-
* array is the name of a property in the instance.
|
|
6891
|
-
*
|
|
6892
|
-
* Omitting this keyword has the same behavior as an empty array.
|
|
7295
|
+
/**
|
|
7296
|
+
* The value of this keyword MUST be an array. Elements of this array, if
|
|
7297
|
+
* any, MUST be strings, and MUST be unique.
|
|
7298
|
+
*
|
|
7299
|
+
* An object instance is valid against this keyword if every item in the
|
|
7300
|
+
* array is the name of a property in the instance.
|
|
7301
|
+
*
|
|
7302
|
+
* Omitting this keyword has the same behavior as an empty array.
|
|
6893
7303
|
*/
|
|
6894
7304
|
required?: MaybeReadonlyArray<string>;
|
|
6895
|
-
/**
|
|
6896
|
-
* This keyword's value MUST be a valid JSON Schema.
|
|
6897
|
-
*
|
|
6898
|
-
* When `if` is present, and the instance successfully validates against
|
|
6899
|
-
* its subschema, then validation succeeds against this keyword if the
|
|
6900
|
-
* instance also successfully validates against this keyword's subschema.
|
|
6901
|
-
*
|
|
6902
|
-
* This keyword has no effect when `if` is absent, or when the instance
|
|
6903
|
-
* fails to validate against its subschema. Implementations MUST NOT
|
|
6904
|
-
* evaluate the instance against this keyword, for either validation or
|
|
6905
|
-
* annotation collection purposes, in such cases.
|
|
7305
|
+
/**
|
|
7306
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
7307
|
+
*
|
|
7308
|
+
* When `if` is present, and the instance successfully validates against
|
|
7309
|
+
* its subschema, then validation succeeds against this keyword if the
|
|
7310
|
+
* instance also successfully validates against this keyword's subschema.
|
|
7311
|
+
*
|
|
7312
|
+
* This keyword has no effect when `if` is absent, or when the instance
|
|
7313
|
+
* fails to validate against its subschema. Implementations MUST NOT
|
|
7314
|
+
* evaluate the instance against this keyword, for either validation or
|
|
7315
|
+
* annotation collection purposes, in such cases.
|
|
6906
7316
|
*/
|
|
6907
7317
|
then?: JSONSchema<Value, SchemaType>;
|
|
6908
|
-
/**
|
|
6909
|
-
* Can be used to decorate a user interface with a short label about the
|
|
6910
|
-
* data produced.
|
|
7318
|
+
/**
|
|
7319
|
+
* Can be used to decorate a user interface with a short label about the
|
|
7320
|
+
* data produced.
|
|
6911
7321
|
*/
|
|
6912
7322
|
title?: string;
|
|
6913
|
-
/**
|
|
6914
|
-
* The value of this keyword MUST be either a string or an array. If it is
|
|
6915
|
-
* an array, elements of the array MUST be strings and MUST be unique.
|
|
6916
|
-
*
|
|
6917
|
-
* String values MUST be one of the six primitive types (`"null"`,
|
|
6918
|
-
* `"boolean"`, `"object"`, `"array"`, `"number"`, or
|
|
6919
|
-
* `"string"`), or `"integer"` which matches any number with a zero
|
|
6920
|
-
* fractional part.
|
|
6921
|
-
*
|
|
6922
|
-
* An instance validates if and only if the instance is in any of the sets
|
|
6923
|
-
* listed for this keyword.
|
|
7323
|
+
/**
|
|
7324
|
+
* The value of this keyword MUST be either a string or an array. If it is
|
|
7325
|
+
* an array, elements of the array MUST be strings and MUST be unique.
|
|
7326
|
+
*
|
|
7327
|
+
* String values MUST be one of the six primitive types (`"null"`,
|
|
7328
|
+
* `"boolean"`, `"object"`, `"array"`, `"number"`, or
|
|
7329
|
+
* `"string"`), or `"integer"` which matches any number with a zero
|
|
7330
|
+
* fractional part.
|
|
7331
|
+
*
|
|
7332
|
+
* An instance validates if and only if the instance is in any of the sets
|
|
7333
|
+
* listed for this keyword.
|
|
6924
7334
|
*/
|
|
6925
7335
|
type?: SchemaType;
|
|
6926
|
-
/**
|
|
6927
|
-
* The value of `unevaluatedItems` MUST be a valid JSON Schema.
|
|
6928
|
-
*
|
|
6929
|
-
* The behavior of this keyword depends on the annotation results of
|
|
6930
|
-
* adjacent keywords that apply to the instance location being validated.
|
|
6931
|
-
* Specifically, the annotations from `prefixItems`, `items`, and
|
|
6932
|
-
* `contains`, which can come from those keywords when they are adjacent
|
|
6933
|
-
* to the `unevaluatedItems` keyword. Those three annotations, as well as
|
|
6934
|
-
* `unevaluatedItems`, can also result from any and all adjacent
|
|
6935
|
-
* [in-place applicator][in-place-applicator] keywords.
|
|
6936
|
-
*
|
|
6937
|
-
* If no relevant annotations are present, the `unevaluatedItems`
|
|
6938
|
-
* subschema MUST be applied to all locations in the array.
|
|
6939
|
-
* If a boolean `true` value is present from any of the relevant
|
|
6940
|
-
* annotations, `unevaluatedItems` MUST be ignored. Otherwise, the
|
|
6941
|
-
* subschema MUST be applied to any index greater than the largest
|
|
6942
|
-
* annotation value for `prefixItems`, which does not appear in any
|
|
6943
|
-
* annotation value for `contains`.
|
|
6944
|
-
*
|
|
6945
|
-
* This means that `prefixItems`, `items`, `contains`, and all
|
|
6946
|
-
* in-place applicators MUST be evaluated before this keyword can be
|
|
6947
|
-
* evaluated. Authors of extension keywords MUST NOT define an in-place
|
|
6948
|
-
* applicator that would need to be evaluated after this keyword.
|
|
6949
|
-
*
|
|
6950
|
-
* If the `unevaluatedItems` subschema is applied to any positions within
|
|
6951
|
-
* the instance array, it produces an annotation result of boolean
|
|
6952
|
-
* `true`, analogous to the behavior of `items`.
|
|
6953
|
-
*
|
|
6954
|
-
* Omitting this keyword has the same assertion behavior as an empty
|
|
6955
|
-
* schema.
|
|
6956
|
-
*
|
|
6957
|
-
* [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place
|
|
7336
|
+
/**
|
|
7337
|
+
* The value of `unevaluatedItems` MUST be a valid JSON Schema.
|
|
7338
|
+
*
|
|
7339
|
+
* The behavior of this keyword depends on the annotation results of
|
|
7340
|
+
* adjacent keywords that apply to the instance location being validated.
|
|
7341
|
+
* Specifically, the annotations from `prefixItems`, `items`, and
|
|
7342
|
+
* `contains`, which can come from those keywords when they are adjacent
|
|
7343
|
+
* to the `unevaluatedItems` keyword. Those three annotations, as well as
|
|
7344
|
+
* `unevaluatedItems`, can also result from any and all adjacent
|
|
7345
|
+
* [in-place applicator][in-place-applicator] keywords.
|
|
7346
|
+
*
|
|
7347
|
+
* If no relevant annotations are present, the `unevaluatedItems`
|
|
7348
|
+
* subschema MUST be applied to all locations in the array.
|
|
7349
|
+
* If a boolean `true` value is present from any of the relevant
|
|
7350
|
+
* annotations, `unevaluatedItems` MUST be ignored. Otherwise, the
|
|
7351
|
+
* subschema MUST be applied to any index greater than the largest
|
|
7352
|
+
* annotation value for `prefixItems`, which does not appear in any
|
|
7353
|
+
* annotation value for `contains`.
|
|
7354
|
+
*
|
|
7355
|
+
* This means that `prefixItems`, `items`, `contains`, and all
|
|
7356
|
+
* in-place applicators MUST be evaluated before this keyword can be
|
|
7357
|
+
* evaluated. Authors of extension keywords MUST NOT define an in-place
|
|
7358
|
+
* applicator that would need to be evaluated after this keyword.
|
|
7359
|
+
*
|
|
7360
|
+
* If the `unevaluatedItems` subschema is applied to any positions within
|
|
7361
|
+
* the instance array, it produces an annotation result of boolean
|
|
7362
|
+
* `true`, analogous to the behavior of `items`.
|
|
7363
|
+
*
|
|
7364
|
+
* Omitting this keyword has the same assertion behavior as an empty
|
|
7365
|
+
* schema.
|
|
7366
|
+
*
|
|
7367
|
+
* [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place
|
|
6958
7368
|
*/
|
|
6959
7369
|
unevaluatedItems?: JSONSchema;
|
|
6960
|
-
/**
|
|
6961
|
-
* The value of `unevaluatedProperties` MUST be a valid JSON Schema.
|
|
6962
|
-
*
|
|
6963
|
-
* The behavior of this keyword depends on the annotation results of
|
|
6964
|
-
* adjacent keywords that apply to the instance location being validated.
|
|
6965
|
-
* Specifically, the annotations from `properties`,
|
|
6966
|
-
* `patternProperties`, and `additionalProperties`, which can come from
|
|
6967
|
-
* those keywords when they are adjacent to the `unevaluatedProperties`
|
|
6968
|
-
* keyword. Those three annotations, as well as `unevaluatedProperties`,
|
|
6969
|
-
* can also result from any and all adjacent
|
|
6970
|
-
* [in-place applicator][in-place-applicator] keywords.
|
|
6971
|
-
*
|
|
6972
|
-
* Validation with `unevaluatedProperties` applies only to the child
|
|
6973
|
-
* values of instance names that do not appear in the `properties`,
|
|
6974
|
-
* `patternProperties`, `additionalProperties`, or
|
|
6975
|
-
* `unevaluatedProperties` annotation results that apply to the
|
|
6976
|
-
* instance location being validated.
|
|
6977
|
-
*
|
|
6978
|
-
* For all such properties, validation succeeds if the child instance
|
|
6979
|
-
* validates against the "unevaluatedProperties" schema.
|
|
6980
|
-
*
|
|
6981
|
-
* This means that `properties`, `patternProperties`,
|
|
6982
|
-
* `additionalProperties`, and all in-place applicators MUST be evaluated
|
|
6983
|
-
* before this keyword can be evaluated. Authors of extension keywords
|
|
6984
|
-
* MUST NOT define an in-place applicator that would need to be evaluated
|
|
6985
|
-
* after this keyword.
|
|
6986
|
-
*
|
|
6987
|
-
* The annotation result of this keyword is the set of instance property
|
|
6988
|
-
* names validated by this keyword's subschema.
|
|
6989
|
-
*
|
|
6990
|
-
* Omitting this keyword has the same assertion behavior as an empty
|
|
6991
|
-
* schema.
|
|
6992
|
-
*
|
|
6993
|
-
* [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place
|
|
7370
|
+
/**
|
|
7371
|
+
* The value of `unevaluatedProperties` MUST be a valid JSON Schema.
|
|
7372
|
+
*
|
|
7373
|
+
* The behavior of this keyword depends on the annotation results of
|
|
7374
|
+
* adjacent keywords that apply to the instance location being validated.
|
|
7375
|
+
* Specifically, the annotations from `properties`,
|
|
7376
|
+
* `patternProperties`, and `additionalProperties`, which can come from
|
|
7377
|
+
* those keywords when they are adjacent to the `unevaluatedProperties`
|
|
7378
|
+
* keyword. Those three annotations, as well as `unevaluatedProperties`,
|
|
7379
|
+
* can also result from any and all adjacent
|
|
7380
|
+
* [in-place applicator][in-place-applicator] keywords.
|
|
7381
|
+
*
|
|
7382
|
+
* Validation with `unevaluatedProperties` applies only to the child
|
|
7383
|
+
* values of instance names that do not appear in the `properties`,
|
|
7384
|
+
* `patternProperties`, `additionalProperties`, or
|
|
7385
|
+
* `unevaluatedProperties` annotation results that apply to the
|
|
7386
|
+
* instance location being validated.
|
|
7387
|
+
*
|
|
7388
|
+
* For all such properties, validation succeeds if the child instance
|
|
7389
|
+
* validates against the "unevaluatedProperties" schema.
|
|
7390
|
+
*
|
|
7391
|
+
* This means that `properties`, `patternProperties`,
|
|
7392
|
+
* `additionalProperties`, and all in-place applicators MUST be evaluated
|
|
7393
|
+
* before this keyword can be evaluated. Authors of extension keywords
|
|
7394
|
+
* MUST NOT define an in-place applicator that would need to be evaluated
|
|
7395
|
+
* after this keyword.
|
|
7396
|
+
*
|
|
7397
|
+
* The annotation result of this keyword is the set of instance property
|
|
7398
|
+
* names validated by this keyword's subschema.
|
|
7399
|
+
*
|
|
7400
|
+
* Omitting this keyword has the same assertion behavior as an empty
|
|
7401
|
+
* schema.
|
|
7402
|
+
*
|
|
7403
|
+
* [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place
|
|
6994
7404
|
*/
|
|
6995
7405
|
unevaluatedProperties?: JSONSchema;
|
|
6996
|
-
/**
|
|
6997
|
-
* The value of this keyword MUST be a boolean.
|
|
6998
|
-
*
|
|
6999
|
-
* If this keyword has boolean value `false`, the instance validates
|
|
7000
|
-
* successfully. If it has boolean value `true`, the instance validates
|
|
7001
|
-
* successfully if all of its elements are unique.
|
|
7002
|
-
*
|
|
7003
|
-
* Omitting this keyword has the same behavior as a value of `false`.
|
|
7004
|
-
*
|
|
7005
|
-
* @default false
|
|
7406
|
+
/**
|
|
7407
|
+
* The value of this keyword MUST be a boolean.
|
|
7408
|
+
*
|
|
7409
|
+
* If this keyword has boolean value `false`, the instance validates
|
|
7410
|
+
* successfully. If it has boolean value `true`, the instance validates
|
|
7411
|
+
* successfully if all of its elements are unique.
|
|
7412
|
+
*
|
|
7413
|
+
* Omitting this keyword has the same behavior as a value of `false`.
|
|
7414
|
+
*
|
|
7415
|
+
* @default false
|
|
7006
7416
|
*/
|
|
7007
7417
|
uniqueItems?: boolean;
|
|
7008
|
-
/**
|
|
7009
|
-
* The value of this keyword MUST be a boolean. When multiple occurrences
|
|
7010
|
-
* of this keyword is applicable to a single sub-instance, the resulting
|
|
7011
|
-
* value MUST be `true` if any occurrence specifies a `true` value, and
|
|
7012
|
-
* MUST be `false` otherwise.
|
|
7013
|
-
*
|
|
7014
|
-
* If `writeOnly` has a value of boolean `true`, it indicates that the
|
|
7015
|
-
* value is never present when the instance is retrieved from the owning
|
|
7016
|
-
* authority. It can be present when sent to the owning authority to update
|
|
7017
|
-
* or create the document (or the resource it represents), but it will not
|
|
7018
|
-
* be included in any updated or newly created version of the instance.
|
|
7019
|
-
*
|
|
7020
|
-
* An instance document that is marked as `writeOnly` for the entire
|
|
7021
|
-
* document MAY be returned as a blank document of some sort, or MAY
|
|
7022
|
-
* produce an error upon retrieval, or have the retrieval request ignored,
|
|
7023
|
-
* at the authority's discretion.
|
|
7024
|
-
*
|
|
7025
|
-
* For example, `writeOnly` would be used to mark a password input field.
|
|
7026
|
-
*
|
|
7027
|
-
* These keywords can be used to assist in user interface instance
|
|
7028
|
-
* generation. In particular, an application MAY choose to use a widget
|
|
7029
|
-
* that hides input values as they are typed for write-only fields.
|
|
7030
|
-
*
|
|
7031
|
-
* @default false
|
|
7418
|
+
/**
|
|
7419
|
+
* The value of this keyword MUST be a boolean. When multiple occurrences
|
|
7420
|
+
* of this keyword is applicable to a single sub-instance, the resulting
|
|
7421
|
+
* value MUST be `true` if any occurrence specifies a `true` value, and
|
|
7422
|
+
* MUST be `false` otherwise.
|
|
7423
|
+
*
|
|
7424
|
+
* If `writeOnly` has a value of boolean `true`, it indicates that the
|
|
7425
|
+
* value is never present when the instance is retrieved from the owning
|
|
7426
|
+
* authority. It can be present when sent to the owning authority to update
|
|
7427
|
+
* or create the document (or the resource it represents), but it will not
|
|
7428
|
+
* be included in any updated or newly created version of the instance.
|
|
7429
|
+
*
|
|
7430
|
+
* An instance document that is marked as `writeOnly` for the entire
|
|
7431
|
+
* document MAY be returned as a blank document of some sort, or MAY
|
|
7432
|
+
* produce an error upon retrieval, or have the retrieval request ignored,
|
|
7433
|
+
* at the authority's discretion.
|
|
7434
|
+
*
|
|
7435
|
+
* For example, `writeOnly` would be used to mark a password input field.
|
|
7436
|
+
*
|
|
7437
|
+
* These keywords can be used to assist in user interface instance
|
|
7438
|
+
* generation. In particular, an application MAY choose to use a widget
|
|
7439
|
+
* that hides input values as they are typed for write-only fields.
|
|
7440
|
+
*
|
|
7441
|
+
* @default false
|
|
7032
7442
|
*/
|
|
7033
7443
|
writeOnly?: boolean;
|
|
7034
7444
|
};
|
|
7035
7445
|
declare namespace JSONSchema {
|
|
7036
7446
|
type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>;
|
|
7037
|
-
/**
|
|
7038
|
-
* JSON Schema interface
|
|
7447
|
+
/**
|
|
7448
|
+
* JSON Schema interface
|
|
7039
7449
|
*/
|
|
7040
7450
|
type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>;
|
|
7041
7451
|
type Array<T = any> = Pick<Interface<T, "array">, KeywordByType.Any | KeywordByType.Array>;
|
|
@@ -7053,45 +7463,43 @@ declare namespace KeywordByType {
|
|
|
7053
7463
|
type Object = "additionalProperties" | "dependencies" | "dependentRequired" | "dependentSchemas" | "maxProperties" | "minProperties" | "patternProperties" | "properties" | "propertyNames" | "required" | "unevaluatedProperties";
|
|
7054
7464
|
type String = "contentEncoding" | "contentMediaType" | "contentSchema" | "maxLength" | "minLength" | "pattern";
|
|
7055
7465
|
}
|
|
7056
|
-
/**
|
|
7057
|
-
* Enum consisting of simple type names for the `type` keyword
|
|
7466
|
+
/**
|
|
7467
|
+
* Enum consisting of simple type names for the `type` keyword
|
|
7058
7468
|
*/
|
|
7059
7469
|
declare enum TypeName {
|
|
7060
|
-
/**
|
|
7061
|
-
* Value MUST be an array.
|
|
7470
|
+
/**
|
|
7471
|
+
* Value MUST be an array.
|
|
7062
7472
|
*/
|
|
7063
7473
|
Array = "array",
|
|
7064
|
-
/**
|
|
7065
|
-
* Value MUST be a boolean.
|
|
7474
|
+
/**
|
|
7475
|
+
* Value MUST be a boolean.
|
|
7066
7476
|
*/
|
|
7067
7477
|
Boolean = "boolean",
|
|
7068
|
-
/**
|
|
7069
|
-
* Value MUST be an integer, no floating point numbers are allowed. This is a
|
|
7070
|
-
* subset of the number type.
|
|
7478
|
+
/**
|
|
7479
|
+
* Value MUST be an integer, no floating point numbers are allowed. This is a
|
|
7480
|
+
* subset of the number type.
|
|
7071
7481
|
*/
|
|
7072
7482
|
Integer = "integer",
|
|
7073
|
-
/**
|
|
7074
|
-
* Value MUST be null. Note this is mainly for purpose of being able use union
|
|
7075
|
-
* types to define nullability. If this type is not included in a union, null
|
|
7076
|
-
* values are not allowed (the primitives listed above do not allow nulls on
|
|
7077
|
-
* their own).
|
|
7483
|
+
/**
|
|
7484
|
+
* Value MUST be null. Note this is mainly for purpose of being able use union
|
|
7485
|
+
* types to define nullability. If this type is not included in a union, null
|
|
7486
|
+
* values are not allowed (the primitives listed above do not allow nulls on
|
|
7487
|
+
* their own).
|
|
7078
7488
|
*/
|
|
7079
7489
|
Null = "null",
|
|
7080
|
-
/**
|
|
7081
|
-
* Value MUST be a number, floating point numbers are allowed.
|
|
7490
|
+
/**
|
|
7491
|
+
* Value MUST be a number, floating point numbers are allowed.
|
|
7082
7492
|
*/
|
|
7083
7493
|
Number = "number",
|
|
7084
|
-
/**
|
|
7085
|
-
* Value MUST be an object.
|
|
7494
|
+
/**
|
|
7495
|
+
* Value MUST be an object.
|
|
7086
7496
|
*/
|
|
7087
7497
|
Object = "object",
|
|
7088
|
-
/**
|
|
7089
|
-
* Value MUST be a string.
|
|
7498
|
+
/**
|
|
7499
|
+
* Value MUST be a string.
|
|
7090
7500
|
*/
|
|
7091
7501
|
String = "string"
|
|
7092
7502
|
}
|
|
7093
|
-
//#endregion
|
|
7094
|
-
//#region ../../node_modules/.pnpm/@orpc+openapi@1.15.2_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/openapi/dist/shared/openapi.BGy4N6eR.d.mts
|
|
7095
7503
|
interface SchemaConverterComponent {
|
|
7096
7504
|
allowedStrategies: readonly SchemaConvertOptions['strategy'][];
|
|
7097
7505
|
schema: AnySchema;
|
|
@@ -7168,12 +7576,8 @@ interface OpenAPIGeneratorGenerateOptions extends Partial<Omit<OpenAPI.Document,
|
|
|
7168
7576
|
*/
|
|
7169
7577
|
customErrorResponseBodySchema?: Value<JSONSchema | undefined | null, [definedErrors: [code: string, defaultMessage: string, dataRequired: boolean, dataSchema: JSONSchema][], status: number]>;
|
|
7170
7578
|
}
|
|
7171
|
-
//#endregion
|
|
7172
|
-
//#region src/doc.d.ts
|
|
7173
7579
|
/** Shared by the served `openapi.json` and the snapshot test that guards it, so the two cannot drift. */
|
|
7174
7580
|
export declare const OPENAPI_DOC_OPTIONS: OpenAPIGeneratorGenerateOptions;
|
|
7175
|
-
//#endregion
|
|
7176
|
-
//#region src/schemas.d.ts
|
|
7177
7581
|
export type Runtime = z.infer<typeof runtimeSchema>;
|
|
7178
7582
|
export type Transport = z.infer<typeof transportSchema>;
|
|
7179
7583
|
export declare const environmentVariableSchema: z.ZodObject<{
|
|
@@ -7230,5 +7634,4 @@ export declare const serverFieldsSchema: z.ZodObject<{
|
|
|
7230
7634
|
}, z.core.$strip>>>;
|
|
7231
7635
|
}, z.core.$strip>>>;
|
|
7232
7636
|
}, z.core.$strip>;
|
|
7233
|
-
//#endregion
|
|
7234
7637
|
export type { IntentCategoryColor, Platform };
|