@scalar/workspace-store 0.73.0 → 0.74.0

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +10 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +23 -6
  5. package/dist/entities/auth/schema.d.ts +195 -40
  6. package/dist/entities/auth/schema.d.ts.map +1 -1
  7. package/dist/helpers/async-api-schema-resources/load-inline.d.ts +5 -0
  8. package/dist/helpers/async-api-schema-resources/load-inline.d.ts.map +1 -0
  9. package/dist/helpers/async-api-schema-resources/load-inline.js +71 -0
  10. package/dist/helpers/async-api-schema-resources/protobuf-imports.d.ts +8 -0
  11. package/dist/helpers/async-api-schema-resources/protobuf-imports.d.ts.map +1 -0
  12. package/dist/helpers/async-api-schema-resources/protobuf-imports.js +25 -0
  13. package/dist/helpers/async-api-schema-resources/raml-source.d.ts +12 -0
  14. package/dist/helpers/async-api-schema-resources/raml-source.d.ts.map +1 -0
  15. package/dist/helpers/async-api-schema-resources/raml-source.js +32 -0
  16. package/dist/helpers/async-api-schema-resources/resources.d.ts +10 -0
  17. package/dist/helpers/async-api-schema-resources/resources.d.ts.map +1 -0
  18. package/dist/helpers/async-api-schema-resources/resources.js +124 -0
  19. package/dist/helpers/async-api-schema-resources/schema-resource-path.d.ts +3 -0
  20. package/dist/helpers/async-api-schema-resources/schema-resource-path.d.ts.map +1 -0
  21. package/dist/helpers/async-api-schema-resources/schema-resource-path.js +9 -0
  22. package/dist/helpers/compact-upgrade-metadata.d.ts +3 -0
  23. package/dist/helpers/compact-upgrade-metadata.d.ts.map +1 -0
  24. package/dist/helpers/compact-upgrade-metadata.js +71 -0
  25. package/dist/helpers/is-file-schema.js +1 -1
  26. package/dist/helpers/querystring-parameter.d.ts +3 -1
  27. package/dist/helpers/querystring-parameter.d.ts.map +1 -1
  28. package/dist/helpers/querystring-parameter.js +2 -2
  29. package/dist/helpers/resolve-async-api-schema.d.ts +2 -0
  30. package/dist/helpers/resolve-async-api-schema.d.ts.map +1 -1
  31. package/dist/helpers/resolve-async-api-schema.js +23 -1
  32. package/dist/mutators/operation/parameters.d.ts.map +1 -1
  33. package/dist/mutators/operation/parameters.js +9 -1
  34. package/dist/mutators/operation/reset-request-body.d.ts.map +1 -1
  35. package/dist/mutators/operation/reset-request-body.js +3 -1
  36. package/dist/plugins/bundler/async-api-schema-resources.d.ts +4 -0
  37. package/dist/plugins/bundler/async-api-schema-resources.d.ts.map +1 -0
  38. package/dist/plugins/bundler/async-api-schema-resources.js +20 -0
  39. package/dist/plugins/bundler/index.d.ts +1 -1
  40. package/dist/plugins/bundler/index.d.ts.map +1 -1
  41. package/dist/plugins/bundler/index.js +7 -4
  42. package/dist/plugins/bundler/openapi-document.d.ts +5 -1
  43. package/dist/plugins/bundler/openapi-document.d.ts.map +1 -1
  44. package/dist/plugins/bundler/openapi-document.js +7 -3
  45. package/dist/plugins/bundler/upgrade-documents.d.ts +4 -0
  46. package/dist/plugins/bundler/upgrade-documents.d.ts.map +1 -0
  47. package/dist/plugins/bundler/upgrade-documents.js +357 -0
  48. package/dist/request-example/builder/body/build-request-body.d.ts +1 -1
  49. package/dist/request-example/builder/body/build-request-body.d.ts.map +1 -1
  50. package/dist/request-example/builder/body/build-request-body.js +2 -2
  51. package/dist/request-example/builder/body/get-request-body-example.d.ts +2 -2
  52. package/dist/request-example/builder/body/get-request-body-example.d.ts.map +1 -1
  53. package/dist/request-example/builder/body/get-request-body-example.js +7 -3
  54. package/dist/request-example/builder/helpers/array-contains.d.ts +15 -0
  55. package/dist/request-example/builder/helpers/array-contains.d.ts.map +1 -0
  56. package/dist/request-example/builder/helpers/array-contains.js +199 -0
  57. package/dist/request-example/builder/helpers/get-example-from-schema.d.ts +6 -0
  58. package/dist/request-example/builder/helpers/get-example-from-schema.d.ts.map +1 -1
  59. package/dist/request-example/builder/helpers/get-example-from-schema.js +30 -2
  60. package/dist/request-example/builder/request-factory.d.ts +3 -1
  61. package/dist/request-example/builder/request-factory.d.ts.map +1 -1
  62. package/dist/request-example/builder/request-factory.js +5 -3
  63. package/dist/schemas/reference-config/index.d.ts +39 -8
  64. package/dist/schemas/reference-config/index.d.ts.map +1 -1
  65. package/dist/schemas/reference-config/settings.d.ts +39 -8
  66. package/dist/schemas/reference-config/settings.d.ts.map +1 -1
  67. package/dist/schemas/v3.1/strict/openapi-document.d.ts +1365 -280
  68. package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
  69. package/dist/schemas/v3.1/strict/schema.d.ts +62 -10
  70. package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
  71. package/dist/schemas/v3.1/strict/schema.js +10 -2
  72. package/dist/schemas/v3.2/openapi/index.d.ts.map +1 -1
  73. package/dist/schemas/v3.2/openapi/index.js +5 -2
  74. package/dist/schemas/v3.2/strict/openapi-document.d.ts +1365 -280
  75. package/dist/schemas/v3.2/strict/openapi-document.d.ts.map +1 -1
  76. package/dist/schemas/v3.2/strict/schema.d.ts +62 -10
  77. package/dist/schemas/v3.2/strict/schema.d.ts.map +1 -1
  78. package/dist/schemas/v3.2/strict/schema.js +10 -2
  79. package/dist/server.d.ts.map +1 -1
  80. package/dist/server.js +33 -3
  81. package/package.json +12 -11
@@ -0,0 +1,199 @@
1
+ import { isObject } from '@scalar/helpers/object/is-object';
2
+ /** Unknown dialects and pre-3.1 OpenAPI must not acquire modern contains semantics. */
3
+ export const getArrayDialect = (dialect, openapiVersion) => {
4
+ if (openapiVersion && !/^3\.[1-9](?:\.|$)/.test(openapiVersion)) {
5
+ return 'unsupported';
6
+ }
7
+ if (!dialect || /^https:\/\/spec\.openapis\.org\/oas\/3\.[12]\/dialect\/base#?$/.test(dialect)) {
8
+ return 'modern';
9
+ }
10
+ const uri = dialect.replace(/#$/, '');
11
+ if (uri === 'https://json-schema.org/draft/2020-12/schema') {
12
+ return 'modern';
13
+ }
14
+ return uri === 'http://json-schema.org/draft-07/schema' ? 'draft7' : 'unsupported';
15
+ };
16
+ const MAX_ITEMS = 999;
17
+ const MAX_CANDIDATES = 128;
18
+ const isPrimitive = (value) => value === null ||
19
+ typeof value === 'string' ||
20
+ typeof value === 'boolean' ||
21
+ (typeof value === 'number' && Number.isFinite(value));
22
+ const keywords = new Set([
23
+ '__scalar_',
24
+ '$status',
25
+ '$global',
26
+ 'type',
27
+ 'const',
28
+ 'enum',
29
+ 'minimum',
30
+ 'maximum',
31
+ 'exclusiveMinimum',
32
+ 'exclusiveMaximum',
33
+ 'minLength',
34
+ 'maxLength',
35
+ 'title',
36
+ 'description',
37
+ 'default',
38
+ 'example',
39
+ 'examples',
40
+ 'deprecated',
41
+ 'readOnly',
42
+ 'writeOnly',
43
+ 'xml',
44
+ 'externalDocs',
45
+ ]);
46
+ /** Complex assertions are left to the existing best-effort generator, never treated as nonmatches. */
47
+ const isSimple = (schema) => {
48
+ if (typeof schema === 'boolean') {
49
+ return true;
50
+ }
51
+ if (!isObject(schema) || Object.keys(schema).some((key) => !keywords.has(key) && !key.startsWith('x-'))) {
52
+ return false;
53
+ }
54
+ if (schema.type !== undefined &&
55
+ (typeof schema.type !== 'string' || !['string', 'number', 'integer', 'boolean', 'null'].includes(schema.type))) {
56
+ return false;
57
+ }
58
+ if ('const' in schema && !isPrimitive(schema.const)) {
59
+ return false;
60
+ }
61
+ return (!('enum' in schema) ||
62
+ (Array.isArray(schema.enum) && schema.enum.length <= MAX_CANDIDATES && schema.enum.every(isPrimitive)));
63
+ };
64
+ const bound = (value, fallback) => typeof value === 'number' && Number.isSafeInteger(value) && value >= 0 ? value : fallback;
65
+ const matches = (schema, value) => {
66
+ if (typeof schema === 'boolean') {
67
+ return schema;
68
+ }
69
+ if ('const' in schema && value !== schema.const) {
70
+ return false;
71
+ }
72
+ if (Array.isArray(schema.enum) && !schema.enum.includes(value)) {
73
+ return false;
74
+ }
75
+ if (schema.type !== undefined) {
76
+ const type = value === null ? 'null' : typeof value;
77
+ if (schema.type === 'integer' ? typeof value !== 'number' || !Number.isInteger(value) : schema.type !== type) {
78
+ return false;
79
+ }
80
+ }
81
+ if (typeof value === 'number') {
82
+ if (typeof schema.minimum === 'number' && value < schema.minimum) {
83
+ return false;
84
+ }
85
+ if (typeof schema.maximum === 'number' && value > schema.maximum) {
86
+ return false;
87
+ }
88
+ if (typeof schema.exclusiveMinimum === 'number' && value <= schema.exclusiveMinimum) {
89
+ return false;
90
+ }
91
+ if (typeof schema.exclusiveMaximum === 'number' && value >= schema.exclusiveMaximum) {
92
+ return false;
93
+ }
94
+ }
95
+ if (typeof value === 'string') {
96
+ const length = Array.from(value).length;
97
+ if (length < bound(schema.minLength, 0) || length > bound(schema.maxLength, Number.POSITIVE_INFINITY)) {
98
+ return false;
99
+ }
100
+ }
101
+ return true;
102
+ };
103
+ /**
104
+ * Fill direct primitive arrays with a single contains rule. Tuple values count toward the same
105
+ * limits as tail values. Candidates are bounded and selected linearly; no composition traversal,
106
+ * nested value synthesis, or XML branch selection is attempted. Unsupported schemas return undefined
107
+ * for the existing generator. Contradictions or exhausted candidates return a partial example.
108
+ * TODO: Handle independent contains rules across references and compositions in a follow-up.
109
+ */
110
+ export const generateContainsArray = (schema, prefixes, generate, dialect) => {
111
+ if (dialect === 'unsupported' || !('contains' in schema) || !isSimple(schema.contains)) {
112
+ return undefined;
113
+ }
114
+ if (schema.allOf || schema.anyOf || schema.oneOf || schema.$ref) {
115
+ return undefined;
116
+ }
117
+ const contains = schema.contains;
118
+ const items = schema.items ?? true;
119
+ const tuple = dialect === 'modern' && Array.isArray(schema.prefixItems) ? schema.prefixItems : [];
120
+ if (!isSimple(items) || !tuple.every(isSimple) || (dialect === 'draft7' && schema.prefixItems)) {
121
+ return undefined;
122
+ }
123
+ const minimum = dialect === 'modern' ? bound(schema.minContains, 1) : 1;
124
+ const maximum = dialect === 'modern' ? bound(schema.maxContains, Number.POSITIVE_INFINITY) : Number.POSITIVE_INFINITY;
125
+ const maxItems = Math.min(bound(schema.maxItems, MAX_ITEMS), MAX_ITEMS);
126
+ const length = Math.min(maxItems, Math.max(bound(schema.minItems, 0), minimum, prefixes.length));
127
+ const values = [];
128
+ const candidates = [];
129
+ const add = (value) => {
130
+ if (isPrimitive(value) && candidates.length < MAX_CANDIDATES && !candidates.includes(value)) {
131
+ candidates.push(value);
132
+ }
133
+ };
134
+ // Authored item examples remain fixed even when they cannot satisfy the array constraints.
135
+ const unrestricted = items === true ||
136
+ (isObject(items) && !['type', 'const', 'enum', 'example', 'examples', 'default'].some((key) => key in items));
137
+ const sampleSchema = unrestricted ? contains : items;
138
+ const generatedSample = typeof sampleSchema === 'boolean' ? null : generate(sampleSchema);
139
+ const sample = unrestricted ? (generatedSample ?? null) : generatedSample;
140
+ const authored = isObject(items) && (items.example !== undefined || (Array.isArray(items.examples) && items.examples.length > 0));
141
+ add(sample);
142
+ if (!authored) {
143
+ for (const source of [contains, items]) {
144
+ if (!isObject(source)) {
145
+ continue;
146
+ }
147
+ if ('const' in source) {
148
+ add(source.const);
149
+ }
150
+ if (Array.isArray(source.enum)) {
151
+ source.enum.forEach(add);
152
+ }
153
+ add(generate(source));
154
+ for (const key of ['minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum']) {
155
+ const limit = source[key];
156
+ if (typeof limit === 'number') {
157
+ for (const offset of [0, 1, -1]) {
158
+ add(limit + offset);
159
+ }
160
+ }
161
+ }
162
+ }
163
+ for (const value of [null, 1, 2, 3, 0, -1, true, false, '', 'string', 'a']) {
164
+ add(value);
165
+ }
166
+ for (let index = 4; index < 32; index++) {
167
+ add(index);
168
+ add(`string${index}`);
169
+ }
170
+ }
171
+ const available = authored ? candidates : candidates.filter((value) => matches(items, value));
172
+ let count = 0;
173
+ const append = (value) => {
174
+ const match = matches(contains, value);
175
+ if ((!authored && match && count >= maximum) || (schema.uniqueItems === true && values.includes(value))) {
176
+ return false;
177
+ }
178
+ values.push(value);
179
+ count += Number(match);
180
+ return true;
181
+ };
182
+ for (const [index, value] of prefixes.slice(0, maxItems).entries()) {
183
+ if (!isPrimitive(value) || !matches(tuple[index] ?? true, value) || !append(value)) {
184
+ return values;
185
+ }
186
+ }
187
+ if (items === false || (sample === undefined && typeof items !== 'boolean')) {
188
+ return values;
189
+ }
190
+ while (values.length < maxItems && (values.length < length || (!authored && count < minimum))) {
191
+ const candidate = available.find((value) => (authored || count >= minimum || matches(contains, value)) &&
192
+ (authored || !matches(contains, value) || count < maximum) &&
193
+ (schema.uniqueItems !== true || !values.includes(value)));
194
+ if (candidate === undefined || !append(candidate)) {
195
+ break;
196
+ }
197
+ }
198
+ return values;
199
+ };
@@ -5,6 +5,12 @@ import { EXAMPLE_EVALUATION, type ExampleEvaluationState } from './example-evalu
5
5
  export declare const selectExampleComposition: (schema: SchemaObject, schemaPath: string[], options?: GetExampleFromSchemaOptions, arrayItem?: boolean, value?: Record<string, unknown>) => SchemaObject | undefined;
6
6
  /** Options shared by data generation and schema-aware serializers. */
7
7
  export type GetExampleFromSchemaOptions = {
8
+ /** Declared document version; absent means a standalone modern schema. */
9
+ openapiVersion?: string;
10
+ /** Original version when a loader upgraded the document. */
11
+ originalOpenapiVersion?: string;
12
+ /** Default dialect, overridden by a schema resource's $schema. */
13
+ jsonSchemaDialect?: string;
8
14
  /** Internal provenance capture, excluded from persistent result caches. */
9
15
  [EXAMPLE_EVALUATION]?: ExampleEvaluationState;
10
16
  /** Preserve binary filename examples as File objects for multipart serializers. */
@@ -1 +1 @@
1
- {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAqD,MAAM,uBAAuB,CAAA;AAM5G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAE1E,OAAO,EAAE,kBAAkB,EAA0B,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAob9G,gGAAgG;AAChG,eAAO,MAAM,wBAAwB,WAC3B,YAAY,cACR,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AAO,yBAAyB,CAAC,CAAC,CAAC,CAAC,KACvD,OA2BF,CAAA"}
1
+ {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAqD,MAAM,uBAAuB,CAAA;AAM5G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAG1E,OAAO,EAAE,kBAAkB,EAA0B,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAob9G,gGAAgG;AAChG,eAAO,MAAM,wBAAwB,WAC3B,YAAY,cACR,MAAM,EAAE,YACV,2BAA2B,+BAE7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,YAAY,GAAG,SAoBjB,CAAA;AAyvBD,sEAAsE;AACtE,MAAM,MAAM,2BAA2B,GAAG;IACxC,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,4DAA4D;IAC5D,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,2EAA2E;IAC3E,CAAC,kBAAkB,CAAC,CAAC,EAAE,sBAAsB,CAAA;IAC7C,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kFAAkF;IAClF,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;IACxC,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9C,CAAA;AAggBD;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,yBAAyB,WACrB,YAAY,YACV,2BAA2B,sGAUlC,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;IACrB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,qGAAqG;IACrG,YAAY,EAAE,YAAY,CAAA;IAC1B,4FAA4F;IAC5F,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAClC,+GAA+G;IAC/G,kBAAkB,EAAE,OAAO,CAAA;CAC5B,CAAC,KACD,OAoTF,CAAA;AAkBD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,WACvB,YAAY,YACV,2BAA2B,YAC5B,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAC,KACvD,OA8BF,CAAA"}
@@ -9,6 +9,7 @@ import { isFileSchema } from '../../../helpers/is-file-schema.js';
9
9
  import { resolveFormSchema } from '../../../helpers/resolve-form-schema.js';
10
10
  import { unpackProxyObject } from '../../../helpers/unpack-proxy.js';
11
11
  import { resolve } from '../../../resolve.js';
12
+ import { generateContainsArray, getArrayDialect } from './array-contains.js';
12
13
  import { EXAMPLE_EVALUATION } from './example-evaluation.js';
13
14
  /** Maximum recursion depth to prevent infinite loops in circular references */
14
15
  const MAX_LEVELS_DEEP = 10;
@@ -759,6 +760,20 @@ const handleArraySchema = (schema, options, level, seen, cacheKey, schemaPath, d
759
760
  seen,
760
761
  dynamicScope: childScope,
761
762
  })) ?? [];
763
+ const counted = generateContainsArray(schema, values, (item) => getExampleFromSchema(item, options, {
764
+ level: level + 1,
765
+ schemaPath: [...schemaPath, 'items'],
766
+ seen,
767
+ dynamicScope: childScope,
768
+ }), getArrayDialect(options?.jsonSchemaDialect, options?.originalOpenapiVersion ?? options?.openapiVersion));
769
+ if (counted) {
770
+ const items = 'items' in schema ? resolve.schema(schema.items) : undefined;
771
+ const tag = items && 'xml' in items ? items.xml?.name : undefined;
772
+ const result = options?.xml && 'xml' in schema && schema.xml?.wrapped && tag
773
+ ? counted.map((item, index) => (index < (prefixes?.length ?? 0) ? item : { [tag]: item }))
774
+ : counted;
775
+ return cache(schema, result, cacheKey, skipCache);
776
+ }
762
777
  if (prefixes && values.length >= minItems) {
763
778
  return cache(schema, values, cacheKey, skipCache);
764
779
  }
@@ -887,11 +902,15 @@ const handleArraySchema = (schema, options, level, seen, cacheKey, schemaPath, d
887
902
  const unrestricted = itemSchema === undefined ||
888
903
  target === true ||
889
904
  (target !== undefined && items && Object.keys(items).every((key) => ITEM_ANNOTATIONS.has(key)));
890
- // The strict model does not yet expose contains, but runtime 3.1+ descriptions can provide it.
905
+ // Preserve best-effort sampling for complex contains schemas in recognized dialects.
906
+ // This fallback does not grade matches or enforce minContains/maxContains.
891
907
  const contains = 'contains' in schema && schema.contains && typeof schema.contains === 'object' && !Array.isArray(schema.contains)
892
908
  ? resolve.schema(schema.contains)
893
909
  : undefined;
894
- if (unrestricted && contains) {
910
+ if (unrestricted &&
911
+ contains &&
912
+ getArrayDialect(options?.jsonSchemaDialect, options?.originalOpenapiVersion ?? options?.openapiVersion) !==
913
+ 'unsupported') {
895
914
  const sample = getExampleFromSchema(contains, options, {
896
915
  level: level + 1,
897
916
  schemaPath: [...schemaPath, 'contains'],
@@ -950,6 +969,9 @@ const getUnionPrimitiveValue = (schema, makeUpRandomData, emptyString) => {
950
969
  };
951
970
  /** Create stable cache key from the options object */
952
971
  const createOptionsCacheKey = (options) => JSON.stringify({
972
+ openapiVersion: options?.openapiVersion,
973
+ originalOpenapiVersion: options?.originalOpenapiVersion,
974
+ jsonSchemaDialect: options?.jsonSchemaDialect,
953
975
  binaryAsFile: options?.binaryAsFile,
954
976
  emptyString: options?.emptyString,
955
977
  xml: options?.xml,
@@ -1380,6 +1402,9 @@ const generateExampleFromSchema = (schema, options, { level = 0, parentSchema, n
1380
1402
  if (!isDefined(_schema)) {
1381
1403
  return undefined;
1382
1404
  }
1405
+ if (typeof _schema.$schema === 'string') {
1406
+ options = { ...options, jsonSchemaDialect: _schema.$schema };
1407
+ }
1383
1408
  // Resolve a `$dynamicRef` against the active dynamic scope, then continue with the bound schema.
1384
1409
  // When nothing matches, fall through and render the reference as before (no regression).
1385
1410
  if (isDynamicRef(_schema)) {
@@ -1643,6 +1668,9 @@ const asBinaryFile = (schema, value, options, schemaPath = []) => {
1643
1668
  * Treat returned values as read-only: cached results and padded items can share object references.
1644
1669
  */
1645
1670
  export const getExampleFromSchema = (schema, options, context = {}) => {
1671
+ if (schema && typeof schema === 'object' && '$schema' in schema && typeof schema.$schema === 'string') {
1672
+ options = { ...options, jsonSchemaDialect: schema.$schema };
1673
+ }
1646
1674
  const capture = options?.[EXAMPLE_EVALUATION];
1647
1675
  if (!capture) {
1648
1676
  const value = generateExampleFromSchema(schema, options, context);
@@ -185,7 +185,7 @@ export type RequestFactory = {
185
185
  * Builds a request object fastory which can be used to build a request object.
186
186
  * @returns A request object factory
187
187
  */
188
- export declare const requestFactory: ({ exampleName, globalCookies, method, operation, path, proxyUrl, server, defaultHeaders, isElectron, selectedSecuritySchemes, openapiVersion, requestBodyCompositionSelection, }: RequestExampleMeta & {
188
+ export declare const requestFactory: ({ exampleName, globalCookies, method, operation, path, proxyUrl, server, defaultHeaders, isElectron, selectedSecuritySchemes, openapiVersion, jsonSchemaDialect, requestBodyCompositionSelection, }: RequestExampleMeta & {
189
189
  /** The operation object */
190
190
  operation: OperationObject;
191
191
  /** For environment variables in the inputs */
@@ -205,6 +205,8 @@ export declare const requestFactory: ({ exampleName, globalCookies, method, oper
205
205
  /** Selected anyOf/oneOf request-body variants keyed by schema path */
206
206
  /** Originating OpenAPI version, used for version-specific serialization. */
207
207
  openapiVersion?: string;
208
+ /** Document default for schema resources without $schema. */
209
+ jsonSchemaDialect?: string;
208
210
  requestBodyCompositionSelection?: Record<string, number>;
209
211
  }) => {
210
212
  request: RequestFactory;
@@ -1 +1 @@
1
- {"version":3,"file":"request-factory.d.ts","sourceRoot":"","sources":["../../../src/request-example/builder/request-factory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAE5F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,EAAE,KAAK,oBAAoB,EAA2B,MAAM,iCAAiC,CAAA;AAEpG,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,2DAA2D,CAAA;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AACjG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAGjE,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,2BAA2B,CAAA;AAG9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,6FAA6F;IAC7F,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,IAAI,EAAE;QACJ;;;;;WAKG;QACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACjC,kDAAkD;QAClD,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;QAClC,gEAAgE;QAChE,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;QAC1D;;;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9D,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,sEAAsE;IACtE,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,+BAA+B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzD,KAAG;IACF,OAAO,EAAE,cAAc,CAAA;CA8ExB,CAAA"}
1
+ {"version":3,"file":"request-factory.d.ts","sourceRoot":"","sources":["../../../src/request-example/builder/request-factory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAE5F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,EAAE,KAAK,oBAAoB,EAA2B,MAAM,iCAAiC,CAAA;AAEpG,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,2DAA2D,CAAA;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AACjG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAGjE,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,2BAA2B,CAAA;AAG9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,6FAA6F;IAC7F,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,IAAI,EAAE;QACJ;;;;;WAKG;QACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;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AE,YAAY,GAAG,IAAI,CAAA;IAC3B,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,qEAAqE;IACrE,UAAU,EAAE,OAAO,CAAA;IACnB,8DAA8D;IAC9D,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,sEAAsE;IACtE,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,+BAA+B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzD,KAAG;IACF,OAAO,EAAE,cAAc,CAAA;CAgFxB,CAAA"}
@@ -12,14 +12,16 @@ import { buildRequestParameters } from './header/build-request-parameters.js';
12
12
  * Builds a request object fastory which can be used to build a request object.
13
13
  * @returns A request object factory
14
14
  */
15
- export const requestFactory = ({ exampleName, globalCookies, method, operation, path, proxyUrl, server, defaultHeaders, isElectron, selectedSecuritySchemes, openapiVersion, requestBodyCompositionSelection, }) => {
15
+ export const requestFactory = ({ exampleName, globalCookies, method, operation, path, proxyUrl, server, defaultHeaders, isElectron, selectedSecuritySchemes, openapiVersion, jsonSchemaDialect, requestBodyCompositionSelection, }) => {
16
16
  const requestBody = getResolvedRef(operation.requestBody);
17
17
  /** Build out the request parameters */
18
18
  const params = buildRequestParameters(operation.parameters ?? [], exampleName, openapiVersion);
19
19
  const querystringParameter = operation.parameters
20
20
  ?.map((parameter) => getResolvedRef(parameter))
21
21
  .find((parameter) => parameter?.in === 'querystring');
22
- const querystring = querystringParameter ? getQuerystringParameter(querystringParameter, exampleName) : undefined;
22
+ const querystring = querystringParameter
23
+ ? getQuerystringParameter(querystringParameter, exampleName, { openapiVersion, jsonSchemaDialect })
24
+ : undefined;
23
25
  const security = buildRequestSecurity(selectedSecuritySchemes);
24
26
  const headers = new Headers({
25
27
  ...filterDisabledDefaultHeaders(operation, exampleName, defaultHeaders),
@@ -27,7 +29,7 @@ export const requestFactory = ({ exampleName, globalCookies, method, operation,
27
29
  });
28
30
  // If the method can have a body, build the request body, otherwise set it to null
29
31
  const body = canMethodHaveBody(method)
30
- ? buildRequestBody(requestBody, exampleName, requestBodyCompositionSelection, openapiVersion)
32
+ ? buildRequestBody(requestBody, exampleName, requestBodyCompositionSelection, openapiVersion, jsonSchemaDialect)
31
33
  : null;
32
34
  // Delete the Content-Type header so the browser will set it automatically based on the request body
33
35
  if (body?.mode === 'formdata' || body?.mode === 'urlencoded') {
@@ -424,6 +424,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
424
424
  SchemaObject: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
425
425
  __scalar_: import("@scalar/typebox").TString;
426
426
  }>, import("@scalar/typebox").TObject<{
427
+ $schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
427
428
  $id: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
428
429
  $anchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
429
430
  $dynamicAnchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -517,6 +518,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
517
518
  }>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
518
519
  type: import("@scalar/typebox").TUnion<[TLiteral<"null">, TLiteral<"boolean">]>;
519
520
  }>, import("@scalar/typebox").TObject<{
521
+ $schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
520
522
  $id: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
521
523
  $anchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
522
524
  $dynamicAnchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -617,6 +619,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
617
619
  minimum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
618
620
  exclusiveMinimum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
619
621
  }>]>, import("@scalar/typebox").TObject<{
622
+ $schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
620
623
  $id: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
621
624
  $anchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
622
625
  $dynamicAnchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -715,6 +718,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
715
718
  minLength: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
716
719
  pattern: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
717
720
  }>]>, import("@scalar/typebox").TObject<{
721
+ $schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
718
722
  $id: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
719
723
  $anchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
720
724
  $dynamicAnchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -852,6 +856,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
852
856
  '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
853
857
  }>]>]>>;
854
858
  }>]>, import("@scalar/typebox").TObject<{
859
+ $schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
855
860
  $id: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
856
861
  $anchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
857
862
  $dynamicAnchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -945,10 +950,22 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
945
950
  }>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
946
951
  type: TLiteral<"array">;
947
952
  }>, import("@scalar/typebox").TObject<{
953
+ contains: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
954
+ $ref: import("@scalar/typebox").TString;
955
+ summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
956
+ description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
957
+ }>, import("@scalar/typebox").TObject<{
958
+ $status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[TLiteral<"loading">, TLiteral<"error">]>>;
959
+ $global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
960
+ }>]>, import("@scalar/typebox").TObject<{
961
+ '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
962
+ }>]>]>, import("@scalar/typebox").TBoolean]>>;
963
+ minContains: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
964
+ maxContains: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
948
965
  maxItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
949
966
  minItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
950
967
  uniqueItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
951
- items: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
968
+ items: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
952
969
  $ref: import("@scalar/typebox").TString;
953
970
  summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
954
971
  description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -957,8 +974,8 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
957
974
  $global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
958
975
  }>]>, import("@scalar/typebox").TObject<{
959
976
  '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
960
- }>]>]>>;
961
- prefixItems: import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
977
+ }>]>]>, import("@scalar/typebox").TBoolean]>>;
978
+ prefixItems: import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
962
979
  $ref: import("@scalar/typebox").TString;
963
980
  summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
964
981
  description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -967,8 +984,9 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
967
984
  $global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
968
985
  }>]>, import("@scalar/typebox").TObject<{
969
986
  '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
970
- }>]>]>>>;
987
+ }>]>]>, import("@scalar/typebox").TBoolean]>>>;
971
988
  }>]>, import("@scalar/typebox").TObject<{
989
+ $schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
972
990
  $id: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
973
991
  $anchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
974
992
  $dynamicAnchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -1073,10 +1091,22 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
1073
1091
  minLength: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
1074
1092
  pattern: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1075
1093
  }>, import("@scalar/typebox").TObject<{
1094
+ contains: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
1095
+ $ref: import("@scalar/typebox").TString;
1096
+ summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1097
+ description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1098
+ }>, import("@scalar/typebox").TObject<{
1099
+ $status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[TLiteral<"loading">, TLiteral<"error">]>>;
1100
+ $global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1101
+ }>]>, import("@scalar/typebox").TObject<{
1102
+ '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
1103
+ }>]>]>, import("@scalar/typebox").TBoolean]>>;
1104
+ minContains: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
1105
+ maxContains: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
1076
1106
  maxItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
1077
1107
  minItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
1078
1108
  uniqueItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1079
- items: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
1109
+ items: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
1080
1110
  $ref: import("@scalar/typebox").TString;
1081
1111
  summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1082
1112
  description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -1085,8 +1115,8 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
1085
1115
  $global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1086
1116
  }>]>, import("@scalar/typebox").TObject<{
1087
1117
  '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
1088
- }>]>]>>;
1089
- prefixItems: import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
1118
+ }>]>]>, import("@scalar/typebox").TBoolean]>>;
1119
+ prefixItems: import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
1090
1120
  $ref: import("@scalar/typebox").TString;
1091
1121
  summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1092
1122
  description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -1095,7 +1125,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
1095
1125
  $global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1096
1126
  }>]>, import("@scalar/typebox").TObject<{
1097
1127
  '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
1098
- }>]>]>>>;
1128
+ }>]>]>, import("@scalar/typebox").TBoolean]>>>;
1099
1129
  }>, import("@scalar/typebox").TObject<{
1100
1130
  maxProperties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
1101
1131
  minProperties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
@@ -1141,6 +1171,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
1141
1171
  '$ref-value': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
1142
1172
  }>]>]>>;
1143
1173
  }>]>, import("@scalar/typebox").TObject<{
1174
+ $schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1144
1175
  $id: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1145
1176
  $anchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1146
1177
  $dynamicAnchor: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,cAAc,CAAA;AACnF,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,QAAQ,CAAA;AAC3D,OAAO,EAAE,KAAK,OAAO,EAAiC,MAAM,WAAW,CAAA;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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