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