@scalar/blocks 0.5.2 → 0.5.4

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 (108) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/code-example/helpers/operation-to-har/process-body.d.ts.map +1 -1
  3. package/dist/code-example/helpers/operation-to-har/process-body.js +42 -42
  4. package/dist/code-example/helpers/operation-to-har/process-body.js.map +1 -1
  5. package/dist/code-example/mount.d.ts.map +1 -1
  6. package/dist/code-example/mount.js +32 -31
  7. package/dist/code-example/mount.js.map +1 -1
  8. package/dist/constants.js +1 -1
  9. package/dist/schema/Schema.vue.d.ts.map +1 -1
  10. package/dist/schema/Schema.vue.js +1 -1
  11. package/dist/schema/Schema.vue.js.map +1 -1
  12. package/dist/schema/Schema.vue.script.js +122 -116
  13. package/dist/schema/Schema.vue.script.js.map +1 -1
  14. package/dist/schema/SchemaComposition.vue.d.ts.map +1 -1
  15. package/dist/schema/SchemaComposition.vue.js +1 -1
  16. package/dist/schema/SchemaComposition.vue.js.map +1 -1
  17. package/dist/schema/SchemaComposition.vue.script.js +110 -106
  18. package/dist/schema/SchemaComposition.vue.script.js.map +1 -1
  19. package/dist/schema/SchemaEnumPropertyItem.vue.js.map +1 -1
  20. package/dist/schema/SchemaEnumPropertyItem.vue.script.js +6 -6
  21. package/dist/schema/SchemaEnumPropertyItem.vue.script.js.map +1 -1
  22. package/dist/schema/SchemaHeading.vue.script.js +5 -5
  23. package/dist/schema/SchemaProperty.vue.d.ts +1 -1
  24. package/dist/schema/SchemaProperty.vue.d.ts.map +1 -1
  25. package/dist/schema/SchemaProperty.vue.js +1 -1
  26. package/dist/schema/SchemaProperty.vue.js.map +1 -1
  27. package/dist/schema/SchemaProperty.vue.script.js +179 -167
  28. package/dist/schema/SchemaProperty.vue.script.js.map +1 -1
  29. package/dist/schema/SchemaPropertyHeading.vue.d.ts +5 -3
  30. package/dist/schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  31. package/dist/schema/SchemaPropertyHeading.vue.js +1 -1
  32. package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -1
  33. package/dist/schema/SchemaPropertyHeading.vue.script.js +122 -117
  34. package/dist/schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  35. package/dist/schema/SchemaPropertyPattern.vue.js +1 -1
  36. package/dist/schema/SchemaPropertyPattern.vue.js.map +1 -1
  37. package/dist/schema/SchemaPropertyPattern.vue.script.js +1 -1
  38. package/dist/schema/SchemaPropertyPattern.vue.script.js.map +1 -1
  39. package/dist/schema/discriminator-metadata.d.ts +13 -0
  40. package/dist/schema/discriminator-metadata.d.ts.map +1 -0
  41. package/dist/schema/discriminator-metadata.js +6 -0
  42. package/dist/schema/discriminator-metadata.js.map +1 -0
  43. package/dist/schema/helpers/get-compositions-to-render.d.ts +3 -1
  44. package/dist/schema/helpers/get-compositions-to-render.d.ts.map +1 -1
  45. package/dist/schema/helpers/get-compositions-to-render.js +25 -24
  46. package/dist/schema/helpers/get-compositions-to-render.js.map +1 -1
  47. package/dist/schema/helpers/get-property-description.d.ts +6 -3
  48. package/dist/schema/helpers/get-property-description.d.ts.map +1 -1
  49. package/dist/schema/helpers/get-property-description.js +10 -10
  50. package/dist/schema/helpers/get-property-description.js.map +1 -1
  51. package/dist/schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  52. package/dist/schema/helpers/optimize-value-for-display.js +34 -33
  53. package/dist/schema/helpers/optimize-value-for-display.js.map +1 -1
  54. package/dist/schema/index.d.ts +2 -0
  55. package/dist/schema/index.d.ts.map +1 -1
  56. package/dist/schema/index.js +13 -11
  57. package/dist/schema/localization/index.d.ts +11 -1
  58. package/dist/schema/localization/index.d.ts.map +1 -1
  59. package/dist/schema/localization/locales/ar.d.ts +10 -0
  60. package/dist/schema/localization/locales/ar.d.ts.map +1 -1
  61. package/dist/schema/localization/locales/ar.js +11 -1
  62. package/dist/schema/localization/locales/ar.js.map +1 -1
  63. package/dist/schema/localization/locales/de.d.ts +10 -0
  64. package/dist/schema/localization/locales/de.d.ts.map +1 -1
  65. package/dist/schema/localization/locales/de.js +11 -1
  66. package/dist/schema/localization/locales/de.js.map +1 -1
  67. package/dist/schema/localization/locales/en.d.ts +10 -0
  68. package/dist/schema/localization/locales/en.d.ts.map +1 -1
  69. package/dist/schema/localization/locales/en.js +11 -1
  70. package/dist/schema/localization/locales/en.js.map +1 -1
  71. package/dist/schema/localization/locales/es.d.ts +10 -0
  72. package/dist/schema/localization/locales/es.d.ts.map +1 -1
  73. package/dist/schema/localization/locales/es.js +11 -1
  74. package/dist/schema/localization/locales/es.js.map +1 -1
  75. package/dist/schema/localization/locales/fr.d.ts +10 -0
  76. package/dist/schema/localization/locales/fr.d.ts.map +1 -1
  77. package/dist/schema/localization/locales/fr.js +11 -1
  78. package/dist/schema/localization/locales/fr.js.map +1 -1
  79. package/dist/schema/localization/locales/pt.d.ts +10 -0
  80. package/dist/schema/localization/locales/pt.d.ts.map +1 -1
  81. package/dist/schema/localization/locales/pt.js +11 -1
  82. package/dist/schema/localization/locales/pt.js.map +1 -1
  83. package/dist/schema/localization/locales/ru.d.ts +10 -0
  84. package/dist/schema/localization/locales/ru.d.ts.map +1 -1
  85. package/dist/schema/localization/locales/ru.js +11 -1
  86. package/dist/schema/localization/locales/ru.js.map +1 -1
  87. package/dist/schema/localization/locales/zh-cn.d.ts +10 -0
  88. package/dist/schema/localization/locales/zh-cn.d.ts.map +1 -1
  89. package/dist/schema/localization/locales/zh-cn.js +11 -1
  90. package/dist/schema/localization/locales/zh-cn.js.map +1 -1
  91. package/dist/schema/localization/locales/zh-tw.d.ts +10 -0
  92. package/dist/schema/localization/locales/zh-tw.d.ts.map +1 -1
  93. package/dist/schema/localization/locales/zh-tw.js +11 -1
  94. package/dist/schema/localization/locales/zh-tw.js.map +1 -1
  95. package/dist/schema/localization/translations.d.ts +90 -0
  96. package/dist/schema/localization/translations.d.ts.map +1 -1
  97. package/dist/shared/ExternalDocs.vue.d.ts +9 -0
  98. package/dist/shared/ExternalDocs.vue.d.ts.map +1 -0
  99. package/dist/shared/ExternalDocs.vue.js +7 -0
  100. package/dist/shared/ExternalDocs.vue.js.map +1 -0
  101. package/dist/shared/ExternalDocs.vue.script.js +46 -0
  102. package/dist/shared/ExternalDocs.vue.script.js.map +1 -0
  103. package/dist/shared/index.d.ts +1 -0
  104. package/dist/shared/index.d.ts.map +1 -1
  105. package/dist/shared/index.js +4 -3
  106. package/dist/style.css +63 -10
  107. package/dist/vue-styles.css +1 -1
  108. package/package.json +10 -10
@@ -0,0 +1,13 @@
1
+ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
2
+ /** Display-only discriminator information; symbols never enter exported API descriptions. */
3
+ export declare const schemaDiscriminator: unique symbol;
4
+ /** A schema view can explain inferred values without adding validation constraints. */
5
+ export type DiscriminatorMetadata = {
6
+ [schemaDiscriminator]?: {
7
+ value?: string;
8
+ inheritedVariants?: boolean;
9
+ };
10
+ };
11
+ /** Schema carrying renderer-only discriminator metadata. */
12
+ export type DiscriminatorSchema = SchemaObject & DiscriminatorMetadata;
13
+ //# sourceMappingURL=discriminator-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discriminator-metadata.d.ts","sourceRoot":"","sources":["../../src/schema/discriminator-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG,6FAA6F;AAC7F,eAAO,MAAM,mBAAmB,eAAiC,CAAA;AAEjE,uFAAuF;AACvF,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,mBAAmB,CAAC,CAAC,EAAE;QACtB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,CAAA;CACF,CAAA;AAED,4DAA4D;AAC5D,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,qBAAqB,CAAA"}
@@ -0,0 +1,6 @@
1
+ //#region src/schema/discriminator-metadata.ts
2
+ var e = Symbol("schema-discriminator");
3
+ //#endregion
4
+ export { e as schemaDiscriminator };
5
+
6
+ //# sourceMappingURL=discriminator-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discriminator-metadata.js","names":[],"sources":["../../src/schema/discriminator-metadata.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\n/** Display-only discriminator information; symbols never enter exported API descriptions. */\nexport const schemaDiscriminator = Symbol('schema-discriminator')\n\n/** A schema view can explain inferred values without adding validation constraints. */\nexport type DiscriminatorMetadata = {\n [schemaDiscriminator]?: {\n value?: string\n inheritedVariants?: boolean\n }\n}\n\n/** Schema carrying renderer-only discriminator metadata. */\nexport type DiscriminatorSchema = SchemaObject & DiscriminatorMetadata\n"],"mappings":";AAGA,IAAa,IAAsB,OAAO,sBAAsB"}
@@ -14,7 +14,9 @@ type DocumentSchemaLookup = Pick<OpenApiDocument, 'components'>;
14
14
  * Returns `null` when there is nothing to infer (an explicit composition is
15
15
  * already present, no document to resolve refs against, or no resolvable refs).
16
16
  */
17
- export declare const inferDiscriminatorMappingComposition: (value: SchemaObject, documentProp?: DocumentSchemaLookup) => SchemaObject | null;
17
+ export declare const inferDiscriminatorMappingComposition: (value: SchemaObject, documentProp?: DocumentSchemaLookup,
18
+ /** Inheritance can supply ordered variants, including schemas that share a mapped value. */
19
+ variantRefs?: readonly string[]) => SchemaObject | null;
18
20
  /**
19
21
  * Computes which compositions should be rendered and with which values
20
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-compositions-to-render.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/get-compositions-to-render.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIjH,OAAO,EAAE,KAAK,kBAAkB,EAAgB,MAAM,sBAAsB,CAAA;AAI5E,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA;AAK/D;;;;;;;;GAQG;AACH,eAAO,MAAM,oCAAoC,GAC/C,OAAO,YAAY,EACnB,eAAe,oBAAoB,KAClC,YAAY,GAAG,IA+CjB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,YAAY,GAAG,SAAS,EAC/B,WAAW,oBAAoB;AAC/B;;;;;GAKG;AACH,mCAAkC,YAAY,GAAG,IAEzC,KACP,mBAAmB,EAuCrB,CAAA"}
1
+ {"version":3,"file":"get-compositions-to-render.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/get-compositions-to-render.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIjH,OAAO,EAAE,KAAK,kBAAkB,EAAgB,MAAM,sBAAsB,CAAA;AAI5E,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA;AAK/D;;;;;;;;GAQG;AACH,eAAO,MAAM,oCAAoC,GAC/C,OAAO,YAAY,EACnB,eAAe,oBAAoB;AACnC,4FAA4F;AAC5F,cAAc,SAAS,MAAM,EAAE,KAC9B,YAAY,GAAG,IAiDjB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,YAAY,GAAG,SAAS,EAC/B,WAAW,oBAAoB;AAC/B;;;;;GAKG;AACH,mCAAkC,YAAY,GAAG,IAEzC,KACP,mBAAmB,EAuCrB,CAAA"}
@@ -2,38 +2,39 @@ import { getRefName as e } from "./get-ref-name.js";
2
2
  import { compositions as t } from "./schema-composition.js";
3
3
  import { shouldRenderArrayItemComposition as n } from "./should-render-array-item-composition.js";
4
4
  import { unwrapForRead as r } from "./unwrap-for-read.js";
5
- import { resolve as i } from "@scalar/workspace-store/resolve";
6
- import { isDefined as a } from "@scalar/helpers/array/is-defined";
7
- import { isArraySchema as o } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
5
+ import { isDefined as i } from "@scalar/helpers/array/is-defined";
6
+ import { unescapeJsonPointerSegment as a } from "@scalar/helpers/json/unescape-json-pointer-segment";
7
+ import { resolve as o } from "@scalar/workspace-store/resolve";
8
+ import { isArraySchema as s } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
8
9
  //#region src/schema/helpers/get-compositions-to-render.ts
9
- var s = (e) => e.startsWith("#/") || e.includes("/") ? e : `#/components/schemas/${e}`, c = (t, n) => {
10
+ var c = (e) => e.startsWith("#/") || e.includes("/") ? e : `#/components/schemas/${e}`, l = (t, n, s) => {
10
11
  if (t.oneOf || t.anyOf) return null;
11
- let o = t.discriminator?.mapping;
12
- if (!o) return null;
13
- let c = r(n);
14
- if (!c?.components?.schemas) return null;
15
- let l = Object.values(o).filter((e) => typeof e == "string").map((t) => {
16
- let n = s(t), r = e(n), a = r ? i.schema(c.components?.schemas?.[r]) : void 0;
17
- if (a) return {
12
+ let l = t.discriminator?.mapping;
13
+ if (!l) return null;
14
+ let u = r(n);
15
+ if (!u?.components?.schemas) return null;
16
+ let d = (s ?? Object.values(l)).filter((e) => typeof e == "string").map((t) => {
17
+ let n = c(t), r = e(n), i = r ? o.schema(u.components?.schemas?.[a(r)]) : void 0;
18
+ if (i) return {
18
19
  $ref: n,
19
- "$ref-value": a
20
+ "$ref-value": i
20
21
  };
21
- }).filter(a);
22
- return l.length === 0 ? null : {
23
- ...i.schema(t),
24
- oneOf: l
22
+ }).filter(i);
23
+ return d.length === 0 ? null : {
24
+ ...o.schema(t),
25
+ oneOf: d
25
26
  };
26
- }, l = (e, r, s = e ? c(e, r) : null) => e ? t.map((t) => t === "oneOf" && s ? {
27
+ }, u = (e, r, a = e ? l(e, r) : null) => e ? t.map((t) => t === "oneOf" && a ? {
27
28
  composition: t,
28
- value: s
29
- } : n(e, t) && o(e) && e.items ? {
29
+ value: a
30
+ } : n(e, t) && s(e) && e.items ? {
30
31
  composition: t,
31
- value: i.schema(e.items)
32
- } : e[t] && !(o(e) && e.items && typeof e.items == "object" && t in e.items) ? {
32
+ value: o.schema(e.items)
33
+ } : e[t] && !(s(e) && e.items && typeof e.items == "object" && t in e.items) ? {
33
34
  composition: t,
34
- value: i.schema(e)
35
- } : null).filter(a) : [];
35
+ value: o.schema(e)
36
+ } : null).filter(i) : [];
36
37
  //#endregion
37
- export { l as getCompositionsToRender, c as inferDiscriminatorMappingComposition };
38
+ export { u as getCompositionsToRender, l as inferDiscriminatorMappingComposition };
38
39
 
39
40
  //# sourceMappingURL=get-compositions-to-render.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-compositions-to-render.js","names":[],"sources":["../../../src/schema/helpers/get-compositions-to-render.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { OpenApiDocument, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport { getRefName } from './get-ref-name'\nimport { type CompositionKeyword, compositions } from './schema-composition'\nimport { shouldRenderArrayItemComposition } from './should-render-array-item-composition'\nimport { unwrapForRead } from './unwrap-for-read'\n\ntype CompositionToRender = {\n composition: CompositionKeyword\n value: SchemaObject\n}\n\ntype DocumentSchemaLookup = Pick<OpenApiDocument, 'components'>\n\nconst normalizeDiscriminatorMappingRef = (value: string) =>\n value.startsWith('#/') || value.includes('/') ? value : `#/components/schemas/${value}`\n\n/**\n * Builds a synthetic `oneOf` composition from a `discriminator.mapping` when the\n * schema declares a mapping but no explicit `oneOf`/`anyOf`. This is the shape\n * NSwag emits for polymorphic types, where the base type is a plain object with\n * a discriminator mapping pointing at the concrete variants.\n *\n * Returns `null` when there is nothing to infer (an explicit composition is\n * already present, no document to resolve refs against, or no resolvable refs).\n */\nexport const inferDiscriminatorMappingComposition = (\n value: SchemaObject,\n documentProp?: DocumentSchemaLookup,\n): SchemaObject | null => {\n if (value.oneOf || value.anyOf) {\n return null\n }\n\n // A schema without a mapping can never infer anything, so it is checked before the document is\n // touched at all: the document read below is by far the more expensive of the two.\n const mapping = value.discriminator?.mapping\n\n if (!mapping) {\n return null\n }\n\n // Reading `components.schemas` per row through the reactive and detect-changes layers is the\n // dominant cost of this helper, so the document is unwrapped once here. See `unwrapForRead`.\n const document = unwrapForRead(documentProp)\n\n if (!document?.components?.schemas) {\n return null\n }\n\n const refs = Object.values(mapping)\n .filter((mappingValue): mappingValue is string => typeof mappingValue === 'string')\n .map((mappingValue) => {\n const ref = normalizeDiscriminatorMappingRef(mappingValue)\n const refName = getRefName(ref)\n const refValue = refName ? resolve.schema(document.components?.schemas?.[refName]) : undefined\n\n if (!refValue) {\n return undefined\n }\n\n return {\n $ref: ref,\n '$ref-value': refValue,\n }\n })\n .filter(isDefined)\n\n if (refs.length === 0) {\n return null\n }\n\n return {\n ...resolve.schema(value),\n oneOf: refs,\n }\n}\n\n/**\n * Computes which compositions should be rendered and with which values\n *\n * @param value - The schema object to check for compositions\n * @returns Array of compositions to render with their values\n */\nexport const getCompositionsToRender = (\n value: SchemaObject | undefined,\n document?: DocumentSchemaLookup,\n /**\n * The `oneOf` inferred from a bare `discriminator.mapping`, when the caller has\n * already computed it. `SchemaProperty` needs the same value to decide whether\n * to suppress the duplicate base object block, so it passes it here to avoid\n * inferring twice. Omit it and it is inferred from `value`.\n */\n inferredDiscriminatorComposition: SchemaObject | null = value\n ? inferDiscriminatorMappingComposition(value, document)\n : null,\n): CompositionToRender[] => {\n if (!value) {\n return []\n }\n\n return compositions\n .map((composition) => {\n if (composition === 'oneOf' && inferredDiscriminatorComposition) {\n return {\n composition,\n value: inferredDiscriminatorComposition,\n }\n }\n\n // Check for array item-level composition first (more specific case)\n if (shouldRenderArrayItemComposition(value, composition) && isArraySchema(value) && value.items) {\n return {\n composition,\n value: resolve.schema(value.items),\n }\n }\n\n // Check for property-level composition\n if (value[composition]) {\n // Skip if array items have this composition (even if complex/not rendered)\n const hasArrayItemComposition =\n isArraySchema(value) && value.items && typeof value.items === 'object' && composition in value.items\n\n if (!hasArrayItemComposition) {\n return {\n composition,\n value: resolve.schema(value),\n }\n }\n }\n\n return null\n })\n .filter(isDefined)\n}\n"],"mappings":";;;;;;;;AAiBA,IAAM,KAAoC,MACxC,EAAM,WAAW,IAAI,KAAK,EAAM,SAAS,GAAG,IAAI,IAAQ,wBAAwB,KAWrE,KACX,GACA,MACwB;CACxB,IAAI,EAAM,SAAS,EAAM,OACvB,OAAO;CAKT,IAAM,IAAU,EAAM,eAAe;CAErC,IAAI,CAAC,GACH,OAAO;CAKT,IAAM,IAAW,EAAc,CAAY;CAE3C,IAAI,CAAC,GAAU,YAAY,SACzB,OAAO;CAGT,IAAM,IAAO,OAAO,OAAO,CAAO,CAAC,CAChC,QAAQ,MAAyC,OAAO,KAAiB,QAAQ,CAAC,CAClF,KAAK,MAAiB;EACrB,IAAM,IAAM,EAAiC,CAAY,GACnD,IAAU,EAAW,CAAG,GACxB,IAAW,IAAU,EAAQ,OAAO,EAAS,YAAY,UAAU,EAAQ,IAAI,KAAA;EAEhF,OAIL,OAAO;GACL,MAAM;GACN,cAAc;EAChB;CACF,CAAC,CAAC,CACD,OAAO,CAAS;CAMnB,OAJI,EAAK,WAAW,IACX,OAGF;EACL,GAAG,EAAQ,OAAO,CAAK;EACvB,OAAO;CACT;AACF,GAQa,KACX,GACA,GAOA,IAAwD,IACpD,EAAqC,GAAO,CAAQ,IACpD,SAEC,IAIE,EACJ,KAAK,MACA,MAAgB,WAAW,IACtB;CACL;CACA,OAAO;AACT,IAIE,EAAiC,GAAO,CAAW,KAAK,EAAc,CAAK,KAAK,EAAM,QACjF;CACL;CACA,OAAO,EAAQ,OAAO,EAAM,KAAK;AACnC,IAIE,EAAM,MAKJ,EAFF,EAAc,CAAK,KAAK,EAAM,SAAS,OAAO,EAAM,SAAU,YAAY,KAAe,EAAM,SAGxF;CACL;CACA,OAAO,EAAQ,OAAO,CAAK;AAC7B,IAIG,IACR,CAAC,CACD,OAAO,CAAS,IApCV,CAAC"}
1
+ {"version":3,"file":"get-compositions-to-render.js","names":[],"sources":["../../../src/schema/helpers/get-compositions-to-render.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { unescapeJsonPointerSegment } from '@scalar/helpers/json/unescape-json-pointer-segment'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { OpenApiDocument, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport { getRefName } from './get-ref-name'\nimport { type CompositionKeyword, compositions } from './schema-composition'\nimport { shouldRenderArrayItemComposition } from './should-render-array-item-composition'\nimport { unwrapForRead } from './unwrap-for-read'\n\ntype CompositionToRender = {\n composition: CompositionKeyword\n value: SchemaObject\n}\n\ntype DocumentSchemaLookup = Pick<OpenApiDocument, 'components'>\n\nconst normalizeDiscriminatorMappingRef = (value: string) =>\n value.startsWith('#/') || value.includes('/') ? value : `#/components/schemas/${value}`\n\n/**\n * Builds a synthetic `oneOf` composition from a `discriminator.mapping` when the\n * schema declares a mapping but no explicit `oneOf`/`anyOf`. This is the shape\n * NSwag emits for polymorphic types, where the base type is a plain object with\n * a discriminator mapping pointing at the concrete variants.\n *\n * Returns `null` when there is nothing to infer (an explicit composition is\n * already present, no document to resolve refs against, or no resolvable refs).\n */\nexport const inferDiscriminatorMappingComposition = (\n value: SchemaObject,\n documentProp?: DocumentSchemaLookup,\n /** Inheritance can supply ordered variants, including schemas that share a mapped value. */\n variantRefs?: readonly string[],\n): SchemaObject | null => {\n if (value.oneOf || value.anyOf) {\n return null\n }\n\n // A schema without a mapping can never infer anything, so it is checked before the document is\n // touched at all: the document read below is by far the more expensive of the two.\n const mapping = value.discriminator?.mapping\n\n if (!mapping) {\n return null\n }\n\n // Reading `components.schemas` per row through the reactive and detect-changes layers is the\n // dominant cost of this helper, so the document is unwrapped once here. See `unwrapForRead`.\n const document = unwrapForRead(documentProp)\n\n if (!document?.components?.schemas) {\n return null\n }\n\n const refs = (variantRefs ?? Object.values(mapping))\n .filter((mappingValue): mappingValue is string => typeof mappingValue === 'string')\n .map((mappingValue) => {\n const ref = normalizeDiscriminatorMappingRef(mappingValue)\n const refName = getRefName(ref)\n const refValue = refName\n ? resolve.schema(document.components?.schemas?.[unescapeJsonPointerSegment(refName)])\n : undefined\n\n if (!refValue) {\n return undefined\n }\n\n return {\n $ref: ref,\n '$ref-value': refValue,\n }\n })\n .filter(isDefined)\n\n if (refs.length === 0) {\n return null\n }\n\n return {\n ...resolve.schema(value),\n oneOf: refs,\n }\n}\n\n/**\n * Computes which compositions should be rendered and with which values\n *\n * @param value - The schema object to check for compositions\n * @returns Array of compositions to render with their values\n */\nexport const getCompositionsToRender = (\n value: SchemaObject | undefined,\n document?: DocumentSchemaLookup,\n /**\n * The `oneOf` inferred from a bare `discriminator.mapping`, when the caller has\n * already computed it. `SchemaProperty` needs the same value to decide whether\n * to suppress the duplicate base object block, so it passes it here to avoid\n * inferring twice. Omit it and it is inferred from `value`.\n */\n inferredDiscriminatorComposition: SchemaObject | null = value\n ? inferDiscriminatorMappingComposition(value, document)\n : null,\n): CompositionToRender[] => {\n if (!value) {\n return []\n }\n\n return compositions\n .map((composition) => {\n if (composition === 'oneOf' && inferredDiscriminatorComposition) {\n return {\n composition,\n value: inferredDiscriminatorComposition,\n }\n }\n\n // Check for array item-level composition first (more specific case)\n if (shouldRenderArrayItemComposition(value, composition) && isArraySchema(value) && value.items) {\n return {\n composition,\n value: resolve.schema(value.items),\n }\n }\n\n // Check for property-level composition\n if (value[composition]) {\n // Skip if array items have this composition (even if complex/not rendered)\n const hasArrayItemComposition =\n isArraySchema(value) && value.items && typeof value.items === 'object' && composition in value.items\n\n if (!hasArrayItemComposition) {\n return {\n composition,\n value: resolve.schema(value),\n }\n }\n }\n\n return null\n })\n .filter(isDefined)\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAM,KAAoC,MACxC,EAAM,WAAW,IAAI,KAAK,EAAM,SAAS,GAAG,IAAI,IAAQ,wBAAwB,KAWrE,KACX,GACA,GAEA,MACwB;CACxB,IAAI,EAAM,SAAS,EAAM,OACvB,OAAO;CAKT,IAAM,IAAU,EAAM,eAAe;CAErC,IAAI,CAAC,GACH,OAAO;CAKT,IAAM,IAAW,EAAc,CAAY;CAE3C,IAAI,CAAC,GAAU,YAAY,SACzB,OAAO;CAGT,IAAM,KAAQ,KAAe,OAAO,OAAO,CAAO,EAAA,CAC/C,QAAQ,MAAyC,OAAO,KAAiB,QAAQ,CAAC,CAClF,KAAK,MAAiB;EACrB,IAAM,IAAM,EAAiC,CAAY,GACnD,IAAU,EAAW,CAAG,GACxB,IAAW,IACb,EAAQ,OAAO,EAAS,YAAY,UAAU,EAA2B,CAAO,EAAE,IAClF,KAAA;EAEC,OAIL,OAAO;GACL,MAAM;GACN,cAAc;EAChB;CACF,CAAC,CAAC,CACD,OAAO,CAAS;CAMnB,OAJI,EAAK,WAAW,IACX,OAGF;EACL,GAAG,EAAQ,OAAO,CAAK;EACvB,OAAO;CACT;AACF,GAQa,KACX,GACA,GAOA,IAAwD,IACpD,EAAqC,GAAO,CAAQ,IACpD,SAEC,IAIE,EACJ,KAAK,MACA,MAAgB,WAAW,IACtB;CACL;CACA,OAAO;AACT,IAIE,EAAiC,GAAO,CAAW,KAAK,EAAc,CAAK,KAAK,EAAM,QACjF;CACL;CACA,OAAO,EAAQ,OAAO,EAAM,KAAK;AACnC,IAIE,EAAM,MAKJ,EAFF,EAAc,CAAK,KAAK,EAAM,SAAS,OAAO,EAAM,SAAU,YAAY,KAAe,EAAM,SAGxF;CACL;CACA,OAAO,EAAQ,OAAO,CAAK;AAC7B,IAIG,IACR,CAAC,CACD,OAAO,CAAS,IApCV,CAAC"}
@@ -1,9 +1,12 @@
1
+ import type { ApiReferenceTranslationKey } from '@scalar/types/api-reference';
1
2
  import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
3
+ type SchemaTranslationKey = Extract<ApiReferenceTranslationKey, `schema.${string}`>;
2
4
  /**
3
- * Generate property description from type/format
5
+ * Get the translation key of the property description from type/format
4
6
  *
5
7
  * @param value - The schema object to generate description from
6
- * @returns Description string or null if no description available
8
+ * @returns Translation key or null if no description available
7
9
  */
8
- export declare const getPropertyDescription: (value: SchemaObject | undefined) => string | null;
10
+ export declare const getPropertyDescriptionKey: (value: SchemaObject | undefined) => SchemaTranslationKey | null;
11
+ export {};
9
12
  //# sourceMappingURL=get-property-description.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-property-description.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/get-property-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAoBhG;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,YAAY,GAAG,SAAS,KAAG,MAAM,GAAG,IAkBjF,CAAA"}
1
+ {"version":3,"file":"get-property-description.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/get-property-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,KAAK,oBAAoB,GAAG,OAAO,CAAC,0BAA0B,EAAE,UAAU,MAAM,EAAE,CAAC,CAAA;AAmBnF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GAAI,OAAO,YAAY,GAAG,SAAS,KAAG,oBAAoB,GAAG,IAkBlG,CAAA"}
@@ -2,17 +2,17 @@ import { isSchema as e } from "@scalar/workspace-store/schemas/v3.2/strict/type-
2
2
  //#region src/schema/helpers/get-property-description.ts
3
3
  var t = {
4
4
  integer: {
5
- _default: "Integer numbers.",
6
- int32: "Signed 32-bit integers (commonly used integer type).",
7
- int64: "Signed 64-bit integers (long type)."
5
+ _default: "schema.typeInteger",
6
+ int32: "schema.formatInt32",
7
+ int64: "schema.formatInt64"
8
8
  },
9
9
  string: {
10
- date: "full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21",
11
- "date-time": "the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z",
12
- password: "a hint to UIs to mask the input",
13
- base64: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
14
- byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
15
- binary: "binary data, used to describe files"
10
+ date: "schema.formatDate",
11
+ "date-time": "schema.formatDateTime",
12
+ password: "schema.formatPassword",
13
+ base64: "schema.formatBase64",
14
+ byte: "schema.formatBase64",
15
+ binary: "schema.formatBinary"
16
16
  }
17
17
  }, n = (n) => {
18
18
  if (!e(n)) return null;
@@ -22,6 +22,6 @@ var t = {
22
22
  return i ? i["format" in n && n.format || "contentEncoding" in n && n.contentEncoding || "_default"] ?? null : null;
23
23
  };
24
24
  //#endregion
25
- export { n as getPropertyDescription };
25
+ export { n as getPropertyDescriptionKey };
26
26
 
27
27
  //# sourceMappingURL=get-property-description.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-property-description.js","names":[],"sources":["../../../src/schema/helpers/get-property-description.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isSchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\n// Type descriptions for built-in types\nconst TYPE_DESCRIPTIONS: Record<string, Record<string, string>> = {\n integer: {\n _default: 'Integer numbers.',\n int32: 'Signed 32-bit integers (commonly used integer type).',\n int64: 'Signed 64-bit integers (long type).',\n },\n string: {\n 'date': 'full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21',\n 'date-time': 'the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z',\n 'password': 'a hint to UIs to mask the input',\n 'base64': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n 'byte': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n 'binary': 'binary data, used to describe files',\n },\n} as const\n\n/**\n * Generate property description from type/format\n *\n * @param value - The schema object to generate description from\n * @returns Description string or null if no description available\n */\nexport const getPropertyDescription = (value: SchemaObject | undefined): string | null => {\n if (!isSchema(value)) {\n return null\n }\n /** Just grab the first type from the array if it's an array */\n const type = Array.isArray(value.type) ? value.type[0] : value.type\n if (!type) {\n return null\n }\n\n const typeDescriptions = TYPE_DESCRIPTIONS[type]\n if (!typeDescriptions) {\n return null\n }\n\n const format =\n ('format' in value && value.format) || ('contentEncoding' in value && value.contentEncoding) || '_default'\n return typeDescriptions[format] ?? null\n}\n"],"mappings":";;AAIA,IAAM,IAA4D;CAChE,SAAS;EACP,UAAU;EACV,OAAO;EACP,OAAO;CACT;CACA,QAAQ;EACN,MAAQ;EACR,aAAa;EACb,UAAY;EACZ,QAAU;EACV,MAAQ;EACR,QAAU;CACZ;AACF,GAQa,KAA0B,MAAmD;CACxF,IAAI,CAAC,EAAS,CAAK,GACjB,OAAO;CAGT,IAAM,IAAO,MAAM,QAAQ,EAAM,IAAI,IAAI,EAAM,KAAK,KAAK,EAAM;CAC/D,IAAI,CAAC,GACH,OAAO;CAGT,IAAM,IAAmB,EAAkB;CAO3C,OANK,IAME,EADJ,YAAY,KAAS,EAAM,UAAY,qBAAqB,KAAS,EAAM,mBAAoB,eAC/D,OAL1B;AAMX"}
1
+ {"version":3,"file":"get-property-description.js","names":[],"sources":["../../../src/schema/helpers/get-property-description.ts"],"sourcesContent":["import type { ApiReferenceTranslationKey } from '@scalar/types/api-reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isSchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\ntype SchemaTranslationKey = Extract<ApiReferenceTranslationKey, `schema.${string}`>\n\n// Type descriptions for built-in types\nconst TYPE_DESCRIPTIONS: Record<string, Record<string, SchemaTranslationKey>> = {\n integer: {\n _default: 'schema.typeInteger',\n int32: 'schema.formatInt32',\n int64: 'schema.formatInt64',\n },\n string: {\n 'date': 'schema.formatDate',\n 'date-time': 'schema.formatDateTime',\n 'password': 'schema.formatPassword',\n 'base64': 'schema.formatBase64',\n 'byte': 'schema.formatBase64',\n 'binary': 'schema.formatBinary',\n },\n} as const\n\n/**\n * Get the translation key of the property description from type/format\n *\n * @param value - The schema object to generate description from\n * @returns Translation key or null if no description available\n */\nexport const getPropertyDescriptionKey = (value: SchemaObject | undefined): SchemaTranslationKey | null => {\n if (!isSchema(value)) {\n return null\n }\n /** Just grab the first type from the array if it's an array */\n const type = Array.isArray(value.type) ? value.type[0] : value.type\n if (!type) {\n return null\n }\n\n const typeDescriptions = TYPE_DESCRIPTIONS[type]\n if (!typeDescriptions) {\n return null\n }\n\n const format =\n ('format' in value && value.format) || ('contentEncoding' in value && value.contentEncoding) || '_default'\n return typeDescriptions[format] ?? null\n}\n"],"mappings":";;AAOA,IAAM,IAA0E;CAC9E,SAAS;EACP,UAAU;EACV,OAAO;EACP,OAAO;CACT;CACA,QAAQ;EACN,MAAQ;EACR,aAAa;EACb,UAAY;EACZ,QAAU;EACV,MAAQ;EACR,QAAU;CACZ;AACF,GAQa,KAA6B,MAAiE;CACzG,IAAI,CAAC,EAAS,CAAK,GACjB,OAAO;CAGT,IAAM,IAAO,MAAM,QAAQ,EAAM,IAAI,IAAI,EAAM,KAAK,KAAK,EAAM;CAC/D,IAAI,CAAC,GACH,OAAO;CAGT,IAAM,IAAmB,EAAkB;CAO3C,OANK,IAME,EADJ,YAAY,KAAS,EAAM,UAAY,qBAAqB,KAAS,EAAM,mBAAoB,eAC/D,OAL1B;AAMX"}
@@ -1 +1 @@
1
- {"version":3,"file":"optimize-value-for-display.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/optimize-value-for-display.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,6FAA6F;AAC7F,KAAK,aAAa,GAAG,YAAY,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAmD1D;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAmHnG"}
1
+ {"version":3,"file":"optimize-value-for-display.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/optimize-value-for-display.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,6FAA6F;AAC7F,KAAK,aAAa,GAAG,YAAY,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAmD1D;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAyHnG"}
@@ -1,7 +1,8 @@
1
- import { compositions as e } from "./schema-composition.js";
2
- import { resolve as t } from "@scalar/workspace-store/resolve";
1
+ import { schemaDiscriminator as e } from "../discriminator-metadata.js";
2
+ import { compositions as t } from "./schema-composition.js";
3
+ import { resolve as n } from "@scalar/workspace-store/resolve";
3
4
  //#region src/schema/helpers/optimize-value-for-display.ts
4
- function n(...e) {
5
+ function r(...e) {
5
6
  let t = {}, n = {}, r = /* @__PURE__ */ new Set(), i = !1, a = !1;
6
7
  for (let o of e) if (o) for (let [e, s] of Object.entries(o)) {
7
8
  if (e === "properties" && s && typeof s == "object") {
@@ -17,48 +18,48 @@ function n(...e) {
17
18
  }
18
19
  return i && (t.properties = n), a && (t.required = [...r]), t;
19
20
  }
20
- function r(r) {
21
- if (!r || typeof r != "object") return r;
22
- let i = e.find((e) => e in r && e !== "not");
23
- if (!i) return { ...r };
24
- let a = r[i];
25
- if (!Array.isArray(a)) return { ...r };
26
- let { [i]: o, nullable: s, ...c } = r, l = Object.keys(c).length > 0, { filteredSchemas: u, hasNullSchema: d } = a.reduce((e, n) => {
27
- let r = t.schema(n);
21
+ function i(i) {
22
+ if (!i || typeof i != "object" || i[e]?.inheritedVariants) return i;
23
+ let a = t.find((e) => e in i && e !== "not");
24
+ if (!a) return { ...i };
25
+ let o = i[a];
26
+ if (!Array.isArray(o)) return { ...i };
27
+ let { [a]: s, nullable: c, ...l } = i, u = Object.keys(l).length > 0, { filteredSchemas: d, hasNullSchema: f } = o.reduce((e, t) => {
28
+ let r = n.schema(t);
28
29
  return "type" in r && r.type === "null" ? e.hasNullSchema = !0 : e.filteredSchemas.push(r), e;
29
30
  }, {
30
31
  filteredSchemas: [],
31
32
  hasNullSchema: !1
32
- }), f = d || s === !0;
33
- if (u.length === 1) {
34
- let e = n(u[0], c);
35
- return f && (e.nullable = !0), e;
33
+ }), p = f || c === !0;
34
+ if (d.length === 1) {
35
+ let e = r(d[0], l);
36
+ return p && (e.nullable = !0), e;
36
37
  }
37
- if ((i === "oneOf" || i === "anyOf") && (l || u.some((e) => e.allOf))) {
38
- let { discriminator: e, ...a } = c, o = u.map((e) => {
39
- let r = t.schema(e);
40
- if (r.allOf?.length === 1) {
41
- let { allOf: e, ...i } = r, o = t.schema(e[0]);
42
- if ("properties" in i || "required" in i || "$ref" in i) {
43
- let { $ref: e, title: t, name: r, ...s } = o;
44
- return n(a, i, s);
38
+ if ((a === "oneOf" || a === "anyOf") && (u || d.some((e) => e.allOf))) {
39
+ let { discriminator: e, ...t } = l, o = d.map((e) => {
40
+ let i = n.schema(e);
41
+ if (i.allOf?.length === 1) {
42
+ let { allOf: e, ...a } = i, o = n.schema(e[0]);
43
+ if ("properties" in a || "required" in a || "$ref" in a) {
44
+ let { $ref: e, title: n, name: i, ...s } = o;
45
+ return r(t, a, s);
45
46
  }
46
- return n(a, i, o);
47
+ return r(t, a, o);
47
48
  }
48
- return n(a, r);
49
- }), s = { [i]: o };
50
- return typeof r.description == "string" && (s.description = r.description), f && (s.nullable = !0), s;
49
+ return r(t, i);
50
+ }), s = { [a]: o };
51
+ return typeof i.description == "string" && (s.description = i.description), p && (s.nullable = !0), s;
51
52
  }
52
- if (u.length !== a.length) {
53
+ if (d.length !== o.length) {
53
54
  let e = {
54
- ...r,
55
- [i]: u
55
+ ...i,
56
+ [a]: d
56
57
  };
57
- return f && (e.nullable = !0), e;
58
+ return p && (e.nullable = !0), e;
58
59
  }
59
- return { ...r };
60
+ return { ...i };
60
61
  }
61
62
  //#endregion
62
- export { r as optimizeValueForDisplay };
63
+ export { i as optimizeValueForDisplay };
63
64
 
64
65
  //# sourceMappingURL=optimize-value-for-display.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"optimize-value-for-display.js","names":[],"sources":["../../../src/schema/helpers/optimize-value-for-display.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\nimport { compositions } from './schema-composition'\n\n/** Display normalization tracks null branches without changing the stored OpenAPI schema. */\ntype DisplaySchema = SchemaObject & { nullable?: boolean }\n\n/**\n * Shallow-merges schema-like objects, but unions `properties` and `required`\n * instead of letting a later object's `properties`/`required` completely\n * overwrite an earlier one's. Without this, a variant schema (e.g. a `oneOf`\n * branch) that declares its own `properties`/`required` would wipe out the\n * shared base fields factored out at the root (or via a sibling `allOf`)\n * instead of being combined with them (#9657).\n */\nfunction mergeSchemaProperties(...objects: (Record<string, unknown> | undefined)[]): Record<string, unknown> {\n const merged: Record<string, unknown> = {}\n const properties: Record<string, unknown> = {}\n const required = new Set<string>()\n let hasProperties = false\n let hasRequired = false\n\n for (const object of objects) {\n if (!object) {\n continue\n }\n\n for (const [key, val] of Object.entries(object)) {\n if (key === 'properties' && val && typeof val === 'object') {\n Object.assign(properties, val)\n hasProperties = true\n continue\n }\n\n if (key === 'required' && Array.isArray(val)) {\n for (const name of val) {\n required.add(name)\n }\n hasRequired = true\n continue\n }\n\n merged[key] = val\n }\n }\n\n if (hasProperties) {\n merged.properties = properties\n }\n if (hasRequired) {\n merged.required = [...required]\n }\n\n return merged\n}\n\n/**\n * Normalize compositions for display without changing the source schema. Null branches\n * become nullable state, single branches are flattened, and shared properties and\n * required fields are merged into variants so the renderer keeps their full context.\n */\nexport function optimizeValueForDisplay(value: DisplaySchema | undefined): DisplaySchema | undefined {\n if (!value || typeof value !== 'object') {\n return value\n }\n\n // Find the composition keyword early to avoid unnecessary work\n const composition = compositions.find((keyword) => keyword in value && keyword !== 'not')\n\n // If there's no relevant composition keyword, return a shallow copy\n if (!composition) {\n return { ...value }\n }\n\n const schemas = value[composition]\n if (!Array.isArray(schemas)) {\n return { ...value }\n }\n\n // Extract root properties efficiently (excluding composition and nullable)\n const { [composition]: _, nullable: originalNullable, ...rootProperties } = value\n const hasRootProperties = Object.keys(rootProperties).length > 0\n\n // Check for null schemas and filter them out in one pass\n const { filteredSchemas, hasNullSchema } = schemas.reduce<{\n filteredSchemas: SchemaObject[]\n hasNullSchema: boolean\n }>(\n (acc, _schema) => {\n const schema = resolve.schema(_schema)\n\n if ('type' in schema && schema.type === 'null') {\n acc.hasNullSchema = true\n } else {\n acc.filteredSchemas.push(schema)\n }\n return acc\n },\n { filteredSchemas: [], hasNullSchema: false },\n )\n\n // Determine if nullable should be set\n const shouldBeNullable = hasNullSchema || originalNullable === true\n\n // If only one schema remains after filtering, merge with root properties.\n // `properties`/`required` are unioned so sibling properties declared next to\n // the composition (e.g. `properties` alongside a single-`$ref` `allOf`) are\n // kept instead of being overwritten by the member schema's own `properties`.\n // Root-level annotations (title, description, …) win over the member's: they\n // describe the combined schema, not the base it extends.\n if (filteredSchemas.length === 1) {\n const mergedSchema = mergeSchemaProperties(filteredSchemas[0], rootProperties) as DisplaySchema\n if (shouldBeNullable) {\n mergedSchema.nullable = true\n }\n return mergedSchema\n }\n\n // Check if root properties should be merged into schemas\n const shouldMergeRootProperties =\n (composition === 'oneOf' || composition === 'anyOf') &&\n (hasRootProperties || filteredSchemas.some((schema) => schema.allOf))\n\n if (shouldMergeRootProperties) {\n // The discriminator belongs to the union, not to its variants. Copied into a variant, it\n // makes the variant look like a bare `discriminator.mapping` base, which then infers a\n // second selector inside the variant.\n const { discriminator: _discriminator, ...variantRootProperties } = rootProperties\n\n const mergedSchemas = filteredSchemas.map((_schema) => {\n const schema = resolve.schema(_schema)\n\n // Flatten single-item allOf and merge with root properties. If the\n // variant has its own properties/required/$ref, the allOf member's own\n // identity (`$ref`, `title`, `name`) is dropped before merging so it\n // cannot overwrite the variant's, which would otherwise mislabel the\n // flattened schema as the base it extends instead of the variant itself\n // (#9964). `getModelNameFromSchema` labels a variant by title → name →\n // $ref, so any of those leaking from the base is enough to mislabel it.\n // A variant that is a bare wrapper around the allOf member has no\n // identity of its own to protect, so the base's identity is kept as a\n // fallback label.\n if (schema.allOf?.length === 1) {\n const { allOf, ...otherProps } = schema\n const allOfMember = resolve.schema(allOf[0])!\n const variantHasOwnIdentity = 'properties' in otherProps || 'required' in otherProps || '$ref' in otherProps\n if (variantHasOwnIdentity) {\n const { $ref: _ref, title: _title, name: _name, ...allOfMemberWithoutIdentity } = allOfMember\n return mergeSchemaProperties(variantRootProperties, otherProps, allOfMemberWithoutIdentity)\n }\n return mergeSchemaProperties(variantRootProperties, otherProps, allOfMember)\n }\n return mergeSchemaProperties(variantRootProperties, schema)\n })\n\n // @ts-expect-error - We avoid using coerceValue here as it may be dangerous, so we type cast\n const result = { [composition]: mergedSchemas } as DisplaySchema\n if (typeof value.description === 'string') {\n result.description = value.description\n }\n if (shouldBeNullable) {\n result.nullable = true\n }\n return result\n }\n\n // Return with filtered schemas if any nulls were removed\n if (filteredSchemas.length !== schemas.length) {\n const result: DisplaySchema = { ...value, [composition]: filteredSchemas }\n if (shouldBeNullable) {\n result.nullable = true\n }\n return result\n }\n\n return { ...value }\n}\n"],"mappings":";;;AAgBA,SAAS,EAAsB,GAAG,GAA2E;CAC3G,IAAM,IAAkC,CAAC,GACnC,IAAsC,CAAC,GACvC,oBAAW,IAAI,IAAY,GAC7B,IAAgB,IAChB,IAAc;CAElB,KAAK,IAAM,KAAU,GACd,OAIL,KAAK,IAAM,CAAC,GAAK,MAAQ,OAAO,QAAQ,CAAM,GAAG;EAC/C,IAAI,MAAQ,gBAAgB,KAAO,OAAO,KAAQ,UAAU;GAE1D,AADA,OAAO,OAAO,GAAY,CAAG,GAC7B,IAAgB;GAChB;EACF;EAEA,IAAI,MAAQ,cAAc,MAAM,QAAQ,CAAG,GAAG;GAC5C,KAAK,IAAM,KAAQ,GACjB,EAAS,IAAI,CAAI;GAEnB,IAAc;GACd;EACF;EAEA,EAAO,KAAO;CAChB;CAUF,OAPI,MACF,EAAO,aAAa,IAElB,MACF,EAAO,WAAW,CAAC,GAAG,CAAQ,IAGzB;AACT;AAOA,SAAgB,EAAwB,GAA6D;CACnG,IAAI,CAAC,KAAS,OAAO,KAAU,UAC7B,OAAO;CAIT,IAAM,IAAc,EAAa,MAAM,MAAY,KAAW,KAAS,MAAY,KAAK;CAGxF,IAAI,CAAC,GACH,OAAO,EAAE,GAAG,EAAM;CAGpB,IAAM,IAAU,EAAM;CACtB,IAAI,CAAC,MAAM,QAAQ,CAAO,GACxB,OAAO,EAAE,GAAG,EAAM;CAIpB,IAAM,GAAG,IAAc,GAAG,UAAU,GAAkB,GAAG,MAAmB,GACtE,IAAoB,OAAO,KAAK,CAAc,CAAC,CAAC,SAAS,GAGzD,EAAE,oBAAiB,qBAAkB,EAAQ,QAIhD,GAAK,MAAY;EAChB,IAAM,IAAS,EAAQ,OAAO,CAAO;EAOrC,OALI,UAAU,KAAU,EAAO,SAAS,SACtC,EAAI,gBAAgB,KAEpB,EAAI,gBAAgB,KAAK,CAAM,GAE1B;CACT,GACA;EAAE,iBAAiB,CAAC;EAAG,eAAe;CAAM,CAC9C,GAGM,IAAmB,KAAiB,MAAqB;CAQ/D,IAAI,EAAgB,WAAW,GAAG;EAChC,IAAM,IAAe,EAAsB,EAAgB,IAAI,CAAc;EAI7E,OAHI,MACF,EAAa,WAAW,KAEnB;CACT;CAOA,KAHG,MAAgB,WAAW,MAAgB,aAC3C,KAAqB,EAAgB,MAAM,MAAW,EAAO,KAAK,IAEtC;EAI7B,IAAM,EAAE,eAAe,GAAgB,GAAG,MAA0B,GAE9D,IAAgB,EAAgB,KAAK,MAAY;GACrD,IAAM,IAAS,EAAQ,OAAO,CAAO;GAYrC,IAAI,EAAO,OAAO,WAAW,GAAG;IAC9B,IAAM,EAAE,UAAO,GAAG,MAAe,GAC3B,IAAc,EAAQ,OAAO,EAAM,EAAE;IAE3C,IAD8B,gBAAgB,KAAc,cAAc,KAAc,UAAU,GACvE;KACzB,IAAM,EAAE,MAAM,GAAM,OAAO,GAAQ,MAAM,GAAO,GAAG,MAA+B;KAClF,OAAO,EAAsB,GAAuB,GAAY,CAA0B;IAC5F;IACA,OAAO,EAAsB,GAAuB,GAAY,CAAW;GAC7E;GACA,OAAO,EAAsB,GAAuB,CAAM;EAC5D,CAAC,GAGK,IAAS,GAAG,IAAc,EAAc;EAO9C,OANI,OAAO,EAAM,eAAgB,aAC/B,EAAO,cAAc,EAAM,cAEzB,MACF,EAAO,WAAW,KAEb;CACT;CAGA,IAAI,EAAgB,WAAW,EAAQ,QAAQ;EAC7C,IAAM,IAAwB;GAAE,GAAG;IAAQ,IAAc;EAAgB;EAIzE,OAHI,MACF,EAAO,WAAW,KAEb;CACT;CAEA,OAAO,EAAE,GAAG,EAAM;AACpB"}
1
+ {"version":3,"file":"optimize-value-for-display.js","names":[],"sources":["../../../src/schema/helpers/optimize-value-for-display.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\nimport { type DiscriminatorSchema, schemaDiscriminator } from '../discriminator-metadata'\nimport { compositions } from './schema-composition'\n\n/** Display normalization tracks null branches without changing the stored OpenAPI schema. */\ntype DisplaySchema = SchemaObject & { nullable?: boolean }\n\n/**\n * Shallow-merges schema-like objects, but unions `properties` and `required`\n * instead of letting a later object's `properties`/`required` completely\n * overwrite an earlier one's. Without this, a variant schema (e.g. a `oneOf`\n * branch) that declares its own `properties`/`required` would wipe out the\n * shared base fields factored out at the root (or via a sibling `allOf`)\n * instead of being combined with them (#9657).\n */\nfunction mergeSchemaProperties(...objects: (Record<string, unknown> | undefined)[]): Record<string, unknown> {\n const merged: Record<string, unknown> = {}\n const properties: Record<string, unknown> = {}\n const required = new Set<string>()\n let hasProperties = false\n let hasRequired = false\n\n for (const object of objects) {\n if (!object) {\n continue\n }\n\n for (const [key, val] of Object.entries(object)) {\n if (key === 'properties' && val && typeof val === 'object') {\n Object.assign(properties, val)\n hasProperties = true\n continue\n }\n\n if (key === 'required' && Array.isArray(val)) {\n for (const name of val) {\n required.add(name)\n }\n hasRequired = true\n continue\n }\n\n merged[key] = val\n }\n }\n\n if (hasProperties) {\n merged.properties = properties\n }\n if (hasRequired) {\n merged.required = [...required]\n }\n\n return merged\n}\n\n/**\n * Normalize compositions for display without changing the source schema. Null branches\n * become nullable state, single branches are flattened, and shared properties and\n * required fields are merged into variants so the renderer keeps their full context.\n */\nexport function optimizeValueForDisplay(value: DisplaySchema | undefined): DisplaySchema | undefined {\n if (!value || typeof value !== 'object') {\n return value\n }\n\n // Inferred AsyncAPI variants already carry complete concrete schemas. Flattening\n // them would lose reference identities and merge the base identity into descendants.\n if ((value as DiscriminatorSchema)[schemaDiscriminator]?.inheritedVariants) {\n return value\n }\n\n // Find the composition keyword early to avoid unnecessary work\n const composition = compositions.find((keyword) => keyword in value && keyword !== 'not')\n\n // If there's no relevant composition keyword, return a shallow copy\n if (!composition) {\n return { ...value }\n }\n\n const schemas = value[composition]\n if (!Array.isArray(schemas)) {\n return { ...value }\n }\n\n // Extract root properties efficiently (excluding composition and nullable)\n const { [composition]: _, nullable: originalNullable, ...rootProperties } = value\n const hasRootProperties = Object.keys(rootProperties).length > 0\n\n // Check for null schemas and filter them out in one pass\n const { filteredSchemas, hasNullSchema } = schemas.reduce<{\n filteredSchemas: SchemaObject[]\n hasNullSchema: boolean\n }>(\n (acc, _schema) => {\n const schema = resolve.schema(_schema)\n\n if ('type' in schema && schema.type === 'null') {\n acc.hasNullSchema = true\n } else {\n acc.filteredSchemas.push(schema)\n }\n return acc\n },\n { filteredSchemas: [], hasNullSchema: false },\n )\n\n // Determine if nullable should be set\n const shouldBeNullable = hasNullSchema || originalNullable === true\n\n // If only one schema remains after filtering, merge with root properties.\n // `properties`/`required` are unioned so sibling properties declared next to\n // the composition (e.g. `properties` alongside a single-`$ref` `allOf`) are\n // kept instead of being overwritten by the member schema's own `properties`.\n // Root-level annotations (title, description, …) win over the member's: they\n // describe the combined schema, not the base it extends.\n if (filteredSchemas.length === 1) {\n const mergedSchema = mergeSchemaProperties(filteredSchemas[0], rootProperties) as DisplaySchema\n if (shouldBeNullable) {\n mergedSchema.nullable = true\n }\n return mergedSchema\n }\n\n // Check if root properties should be merged into schemas\n const shouldMergeRootProperties =\n (composition === 'oneOf' || composition === 'anyOf') &&\n (hasRootProperties || filteredSchemas.some((schema) => schema.allOf))\n\n if (shouldMergeRootProperties) {\n // The discriminator belongs to the union, not to its variants. Copied into a variant, it\n // makes the variant look like a bare `discriminator.mapping` base, which then infers a\n // second selector inside the variant.\n const { discriminator: _discriminator, ...variantRootProperties } = rootProperties\n\n const mergedSchemas = filteredSchemas.map((_schema) => {\n const schema = resolve.schema(_schema)\n\n // Flatten single-item allOf and merge with root properties. If the\n // variant has its own properties/required/$ref, the allOf member's own\n // identity (`$ref`, `title`, `name`) is dropped before merging so it\n // cannot overwrite the variant's, which would otherwise mislabel the\n // flattened schema as the base it extends instead of the variant itself\n // (#9964). `getModelNameFromSchema` labels a variant by title → name →\n // $ref, so any of those leaking from the base is enough to mislabel it.\n // A variant that is a bare wrapper around the allOf member has no\n // identity of its own to protect, so the base's identity is kept as a\n // fallback label.\n if (schema.allOf?.length === 1) {\n const { allOf, ...otherProps } = schema\n const allOfMember = resolve.schema(allOf[0])!\n const variantHasOwnIdentity = 'properties' in otherProps || 'required' in otherProps || '$ref' in otherProps\n if (variantHasOwnIdentity) {\n const { $ref: _ref, title: _title, name: _name, ...allOfMemberWithoutIdentity } = allOfMember\n return mergeSchemaProperties(variantRootProperties, otherProps, allOfMemberWithoutIdentity)\n }\n return mergeSchemaProperties(variantRootProperties, otherProps, allOfMember)\n }\n return mergeSchemaProperties(variantRootProperties, schema)\n })\n\n // @ts-expect-error - We avoid using coerceValue here as it may be dangerous, so we type cast\n const result = { [composition]: mergedSchemas } as DisplaySchema\n if (typeof value.description === 'string') {\n result.description = value.description\n }\n if (shouldBeNullable) {\n result.nullable = true\n }\n return result\n }\n\n // Return with filtered schemas if any nulls were removed\n if (filteredSchemas.length !== schemas.length) {\n const result: DisplaySchema = { ...value, [composition]: filteredSchemas }\n if (shouldBeNullable) {\n result.nullable = true\n }\n return result\n }\n\n return { ...value }\n}\n"],"mappings":";;;;AAiBA,SAAS,EAAsB,GAAG,GAA2E;CAC3G,IAAM,IAAkC,CAAC,GACnC,IAAsC,CAAC,GACvC,oBAAW,IAAI,IAAY,GAC7B,IAAgB,IAChB,IAAc;CAElB,KAAK,IAAM,KAAU,GACd,OAIL,KAAK,IAAM,CAAC,GAAK,MAAQ,OAAO,QAAQ,CAAM,GAAG;EAC/C,IAAI,MAAQ,gBAAgB,KAAO,OAAO,KAAQ,UAAU;GAE1D,AADA,OAAO,OAAO,GAAY,CAAG,GAC7B,IAAgB;GAChB;EACF;EAEA,IAAI,MAAQ,cAAc,MAAM,QAAQ,CAAG,GAAG;GAC5C,KAAK,IAAM,KAAQ,GACjB,EAAS,IAAI,CAAI;GAEnB,IAAc;GACd;EACF;EAEA,EAAO,KAAO;CAChB;CAUF,OAPI,MACF,EAAO,aAAa,IAElB,MACF,EAAO,WAAW,CAAC,GAAG,CAAQ,IAGzB;AACT;AAOA,SAAgB,EAAwB,GAA6D;CAOnG,IANI,CAAC,KAAS,OAAO,KAAU,YAM1B,EAA8B,EAAoB,EAAE,mBACvD,OAAO;CAIT,IAAM,IAAc,EAAa,MAAM,MAAY,KAAW,KAAS,MAAY,KAAK;CAGxF,IAAI,CAAC,GACH,OAAO,EAAE,GAAG,EAAM;CAGpB,IAAM,IAAU,EAAM;CACtB,IAAI,CAAC,MAAM,QAAQ,CAAO,GACxB,OAAO,EAAE,GAAG,EAAM;CAIpB,IAAM,GAAG,IAAc,GAAG,UAAU,GAAkB,GAAG,MAAmB,GACtE,IAAoB,OAAO,KAAK,CAAc,CAAC,CAAC,SAAS,GAGzD,EAAE,oBAAiB,qBAAkB,EAAQ,QAIhD,GAAK,MAAY;EAChB,IAAM,IAAS,EAAQ,OAAO,CAAO;EAOrC,OALI,UAAU,KAAU,EAAO,SAAS,SACtC,EAAI,gBAAgB,KAEpB,EAAI,gBAAgB,KAAK,CAAM,GAE1B;CACT,GACA;EAAE,iBAAiB,CAAC;EAAG,eAAe;CAAM,CAC9C,GAGM,IAAmB,KAAiB,MAAqB;CAQ/D,IAAI,EAAgB,WAAW,GAAG;EAChC,IAAM,IAAe,EAAsB,EAAgB,IAAI,CAAc;EAI7E,OAHI,MACF,EAAa,WAAW,KAEnB;CACT;CAOA,KAHG,MAAgB,WAAW,MAAgB,aAC3C,KAAqB,EAAgB,MAAM,MAAW,EAAO,KAAK,IAEtC;EAI7B,IAAM,EAAE,eAAe,GAAgB,GAAG,MAA0B,GAE9D,IAAgB,EAAgB,KAAK,MAAY;GACrD,IAAM,IAAS,EAAQ,OAAO,CAAO;GAYrC,IAAI,EAAO,OAAO,WAAW,GAAG;IAC9B,IAAM,EAAE,UAAO,GAAG,MAAe,GAC3B,IAAc,EAAQ,OAAO,EAAM,EAAE;IAE3C,IAD8B,gBAAgB,KAAc,cAAc,KAAc,UAAU,GACvE;KACzB,IAAM,EAAE,MAAM,GAAM,OAAO,GAAQ,MAAM,GAAO,GAAG,MAA+B;KAClF,OAAO,EAAsB,GAAuB,GAAY,CAA0B;IAC5F;IACA,OAAO,EAAsB,GAAuB,GAAY,CAAW;GAC7E;GACA,OAAO,EAAsB,GAAuB,CAAM;EAC5D,CAAC,GAGK,IAAS,GAAG,IAAc,EAAc;EAO9C,OANI,OAAO,EAAM,eAAgB,aAC/B,EAAO,cAAc,EAAM,cAEzB,MACF,EAAO,WAAW,KAEb;CACT;CAGA,IAAI,EAAgB,WAAW,EAAQ,QAAQ;EAC7C,IAAM,IAAwB;GAAE,GAAG;IAAQ,IAAc;EAAgB;EAIzE,OAHI,MACF,EAAO,WAAW,KAEb;CACT;CAEA,OAAO,EAAE,GAAG,EAAM;AACpB"}
@@ -1,3 +1,5 @@
1
+ export { type DiscriminatorSchema, schemaDiscriminator } from './discriminator-metadata';
2
+ export { inferDiscriminatorMappingComposition } from './helpers/get-compositions-to-render';
1
3
  export { default as LinkButton } from './LinkButton.vue';
2
4
  export { schemaTranslations } from './localization/translations';
3
5
  export { REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, type RequestBodyCompositionSelection, } from './request-body-composition-index';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EACL,qCAAqC,EACrC,KAAK,+BAA+B,GACrC,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,oCAAoC,CAAA;AAC5F,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACxF,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAA;AAC3F,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EACL,qCAAqC,EACrC,KAAK,+BAA+B,GACrC,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,oCAAoC,CAAA;AAC5F,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA"}
@@ -1,11 +1,13 @@
1
- import e from "./LinkButton.vue.js";
2
- import { schemaTranslations as t } from "./localization/translations.js";
3
- import { REQUEST_BODY_COMPOSITION_INDEX_SYMBOL as n } from "./request-body-composition-index.js";
4
- import r from "./SchemaGlyphPuck.vue.js";
5
- import i from "./SchemaRailPanel.vue.js";
6
- import a from "./SchemaGutterToggle.vue.js";
7
- import o from "./SchemaProperty.vue.js";
8
- import s from "./Schema.vue.js";
9
- import c from "./SchemaHeading.vue.js";
10
- import l from "./SchemaObjectExampleCodeBlock.vue.js";
11
- export { e as LinkButton, n as REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, s as Schema, r as SchemaGlyphPuck, a as SchemaGutterToggle, c as SchemaHeading, l as SchemaObjectExampleCodeBlock, o as SchemaProperty, i as SchemaRailPanel, t as schemaTranslations };
1
+ import { schemaDiscriminator as e } from "./discriminator-metadata.js";
2
+ import { inferDiscriminatorMappingComposition as t } from "./helpers/get-compositions-to-render.js";
3
+ import n from "./LinkButton.vue.js";
4
+ import { schemaTranslations as r } from "./localization/translations.js";
5
+ import { REQUEST_BODY_COMPOSITION_INDEX_SYMBOL as i } from "./request-body-composition-index.js";
6
+ import a from "./SchemaGlyphPuck.vue.js";
7
+ import o from "./SchemaRailPanel.vue.js";
8
+ import s from "./SchemaGutterToggle.vue.js";
9
+ import c from "./SchemaProperty.vue.js";
10
+ import l from "./Schema.vue.js";
11
+ import u from "./SchemaHeading.vue.js";
12
+ import d from "./SchemaObjectExampleCodeBlock.vue.js";
13
+ export { n as LinkButton, i as REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, l as Schema, a as SchemaGlyphPuck, s as SchemaGutterToggle, u as SchemaHeading, d as SchemaObjectExampleCodeBlock, c as SchemaProperty, o as SchemaRailPanel, t as inferDiscriminatorMappingComposition, e as schemaDiscriminator, r as schemaTranslations };
@@ -13,6 +13,8 @@ export declare const useLocalization: () => import("@scalar/localization").Local
13
13
  forName: string;
14
14
  showSchemaDetails: string;
15
15
  oneOf: string;
16
+ variants: string;
17
+ discriminatorValue: string;
16
18
  anyOf: string;
17
19
  allOf: string;
18
20
  not: string;
@@ -47,6 +49,14 @@ export declare const useLocalization: () => import("@scalar/localization").Local
47
49
  unique: string;
48
50
  values: string;
49
51
  writeOnly: string;
52
+ typeInteger: string;
53
+ formatInt32: string;
54
+ formatInt64: string;
55
+ formatDate: string;
56
+ formatDateTime: string;
57
+ formatPassword: string;
58
+ formatBase64: string;
59
+ formatBinary: string;
50
60
  };
51
61
  common: {
52
62
  copyDefault: string;
@@ -55,5 +65,5 @@ export declare const useLocalization: () => import("@scalar/localization").Local
55
65
  actions: {
56
66
  copyLinkTo: string;
57
67
  };
58
- }, ("schema.keys" | "schema.values" | "schema.example" | "schema.type" | "schema.format" | "schema.default" | "schema.enum" | "schema.const" | "schema.deprecated" | "schema.discriminator" | "schema.readOnly" | "schema.writeOnly" | "schema.examples" | "schema.allOf" | "schema.oneOf" | "schema.anyOf" | "schema.not" | "schema.multipleOf" | "schema.maxLength" | "schema.minLength" | "schema.pattern" | "schema.required" | "schema.additionalProperties" | "schema.propertyNames" | "schema.schema" | "schema.nullable" | "schema.recursive" | "schema.max" | "schema.min" | "schema.unique" | "schema.noAllowedValues" | "schema.emptyObject" | "schema.showAdditionalProperties" | "schema.showOneMoreProperty" | "schema.showMoreProperties" | "schema.forName" | "schema.showSchemaDetails" | "schema.unknownType" | "schema.propertyCount" | "schema.headerCount" | "schema.recursiveReference" | "schema.greaterThan" | "schema.lessThan" | "schema.copyPattern" | "schema.hideValues" | "schema.showAllValues") | "actions.copyLinkTo" | "common.copyDefault" | "common.copyExample">;
68
+ }, ("schema.keys" | "schema.values" | "schema.example" | "schema.type" | "schema.format" | "schema.default" | "schema.enum" | "schema.const" | "schema.deprecated" | "schema.discriminator" | "schema.readOnly" | "schema.writeOnly" | "schema.examples" | "schema.allOf" | "schema.oneOf" | "schema.anyOf" | "schema.not" | "schema.multipleOf" | "schema.maxLength" | "schema.minLength" | "schema.pattern" | "schema.required" | "schema.additionalProperties" | "schema.propertyNames" | "schema.schema" | "schema.nullable" | "schema.recursive" | "schema.max" | "schema.min" | "schema.unique" | "schema.variants" | "schema.discriminatorValue" | "schema.noAllowedValues" | "schema.emptyObject" | "schema.showAdditionalProperties" | "schema.showOneMoreProperty" | "schema.showMoreProperties" | "schema.forName" | "schema.showSchemaDetails" | "schema.unknownType" | "schema.propertyCount" | "schema.headerCount" | "schema.recursiveReference" | "schema.greaterThan" | "schema.lessThan" | "schema.copyPattern" | "schema.hideValues" | "schema.showAllValues" | "schema.typeInteger" | "schema.formatInt32" | "schema.formatInt64" | "schema.formatDate" | "schema.formatDateTime" | "schema.formatPassword" | "schema.formatBase64" | "schema.formatBinary") | "actions.copyLinkTo" | "common.copyDefault" | "common.copyExample">;
59
69
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/localization/index.ts"],"names":[],"mappings":"AAKA,mGAAmG;AACnG,eAAO,MAAQ,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qiCAW5B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/localization/index.ts"],"names":[],"mappings":"AAKA,mGAAmG;AACnG,eAAO,MAAQ,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sxCAW5B,CAAA"}
@@ -1,5 +1,7 @@
1
1
  export declare const ar: {
2
2
  schema: {
3
+ variants: string;
4
+ discriminatorValue: string;
3
5
  noAllowedValues: string;
4
6
  example: string;
5
7
  examples: string;
@@ -46,6 +48,14 @@ export declare const ar: {
46
48
  unique: string;
47
49
  values: string;
48
50
  writeOnly: string;
51
+ typeInteger: string;
52
+ formatInt32: string;
53
+ formatInt64: string;
54
+ formatDate: string;
55
+ formatDateTime: string;
56
+ formatPassword: string;
57
+ formatBase64: string;
58
+ formatBinary: string;
49
59
  };
50
60
  common: {
51
61
  copyDefault: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../../src/schema/localization/locales/ar.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDd,CAAA"}
1
+ {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../../src/schema/localization/locales/ar.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Dd,CAAA"}
@@ -1,6 +1,8 @@
1
1
  //#region src/schema/localization/locales/ar.ts
2
2
  var e = {
3
3
  schema: {
4
+ variants: "المتغيرات",
5
+ discriminatorValue: "قيمة المميز",
4
6
  noAllowedValues: "لا توجد قيم تستوفي قيد التعداد هذا.",
5
7
  example: "مثال",
6
8
  examples: "أمثلة",
@@ -46,7 +48,15 @@ var e = {
46
48
  type: "النوع",
47
49
  unique: "فريد",
48
50
  values: "القيم",
49
- writeOnly: "كتابة فقط"
51
+ writeOnly: "كتابة فقط",
52
+ typeInteger: "أعداد صحيحة.",
53
+ formatInt32: "أعداد صحيحة بإشارة بطول 32 بت (نوع الأعداد الصحيحة الشائع).",
54
+ formatInt64: "أعداد صحيحة بإشارة بطول 64 بت (النوع long).",
55
+ formatDate: "تدوين full-date وفق RFC 3339، القسم 5.6، مثلًا 2017-07-21",
56
+ formatDateTime: "تدوين date-time وفق RFC 3339، القسم 5.6، مثلًا 2017-07-21T17:32:28Z",
57
+ formatPassword: "تلميح للواجهات بإخفاء الإدخال",
58
+ formatBase64: "أحرف بترميز base64، مثلًا U3dhZ2dlciByb2Nrcw==",
59
+ formatBinary: "بيانات ثنائية لوصف الملفات"
50
60
  },
51
61
  common: {
52
62
  copyDefault: "نسخ القيمة الافتراضية",
@@ -1 +1 @@
1
- {"version":3,"file":"ar.js","names":[],"sources":["../../../../src/schema/localization/locales/ar.ts"],"sourcesContent":["export const ar = {\n schema: {\n noAllowedValues: 'لا توجد قيم تستوفي قيد التعداد هذا.',\n example: 'مثال',\n examples: 'أمثلة',\n default: 'الافتراضي',\n schema: 'المخطط',\n emptyObject: 'كائن فارغ',\n showAdditionalProperties: 'إظهار الخصائص الإضافية',\n showOneMoreProperty: 'إظهار خاصية إضافية واحدة',\n showMoreProperties: 'إظهار المزيد من الخصائص ({count})',\n forName: 'لـ {name}',\n showSchemaDetails: 'إظهار تفاصيل المخطط',\n oneOf: 'واحد من',\n anyOf: 'أي من',\n allOf: 'كل من',\n not: 'ليس',\n unknownType: 'نوع غير معروف',\n propertyCount: 'الخصائص: {count}',\n headerCount: 'الترويسات: {count}',\n recursiveReference: 'مرجع تكراري إلى {name}',\n recursive: 'تكراري',\n additionalProperties: 'خصائص إضافية',\n const: 'ثابت',\n deprecated: 'مهمل',\n discriminator: 'المميّز',\n enum: 'تعداد',\n format: 'التنسيق',\n greaterThan: 'أكبر من',\n keys: 'المفاتيح',\n lessThan: 'أقل من',\n max: 'الحد الأقصى',\n min: 'الحد الأدنى',\n maxLength: 'أقصى طول',\n minLength: 'أدنى طول',\n multipleOf: 'مضاعف لـ',\n nullable: 'يقبل null',\n propertyNames: 'أسماء الخصائص',\n pattern: 'النمط',\n copyPattern: 'نسخ النمط',\n readOnly: 'قراءة فقط',\n required: 'مطلوب',\n hideValues: 'إخفاء القيم',\n showAllValues: 'عرض كل القيم',\n type: 'النوع',\n unique: 'فريد',\n values: 'القيم',\n writeOnly: 'كتابة فقط',\n },\n common: { copyDefault: 'نسخ القيمة الافتراضية', copyExample: 'نسخ القيمة النموذجية' },\n actions: { copyLinkTo: 'نسخ الرابط إلى {name}' },\n}\n"],"mappings":";AAAA,IAAa,IAAK;CAChB,QAAQ;EACN,iBAAiB;EACjB,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;EACb,0BAA0B;EAC1B,qBAAqB;EACrB,oBAAoB;EACpB,SAAS;EACT,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,OAAO;EACP,KAAK;EACL,aAAa;EACb,eAAe;EACf,aAAa;EACb,oBAAoB;EACpB,WAAW;EACX,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,aAAa;EACb,MAAM;EACN,UAAU;EACV,KAAK;EACL,KAAK;EACL,WAAW;EACX,WAAW;EACX,YAAY;EACZ,UAAU;EACV,eAAe;EACf,SAAS;EACT,aAAa;EACb,UAAU;EACV,UAAU;EACV,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;CACb;CACA,QAAQ;EAAE,aAAa;EAAyB,aAAa;CAAuB;CACpF,SAAS,EAAE,YAAY,wBAAwB;AACjD"}
1
+ {"version":3,"file":"ar.js","names":[],"sources":["../../../../src/schema/localization/locales/ar.ts"],"sourcesContent":["export const ar = {\n schema: {\n variants: 'المتغيرات',\n discriminatorValue: 'قيمة المميز',\n noAllowedValues: 'لا توجد قيم تستوفي قيد التعداد هذا.',\n example: 'مثال',\n examples: 'أمثلة',\n default: 'الافتراضي',\n schema: 'المخطط',\n emptyObject: 'كائن فارغ',\n showAdditionalProperties: 'إظهار الخصائص الإضافية',\n showOneMoreProperty: 'إظهار خاصية إضافية واحدة',\n showMoreProperties: 'إظهار المزيد من الخصائص ({count})',\n forName: 'لـ {name}',\n showSchemaDetails: 'إظهار تفاصيل المخطط',\n oneOf: 'واحد من',\n anyOf: 'أي من',\n allOf: 'كل من',\n not: 'ليس',\n unknownType: 'نوع غير معروف',\n propertyCount: 'الخصائص: {count}',\n headerCount: 'الترويسات: {count}',\n recursiveReference: 'مرجع تكراري إلى {name}',\n recursive: 'تكراري',\n additionalProperties: 'خصائص إضافية',\n const: 'ثابت',\n deprecated: 'مهمل',\n discriminator: 'المميّز',\n enum: 'تعداد',\n format: 'التنسيق',\n greaterThan: 'أكبر من',\n keys: 'المفاتيح',\n lessThan: 'أقل من',\n max: 'الحد الأقصى',\n min: 'الحد الأدنى',\n maxLength: 'أقصى طول',\n minLength: 'أدنى طول',\n multipleOf: 'مضاعف لـ',\n nullable: 'يقبل null',\n propertyNames: 'أسماء الخصائص',\n pattern: 'النمط',\n copyPattern: 'نسخ النمط',\n readOnly: 'قراءة فقط',\n required: 'مطلوب',\n hideValues: 'إخفاء القيم',\n showAllValues: 'عرض كل القيم',\n type: 'النوع',\n unique: 'فريد',\n values: 'القيم',\n writeOnly: 'كتابة فقط',\n typeInteger: 'أعداد صحيحة.',\n formatInt32: 'أعداد صحيحة بإشارة بطول 32 بت (نوع الأعداد الصحيحة الشائع).',\n formatInt64: 'أعداد صحيحة بإشارة بطول 64 بت (النوع long).',\n formatDate: 'تدوين full-date وفق RFC 3339، القسم 5.6، مثلًا 2017-07-21',\n formatDateTime: 'تدوين date-time وفق RFC 3339، القسم 5.6، مثلًا 2017-07-21T17:32:28Z',\n formatPassword: 'تلميح للواجهات بإخفاء الإدخال',\n formatBase64: 'أحرف بترميز base64، مثلًا U3dhZ2dlciByb2Nrcw==',\n formatBinary: 'بيانات ثنائية لوصف الملفات',\n },\n common: { copyDefault: 'نسخ القيمة الافتراضية', copyExample: 'نسخ القيمة النموذجية' },\n actions: { copyLinkTo: 'نسخ الرابط إلى {name}' },\n}\n"],"mappings":";AAAA,IAAa,IAAK;CAChB,QAAQ;EACN,UAAU;EACV,oBAAoB;EACpB,iBAAiB;EACjB,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;EACb,0BAA0B;EAC1B,qBAAqB;EACrB,oBAAoB;EACpB,SAAS;EACT,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,OAAO;EACP,KAAK;EACL,aAAa;EACb,eAAe;EACf,aAAa;EACb,oBAAoB;EACpB,WAAW;EACX,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,aAAa;EACb,MAAM;EACN,UAAU;EACV,KAAK;EACL,KAAK;EACL,WAAW;EACX,WAAW;EACX,YAAY;EACZ,UAAU;EACV,eAAe;EACf,SAAS;EACT,aAAa;EACb,UAAU;EACV,UAAU;EACV,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;EACX,aAAa;EACb,aAAa;EACb,aAAa;EACb,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,cAAc;EACd,cAAc;CAChB;CACA,QAAQ;EAAE,aAAa;EAAyB,aAAa;CAAuB;CACpF,SAAS,EAAE,YAAY,wBAAwB;AACjD"}
@@ -1,5 +1,7 @@
1
1
  export declare const de: {
2
2
  schema: {
3
+ variants: string;
4
+ discriminatorValue: string;
3
5
  noAllowedValues: string;
4
6
  example: string;
5
7
  examples: string;
@@ -46,6 +48,14 @@ export declare const de: {
46
48
  unique: string;
47
49
  values: string;
48
50
  writeOnly: string;
51
+ typeInteger: string;
52
+ formatInt32: string;
53
+ formatInt64: string;
54
+ formatDate: string;
55
+ formatDateTime: string;
56
+ formatPassword: string;
57
+ formatBase64: string;
58
+ formatBinary: string;
49
59
  };
50
60
  common: {
51
61
  copyDefault: string;
@@ -1 +1 @@
1
- {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../../src/schema/localization/locales/de.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDd,CAAA"}
1
+ {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../../src/schema/localization/locales/de.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Dd,CAAA"}
@@ -1,6 +1,8 @@
1
1
  //#region src/schema/localization/locales/de.ts
2
2
  var e = {
3
3
  schema: {
4
+ variants: "Varianten",
5
+ discriminatorValue: "Diskriminatorwert",
4
6
  noAllowedValues: "Keine Werte erfüllen diese Enum-Bedingung.",
5
7
  example: "Beispiel",
6
8
  examples: "Beispiele",
@@ -46,7 +48,15 @@ var e = {
46
48
  type: "Typ",
47
49
  unique: "eindeutig",
48
50
  values: "Werte",
49
- writeOnly: "nur schreibbar"
51
+ writeOnly: "nur schreibbar",
52
+ typeInteger: "Ganzzahlen.",
53
+ formatInt32: "Vorzeichenbehaftete 32-Bit-Ganzzahlen (üblicher Ganzzahltyp).",
54
+ formatInt64: "Vorzeichenbehaftete 64-Bit-Ganzzahlen (Typ long).",
55
+ formatDate: "full-date-Notation gemäß RFC 3339, Abschnitt 5.6, zum Beispiel 2017-07-21",
56
+ formatDateTime: "date-time-Notation gemäß RFC 3339, Abschnitt 5.6, zum Beispiel 2017-07-21T17:32:28Z",
57
+ formatPassword: "Hinweis an Oberflächen, die Eingabe zu maskieren",
58
+ formatBase64: "Base64-kodierte Zeichen, zum Beispiel U3dhZ2dlciByb2Nrcw==",
59
+ formatBinary: "Binärdaten zur Beschreibung von Dateien"
50
60
  },
51
61
  common: {
52
62
  copyDefault: "Standardwert kopieren",
@@ -1 +1 @@
1
- {"version":3,"file":"de.js","names":[],"sources":["../../../../src/schema/localization/locales/de.ts"],"sourcesContent":["export const de = {\n schema: {\n noAllowedValues: 'Keine Werte erfüllen diese Enum-Bedingung.',\n example: 'Beispiel',\n examples: 'Beispiele',\n default: 'Standard',\n schema: 'Schema',\n emptyObject: 'Leeres Objekt',\n showAdditionalProperties: 'Zusätzliche Eigenschaften anzeigen',\n showOneMoreProperty: '1 weitere Eigenschaft anzeigen',\n showMoreProperties: '{count} weitere Eigenschaften anzeigen',\n forName: 'für {name}',\n showSchemaDetails: 'Schema-Details anzeigen',\n oneOf: 'Eines von',\n anyOf: 'Beliebiges von',\n allOf: 'Alle von',\n not: 'Nicht',\n unknownType: 'unbekannter Typ',\n propertyCount: 'Eigenschaften: {count}',\n headerCount: 'Header: {count}',\n recursiveReference: 'Rekursiver Verweis auf {name}',\n recursive: 'rekursiv',\n additionalProperties: 'zusätzliche Eigenschaften',\n const: 'Konstante',\n deprecated: 'veraltet',\n discriminator: 'Diskriminator',\n enum: 'enum',\n format: 'Format',\n greaterThan: 'größer als',\n keys: 'Schlüssel',\n lessThan: 'kleiner als',\n max: 'max.',\n min: 'min.',\n maxLength: 'max. Länge',\n minLength: 'min. Länge',\n multipleOf: 'Vielfaches von',\n nullable: 'nullable',\n propertyNames: 'Eigenschaftsnamen',\n pattern: 'Muster',\n copyPattern: 'Muster kopieren',\n readOnly: 'nur lesbar',\n required: 'erforderlich',\n hideValues: 'Werte ausblenden',\n showAllValues: 'Alle Werte anzeigen',\n type: 'Typ',\n unique: 'eindeutig',\n values: 'Werte',\n writeOnly: 'nur schreibbar',\n },\n common: { copyDefault: 'Standardwert kopieren', copyExample: 'Beispielwert kopieren' },\n actions: { copyLinkTo: 'Link zu {name} kopieren' },\n}\n"],"mappings":";AAAA,IAAa,IAAK;CAChB,QAAQ;EACN,iBAAiB;EACjB,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;EACb,0BAA0B;EAC1B,qBAAqB;EACrB,oBAAoB;EACpB,SAAS;EACT,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,OAAO;EACP,KAAK;EACL,aAAa;EACb,eAAe;EACf,aAAa;EACb,oBAAoB;EACpB,WAAW;EACX,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,aAAa;EACb,MAAM;EACN,UAAU;EACV,KAAK;EACL,KAAK;EACL,WAAW;EACX,WAAW;EACX,YAAY;EACZ,UAAU;EACV,eAAe;EACf,SAAS;EACT,aAAa;EACb,UAAU;EACV,UAAU;EACV,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;CACb;CACA,QAAQ;EAAE,aAAa;EAAyB,aAAa;CAAwB;CACrF,SAAS,EAAE,YAAY,0BAA0B;AACnD"}
1
+ {"version":3,"file":"de.js","names":[],"sources":["../../../../src/schema/localization/locales/de.ts"],"sourcesContent":["export const de = {\n schema: {\n variants: 'Varianten',\n discriminatorValue: 'Diskriminatorwert',\n noAllowedValues: 'Keine Werte erfüllen diese Enum-Bedingung.',\n example: 'Beispiel',\n examples: 'Beispiele',\n default: 'Standard',\n schema: 'Schema',\n emptyObject: 'Leeres Objekt',\n showAdditionalProperties: 'Zusätzliche Eigenschaften anzeigen',\n showOneMoreProperty: '1 weitere Eigenschaft anzeigen',\n showMoreProperties: '{count} weitere Eigenschaften anzeigen',\n forName: 'für {name}',\n showSchemaDetails: 'Schema-Details anzeigen',\n oneOf: 'Eines von',\n anyOf: 'Beliebiges von',\n allOf: 'Alle von',\n not: 'Nicht',\n unknownType: 'unbekannter Typ',\n propertyCount: 'Eigenschaften: {count}',\n headerCount: 'Header: {count}',\n recursiveReference: 'Rekursiver Verweis auf {name}',\n recursive: 'rekursiv',\n additionalProperties: 'zusätzliche Eigenschaften',\n const: 'Konstante',\n deprecated: 'veraltet',\n discriminator: 'Diskriminator',\n enum: 'enum',\n format: 'Format',\n greaterThan: 'größer als',\n keys: 'Schlüssel',\n lessThan: 'kleiner als',\n max: 'max.',\n min: 'min.',\n maxLength: 'max. Länge',\n minLength: 'min. Länge',\n multipleOf: 'Vielfaches von',\n nullable: 'nullable',\n propertyNames: 'Eigenschaftsnamen',\n pattern: 'Muster',\n copyPattern: 'Muster kopieren',\n readOnly: 'nur lesbar',\n required: 'erforderlich',\n hideValues: 'Werte ausblenden',\n showAllValues: 'Alle Werte anzeigen',\n type: 'Typ',\n unique: 'eindeutig',\n values: 'Werte',\n writeOnly: 'nur schreibbar',\n typeInteger: 'Ganzzahlen.',\n formatInt32: 'Vorzeichenbehaftete 32-Bit-Ganzzahlen (üblicher Ganzzahltyp).',\n formatInt64: 'Vorzeichenbehaftete 64-Bit-Ganzzahlen (Typ long).',\n formatDate: 'full-date-Notation gemäß RFC 3339, Abschnitt 5.6, zum Beispiel 2017-07-21',\n formatDateTime: 'date-time-Notation gemäß RFC 3339, Abschnitt 5.6, zum Beispiel 2017-07-21T17:32:28Z',\n formatPassword: 'Hinweis an Oberflächen, die Eingabe zu maskieren',\n formatBase64: 'Base64-kodierte Zeichen, zum Beispiel U3dhZ2dlciByb2Nrcw==',\n formatBinary: 'Binärdaten zur Beschreibung von Dateien',\n },\n common: { copyDefault: 'Standardwert kopieren', copyExample: 'Beispielwert kopieren' },\n actions: { copyLinkTo: 'Link zu {name} kopieren' },\n}\n"],"mappings":";AAAA,IAAa,IAAK;CAChB,QAAQ;EACN,UAAU;EACV,oBAAoB;EACpB,iBAAiB;EACjB,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;EACb,0BAA0B;EAC1B,qBAAqB;EACrB,oBAAoB;EACpB,SAAS;EACT,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,OAAO;EACP,KAAK;EACL,aAAa;EACb,eAAe;EACf,aAAa;EACb,oBAAoB;EACpB,WAAW;EACX,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,aAAa;EACb,MAAM;EACN,UAAU;EACV,KAAK;EACL,KAAK;EACL,WAAW;EACX,WAAW;EACX,YAAY;EACZ,UAAU;EACV,eAAe;EACf,SAAS;EACT,aAAa;EACb,UAAU;EACV,UAAU;EACV,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;EACX,aAAa;EACb,aAAa;EACb,aAAa;EACb,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,cAAc;EACd,cAAc;CAChB;CACA,QAAQ;EAAE,aAAa;EAAyB,aAAa;CAAwB;CACrF,SAAS,EAAE,YAAY,0BAA0B;AACnD"}