@gitbook/react-openapi 1.5.1 → 1.5.2

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 +9 -0
  2. package/dist/InteractiveSection.js +59 -0
  3. package/dist/Markdown.js +10 -0
  4. package/dist/OpenAPICodeSample.js +219 -0
  5. package/dist/OpenAPICodeSampleInteractive.js +66 -0
  6. package/dist/OpenAPICodeSampleSelector.js +45 -0
  7. package/dist/OpenAPICopyButton.js +39 -0
  8. package/dist/OpenAPIDisclosure.js +30 -0
  9. package/dist/OpenAPIDisclosureGroup.js +75 -0
  10. package/dist/OpenAPIExample.js +41 -0
  11. package/dist/OpenAPIMediaType.js +58 -0
  12. package/dist/OpenAPIOperation.d.ts +15 -0
  13. package/dist/OpenAPIOperation.js +30 -0
  14. package/dist/OpenAPIOperationContext.d.ts +20 -0
  15. package/dist/OpenAPIOperationContext.js +30 -0
  16. package/dist/OpenAPIPath.js +51 -0
  17. package/dist/OpenAPIPrefillContextProvider.d.ts +26 -0
  18. package/dist/OpenAPIPrefillContextProvider.js +25 -0
  19. package/dist/OpenAPIRequestBody.js +28 -0
  20. package/dist/OpenAPIRequestBodyHeaderType.js +23 -0
  21. package/dist/OpenAPIResponse.js +39 -0
  22. package/dist/OpenAPIResponseExample.js +75 -0
  23. package/dist/OpenAPIResponseExampleContent.js +61 -0
  24. package/dist/OpenAPIResponses.js +61 -0
  25. package/dist/OpenAPISchema.js +373 -0
  26. package/dist/OpenAPISchemaName.js +45 -0
  27. package/dist/OpenAPISchemaServer.js +13 -0
  28. package/dist/OpenAPISecurities.js +124 -0
  29. package/dist/OpenAPISelect.js +45 -0
  30. package/dist/OpenAPISpec.js +73 -0
  31. package/dist/OpenAPIWebhook.d.ts +15 -0
  32. package/dist/OpenAPIWebhook.js +28 -0
  33. package/dist/OpenAPIWebhookExample.js +40 -0
  34. package/dist/ScalarApiButton.js +87 -0
  35. package/dist/StaticSection.js +37 -0
  36. package/dist/code-samples.js +275 -0
  37. package/dist/common/OpenAPIColumnSpec.js +23 -0
  38. package/dist/common/OpenAPIOperationDescription.js +18 -0
  39. package/dist/common/OpenAPIStability.js +17 -0
  40. package/dist/common/OpenAPISummary.js +27 -0
  41. package/dist/contentTypeChecks.js +34 -0
  42. package/dist/context.d.ts +71 -0
  43. package/dist/context.js +29 -0
  44. package/dist/decycle.js +41 -0
  45. package/dist/dereference.js +24 -0
  46. package/dist/generateSchemaExample.js +198 -0
  47. package/dist/getDisclosureLabel.js +17 -0
  48. package/dist/getOrCreateStoreByKey.js +22 -0
  49. package/dist/index.d.ts +11 -662
  50. package/dist/index.js +9 -3871
  51. package/dist/json2xml.js +12 -0
  52. package/dist/resolveOpenAPIOperation.d.ts +15 -0
  53. package/dist/resolveOpenAPIOperation.js +102 -0
  54. package/dist/resolveOpenAPIWebhook.d.ts +15 -0
  55. package/dist/resolveOpenAPIWebhook.js +52 -0
  56. package/dist/schemas/OpenAPISchemaItem.js +26 -0
  57. package/dist/schemas/OpenAPISchemas.d.ts +19 -0
  58. package/dist/schemas/OpenAPISchemas.js +57 -0
  59. package/dist/schemas/resolveOpenAPISchemas.d.ts +15 -0
  60. package/dist/schemas/resolveOpenAPISchemas.js +17 -0
  61. package/dist/stringifyOpenAPI.js +14 -0
  62. package/dist/translate.js +43 -0
  63. package/dist/translations/de.js +48 -0
  64. package/dist/translations/en.d.ts +47 -0
  65. package/dist/translations/en.js +48 -0
  66. package/dist/translations/es.js +48 -0
  67. package/dist/translations/fr.js +48 -0
  68. package/dist/translations/index.d.ts +408 -0
  69. package/dist/translations/index.js +31 -0
  70. package/dist/translations/ja.js +48 -0
  71. package/dist/translations/nl.js +48 -0
  72. package/dist/translations/no.js +48 -0
  73. package/dist/translations/pt-br.js +48 -0
  74. package/dist/translations/types.d.ts +7 -0
  75. package/dist/translations/zh.js +48 -0
  76. package/dist/types.d.ts +37 -0
  77. package/dist/util/example.js +84 -0
  78. package/dist/util/server.js +38 -0
  79. package/dist/util/tryit-prefill.js +143 -0
  80. package/dist/utils.js +163 -0
  81. package/package.json +10 -7
@@ -0,0 +1,12 @@
1
+ import { jsXml } from "json-xml-parse";
2
+
3
+ //#region src/json2xml.ts
4
+ /**
5
+ * This function converts an object to XML.
6
+ */
7
+ function json2xml(data) {
8
+ return jsXml.toXmlString(data, { beautify: true });
9
+ }
10
+
11
+ //#endregion
12
+ export { json2xml };
@@ -0,0 +1,15 @@
1
+ import { OpenAPIOperationData } from "./types.js";
2
+ import { Filesystem, OpenAPIV3xDocument } from "@gitbook/openapi-parser";
3
+ import "flatted";
4
+
5
+ //#region src/resolveOpenAPIOperation.d.ts
6
+
7
+ /**
8
+ * Resolve an OpenAPI operation in a file and compile it to a more usable format.
9
+ */
10
+ declare function resolveOpenAPIOperation(filesystem: Filesystem<OpenAPIV3xDocument>, operationDescriptor: {
11
+ path: string;
12
+ method: string;
13
+ }): Promise<OpenAPIOperationData | null>;
14
+ //#endregion
15
+ export { resolveOpenAPIOperation };
@@ -0,0 +1,102 @@
1
+ import { checkIsReference } from "./utils.js";
2
+ import { dereferenceFilesystem } from "./dereference.js";
3
+ import "flatted";
4
+
5
+ //#region src/resolveOpenAPIOperation.ts
6
+ /**
7
+ * Resolve an OpenAPI operation in a file and compile it to a more usable format.
8
+ */
9
+ async function resolveOpenAPIOperation(filesystem, operationDescriptor) {
10
+ const { path, method } = operationDescriptor;
11
+ const schema = await dereferenceFilesystem(filesystem);
12
+ let operation = getOperationByPathAndMethod(schema, path, method);
13
+ if (!operation) return null;
14
+ const commonParameters = getPathObjectParameter(schema, path);
15
+ if (commonParameters) operation = {
16
+ ...operation,
17
+ parameters: [...commonParameters, ...operation.parameters ?? []]
18
+ };
19
+ const servers = "servers" in schema ? schema.servers ?? [] : [];
20
+ const schemaSecurity = Array.isArray(schema.security) ? schema.security : schema.security ? [schema.security] : [];
21
+ const security = operation.security ?? schemaSecurity;
22
+ const isOptionalSecurity = security.some((entry) => Object.keys(entry).length === 0);
23
+ const flatSecurities = flattenSecurities(security);
24
+ const securities = [];
25
+ for (const entry of flatSecurities) {
26
+ const [securityKey, operationScopes] = Object.entries(entry)[0] ?? [];
27
+ if (securityKey) {
28
+ const securityScheme = schema.components?.securitySchemes?.[securityKey];
29
+ const scopes = resolveSecurityScopes({
30
+ securityScheme,
31
+ operationScopes
32
+ });
33
+ securities.push([securityKey, {
34
+ ...securityScheme,
35
+ required: !isOptionalSecurity,
36
+ scopes
37
+ }]);
38
+ }
39
+ }
40
+ return {
41
+ servers,
42
+ operation: {
43
+ ...operation,
44
+ security
45
+ },
46
+ method,
47
+ path,
48
+ securities,
49
+ "x-codeSamples": typeof schema["x-codeSamples"] === "boolean" ? schema["x-codeSamples"] : void 0,
50
+ "x-hideTryItPanel": typeof schema["x-hideTryItPanel"] === "boolean" ? schema["x-hideTryItPanel"] : void 0
51
+ };
52
+ }
53
+ /**
54
+ * Get a path object from its path.
55
+ */
56
+ function getPathObject(schema, path) {
57
+ return schema.paths?.[path] || null;
58
+ }
59
+ /**
60
+ * Resolve parameters from a path in an OpenAPI schema.
61
+ */
62
+ function getPathObjectParameter(schema, path) {
63
+ const pathObject = getPathObject(schema, path);
64
+ if (pathObject?.parameters) return pathObject.parameters;
65
+ return null;
66
+ }
67
+ /**
68
+ * Get an operation by its path and method.
69
+ */
70
+ function getOperationByPathAndMethod(schema, path, method) {
71
+ const pathObject = getPathObject(schema, path);
72
+ if (!pathObject) return null;
73
+ const normalizedMethod = method.toLowerCase();
74
+ if (!pathObject[normalizedMethod]) return null;
75
+ return pathObject[normalizedMethod];
76
+ }
77
+ /**
78
+ * Flatten security objects in case they are nested.
79
+ * @example [{bearerAuth:[], basicAuth:[]}] => [{ bearerAuth: [] }, { basicAuth: [] }]
80
+ */
81
+ function flattenSecurities(security) {
82
+ if (!Array.isArray(security) || security.length === 0) return [];
83
+ return security.flatMap((securityObject) => {
84
+ return Object.entries(securityObject).map(([authType, config]) => ({ [authType]: config }));
85
+ });
86
+ }
87
+ /**
88
+ * Resolve the scopes for a security scheme.
89
+ */
90
+ function resolveSecurityScopes({ securityScheme, operationScopes }) {
91
+ if (!securityScheme || checkIsReference(securityScheme) || isOAuthSecurityScheme(securityScheme)) return null;
92
+ return operationScopes?.map((scope) => [scope, void 0]) || [];
93
+ }
94
+ /**
95
+ * Check if a security scheme is an OAuth or OpenID Connect security scheme.
96
+ */
97
+ function isOAuthSecurityScheme(securityScheme) {
98
+ return securityScheme.type === "oauth2";
99
+ }
100
+
101
+ //#endregion
102
+ export { resolveOpenAPIOperation };
@@ -0,0 +1,15 @@
1
+ import { OpenAPIWebhookData } from "./types.js";
2
+ import { Filesystem, OpenAPIV3xDocument } from "@gitbook/openapi-parser";
3
+ import "flatted";
4
+
5
+ //#region src/resolveOpenAPIWebhook.d.ts
6
+
7
+ /**
8
+ * Resolve an OpenAPI webhook in a file and compile it to a more usable format.
9
+ */
10
+ declare function resolveOpenAPIWebhook(filesystem: Filesystem<OpenAPIV3xDocument>, webhookDescriptor: {
11
+ name: string;
12
+ method: string;
13
+ }): Promise<OpenAPIWebhookData | null>;
14
+ //#endregion
15
+ export { resolveOpenAPIWebhook };
@@ -0,0 +1,52 @@
1
+ import { dereferenceFilesystem } from "./dereference.js";
2
+ import "flatted";
3
+
4
+ //#region src/resolveOpenAPIWebhook.ts
5
+ /**
6
+ * Resolve an OpenAPI webhook in a file and compile it to a more usable format.
7
+ */
8
+ async function resolveOpenAPIWebhook(filesystem, webhookDescriptor) {
9
+ const { name, method } = webhookDescriptor;
10
+ const schema = await dereferenceFilesystem(filesystem);
11
+ let operation = getWebhookByNameAndMethod(schema, name, method);
12
+ if (!operation) return null;
13
+ const commonParameters = getPathObjectParameter(schema, name);
14
+ if (commonParameters) operation = {
15
+ ...operation,
16
+ parameters: [...commonParameters, ...operation.parameters ?? []]
17
+ };
18
+ return {
19
+ servers: "servers" in schema ? schema.servers ?? [] : [],
20
+ operation,
21
+ method,
22
+ name
23
+ };
24
+ }
25
+ /**
26
+ * Get a path object from its path.
27
+ */
28
+ function getPathObject(schema, name) {
29
+ if (schema.webhooks?.[name]) return schema.webhooks[name];
30
+ return null;
31
+ }
32
+ /**
33
+ * Resolve parameters from a path in an OpenAPI schema.
34
+ */
35
+ function getPathObjectParameter(schema, path) {
36
+ const pathObject = getPathObject(schema, path);
37
+ if (pathObject?.parameters) return pathObject.parameters;
38
+ return null;
39
+ }
40
+ /**
41
+ * Get an operation by its path and method.
42
+ */
43
+ function getWebhookByNameAndMethod(schema, name, method) {
44
+ const pathObject = getPathObject(schema, name);
45
+ if (!pathObject) return null;
46
+ const normalizedMethod = method.toLowerCase();
47
+ if (!pathObject[normalizedMethod]) return null;
48
+ return pathObject[normalizedMethod];
49
+ }
50
+
51
+ //#endregion
52
+ export { resolveOpenAPIWebhook };
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+
3
+
4
+ import { OpenAPIDisclosure } from "../OpenAPIDisclosure.js";
5
+ import { getDisclosureLabel } from "../getDisclosureLabel.js";
6
+ import { OpenAPIRootSchema } from "../OpenAPISchemaServer.js";
7
+ import { Section, SectionBody } from "../StaticSection.js";
8
+
9
+ //#region src/schemas/OpenAPISchemaItem.tsx
10
+ function OpenAPISchemaItem(props) {
11
+ const { schema, context, name } = props;
12
+ return <OpenAPIDisclosure className="openapi-schemas-disclosure" key={name} icon={context.icons.plus} header={name} label={(isExpanded) => getDisclosureLabel({
13
+ schema,
14
+ isExpanded,
15
+ context
16
+ })}>
17
+ <Section className="openapi-section-schemas">
18
+ <SectionBody>
19
+ <OpenAPIRootSchema schema={schema} context={context} />
20
+ </SectionBody>
21
+ </Section>
22
+ </OpenAPIDisclosure>;
23
+ }
24
+
25
+ //#endregion
26
+ export { OpenAPISchemaItem };
@@ -0,0 +1,19 @@
1
+ import { OpenAPIContextInput } from "../context.js";
2
+ import * as react2 from "react";
3
+ import { OpenAPISchema } from "@gitbook/openapi-parser";
4
+
5
+ //#region src/schemas/OpenAPISchemas.d.ts
6
+ /**
7
+ * OpenAPI Schemas component.
8
+ */
9
+ declare function OpenAPISchemas(props: {
10
+ className?: string;
11
+ schemas: OpenAPISchema[];
12
+ context: OpenAPIContextInput;
13
+ /**
14
+ * Whether to show the schema directly if there is only one.
15
+ */
16
+ grouped?: boolean;
17
+ }): react2.JSX.Element | null;
18
+ //#endregion
19
+ export { OpenAPISchemas };
@@ -0,0 +1,57 @@
1
+ import { t } from "../translate.js";
2
+ import { OpenAPIExample } from "../OpenAPIExample.js";
3
+ import { OpenAPIRootSchema } from "../OpenAPISchemaServer.js";
4
+ import { StaticSection } from "../StaticSection.js";
5
+ import { getOpenAPIClientContext, resolveOpenAPIContext } from "../context.js";
6
+ import { getExampleFromSchema } from "../util/example.js";
7
+ import { OpenAPISchemaItem } from "./OpenAPISchemaItem.js";
8
+ import clsx from "classnames";
9
+
10
+ //#region src/schemas/OpenAPISchemas.tsx
11
+ /**
12
+ * OpenAPI Schemas component.
13
+ */
14
+ function OpenAPISchemas(props) {
15
+ const { schemas, context: contextInput, grouped, className } = props;
16
+ const firstSchema = schemas[0];
17
+ if (!firstSchema) return null;
18
+ const context = resolveOpenAPIContext(contextInput);
19
+ const clientContext = getOpenAPIClientContext(context);
20
+ if (schemas.length === 1 && !grouped) {
21
+ const title = `The ${firstSchema.name} object`;
22
+ return <div className={clsx("openapi-schemas", className)}>
23
+ <div className="openapi-summary" id={context.id}>
24
+ {context.renderHeading({
25
+ title,
26
+ deprecated: Boolean(firstSchema.schema.deprecated),
27
+ stability: firstSchema.schema["x-stability"]
28
+ })}
29
+ </div>
30
+ <div className="openapi-columns">
31
+ <div className="openapi-column-spec">
32
+ <StaticSection className="openapi-parameters" header={t(context.translation, "attributes")}>
33
+ <OpenAPIRootSchema schema={firstSchema.schema} context={clientContext} />
34
+ </StaticSection>
35
+ </div>
36
+ <div className="openapi-column-preview">
37
+ <div className="openapi-column-preview-body">
38
+ <div className="openapi-panel">
39
+ <h4 className="openapi-panel-heading">{title}</h4>
40
+ <div className="openapi-panel-body">
41
+ <OpenAPIExample example={getExampleFromSchema({ schema: firstSchema.schema })} context={context} syntax="json" />
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>;
48
+ }
49
+ return <div className={clsx("openapi-schemas", className)}>
50
+ {schemas.map(({ name, schema }) => {
51
+ return <OpenAPISchemaItem key={name} name={name} context={clientContext} schema={schema} />;
52
+ })}
53
+ </div>;
54
+ }
55
+
56
+ //#endregion
57
+ export { OpenAPISchemas };
@@ -0,0 +1,15 @@
1
+ import { Filesystem, OpenAPISchema, OpenAPIV3xDocument } from "@gitbook/openapi-parser";
2
+
3
+ //#region src/schemas/resolveOpenAPISchemas.d.ts
4
+
5
+ /**
6
+ * Resolve an OpenAPI schemas from a file and compile it to a more usable format.
7
+ * Schemas are extracted from the OpenAPI components.schemas
8
+ */
9
+ declare function resolveOpenAPISchemas(filesystem: Filesystem<OpenAPIV3xDocument>, options: {
10
+ schemas: string[];
11
+ }): Promise<{
12
+ schemas: OpenAPISchema[];
13
+ } | null>;
14
+ //#endregion
15
+ export { resolveOpenAPISchemas };
@@ -0,0 +1,17 @@
1
+ import { dereferenceFilesystem } from "../dereference.js";
2
+ import { filterSelectedOpenAPISchemas } from "@gitbook/openapi-parser";
3
+
4
+ //#region src/schemas/resolveOpenAPISchemas.ts
5
+ /**
6
+ * Resolve an OpenAPI schemas from a file and compile it to a more usable format.
7
+ * Schemas are extracted from the OpenAPI components.schemas
8
+ */
9
+ async function resolveOpenAPISchemas(filesystem, options) {
10
+ const { schemas: selectedSchemas } = options;
11
+ const schemas = filterSelectedOpenAPISchemas(await dereferenceFilesystem(filesystem), selectedSchemas);
12
+ if (schemas.length === 0) return null;
13
+ return { schemas };
14
+ }
15
+
16
+ //#endregion
17
+ export { resolveOpenAPISchemas };
@@ -0,0 +1,14 @@
1
+ //#region src/stringifyOpenAPI.ts
2
+ /**
3
+ * Stringify an OpenAPI object. Same API as JSON.stringify.
4
+ */
5
+ function stringifyOpenAPI(value, replacer, space) {
6
+ return JSON.stringify(value, (key, value$1) => {
7
+ if (key.startsWith("x-gitbook-")) return;
8
+ if (replacer) return replacer(key, value$1);
9
+ return value$1;
10
+ }, space);
11
+ }
12
+
13
+ //#endregion
14
+ export { stringifyOpenAPI };
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+
3
+ //#region src/translate.tsx
4
+ /**
5
+ * Translate a string.
6
+ */
7
+ function t(translation, id, ...args) {
8
+ const string = translation[id];
9
+ if (!string) throw new Error(`Translation not found for "${id}"`);
10
+ const parts = [];
11
+ let currentStringToReplace = string;
12
+ args.forEach((arg, i) => {
13
+ if (typeof arg === "string") currentStringToReplace = currentStringToReplace.replace(`\${${i + 1}}`, arg);
14
+ else {
15
+ const [partToPush, partToReplace] = currentStringToReplace.split(`\${${i + 1}}`);
16
+ if (partToPush === void 0 || partToReplace === void 0) throw new Error(`Invalid translation "${id}"`);
17
+ parts.push(<React.Fragment key={`string-${i}`}>{partToPush}</React.Fragment>);
18
+ parts.push(<React.Fragment key={`arg-${i}`}>{arg}</React.Fragment>);
19
+ currentStringToReplace = partToReplace;
20
+ }
21
+ });
22
+ if (!parts.length) return currentStringToReplace;
23
+ return <>
24
+ {parts}
25
+ {currentStringToReplace}
26
+ </>;
27
+ }
28
+ /**
29
+ * Version of `t` that returns a string.
30
+ */
31
+ function tString(translation, id, ...args) {
32
+ return reactToString(t(translation, id, ...args));
33
+ }
34
+ function reactToString(el) {
35
+ if (typeof el === "string" || typeof el === "number" || typeof el === "boolean") return `${el}`;
36
+ if (el === null || el === void 0) return "";
37
+ if (Array.isArray(el)) return el.map(reactToString).join("");
38
+ if (typeof el === "object" && "props" in el) return el.props.children.map(reactToString).join("");
39
+ throw new Error(`Unsupported type ${typeof el}`);
40
+ }
41
+
42
+ //#endregion
43
+ export { t, tString };
@@ -0,0 +1,48 @@
1
+ //#region src/translations/de.ts
2
+ const de = {
3
+ required: "Erforderlich",
4
+ deprecated: "Veraltet",
5
+ deprecated_and_sunset_on: "Diese Operation ist veraltet und wird am ${1} eingestellt.",
6
+ stability_experimental: "Experimentell",
7
+ stability_alpha: "Alpha",
8
+ stability_beta: "Beta",
9
+ discriminator: "Diskriminator",
10
+ copy_to_clipboard: "In die Zwischenablage kopieren",
11
+ copied: "Kopiert",
12
+ no_content: "Kein Inhalt",
13
+ unresolved_reference: "Nicht aufgelöste Referenz",
14
+ circular_reference: "Zirkuläre Referenz",
15
+ read_only: "Nur lesen",
16
+ write_only: "Nur schreiben",
17
+ optional: "Optional",
18
+ min: "Min",
19
+ max: "Max",
20
+ nullable: "Nullfähig",
21
+ body: "Rumpf",
22
+ payload: "Nutzlast",
23
+ headers: "Header",
24
+ header: "Header",
25
+ authorizations: "Autorisierungen",
26
+ responses: "Antworten",
27
+ response: "Antwort",
28
+ path_parameters: "Pfadparameter",
29
+ query_parameters: "Abfrageparameter",
30
+ header_parameters: "Header-Parameter",
31
+ attributes: "Attribute",
32
+ test_it: "Teste es",
33
+ information: "Information",
34
+ success: "Erfolg",
35
+ redirect: "Umleitung",
36
+ error: "Fehler",
37
+ show: "Zeige ${1}",
38
+ hide: "Verstecke ${1}",
39
+ available_items: "Verfügbare Elemente",
40
+ required_scopes: "Erforderliche Scopes",
41
+ properties: "Eigenschaften",
42
+ or: "oder",
43
+ and: "und",
44
+ possible_values: "Mögliche Werte"
45
+ };
46
+
47
+ //#endregion
48
+ export { de };
@@ -0,0 +1,47 @@
1
+ //#region src/translations/en.d.ts
2
+ declare const en: {
3
+ required: string;
4
+ deprecated: string;
5
+ deprecated_and_sunset_on: string;
6
+ stability_experimental: string;
7
+ stability_alpha: string;
8
+ stability_beta: string;
9
+ discriminator: string;
10
+ copy_to_clipboard: string;
11
+ copied: string;
12
+ no_content: string;
13
+ unresolved_reference: string;
14
+ circular_reference: string;
15
+ read_only: string;
16
+ write_only: string;
17
+ optional: string;
18
+ min: string;
19
+ max: string;
20
+ nullable: string;
21
+ body: string;
22
+ payload: string;
23
+ headers: string;
24
+ header: string;
25
+ authorizations: string;
26
+ responses: string;
27
+ response: string;
28
+ path_parameters: string;
29
+ query_parameters: string;
30
+ header_parameters: string;
31
+ attributes: string;
32
+ test_it: string;
33
+ information: string;
34
+ success: string;
35
+ redirect: string;
36
+ error: string;
37
+ show: string;
38
+ hide: string;
39
+ available_items: string;
40
+ required_scopes: string;
41
+ possible_values: string;
42
+ properties: string;
43
+ or: string;
44
+ and: string;
45
+ };
46
+ //#endregion
47
+ export { en };
@@ -0,0 +1,48 @@
1
+ //#region src/translations/en.ts
2
+ const en = {
3
+ required: "Required",
4
+ deprecated: "Deprecated",
5
+ deprecated_and_sunset_on: "This operation is deprecated and will be sunset on ${1}.",
6
+ stability_experimental: "Experimental",
7
+ stability_alpha: "Alpha",
8
+ stability_beta: "Beta",
9
+ discriminator: "Discriminator",
10
+ copy_to_clipboard: "Copy to clipboard",
11
+ copied: "Copied",
12
+ no_content: "No content",
13
+ unresolved_reference: "Unresolved reference",
14
+ circular_reference: "Circular reference",
15
+ read_only: "Read-only",
16
+ write_only: "Write-only",
17
+ optional: "Optional",
18
+ min: "Min",
19
+ max: "Max",
20
+ nullable: "Nullable",
21
+ body: "Body",
22
+ payload: "Payload",
23
+ headers: "Headers",
24
+ header: "Header",
25
+ authorizations: "Authorizations",
26
+ responses: "Responses",
27
+ response: "Response",
28
+ path_parameters: "Path parameters",
29
+ query_parameters: "Query parameters",
30
+ header_parameters: "Header parameters",
31
+ attributes: "Attributes",
32
+ test_it: "Test it",
33
+ information: "Information",
34
+ success: "Success",
35
+ redirect: "Redirect",
36
+ error: "Error",
37
+ show: "Show ${1}",
38
+ hide: "Hide ${1}",
39
+ available_items: "Available items",
40
+ required_scopes: "Required scopes",
41
+ possible_values: "Possible values",
42
+ properties: "Properties",
43
+ or: "or",
44
+ and: "and"
45
+ };
46
+
47
+ //#endregion
48
+ export { en };
@@ -0,0 +1,48 @@
1
+ //#region src/translations/es.ts
2
+ const es = {
3
+ required: "Requerido",
4
+ deprecated: "Obsoleto",
5
+ deprecated_and_sunset_on: "Esta operación está obsoleta y se retirará el ${1}.",
6
+ stability_experimental: "Experimental",
7
+ stability_alpha: "Alfa",
8
+ stability_beta: "Beta",
9
+ discriminator: "Discriminador",
10
+ copy_to_clipboard: "Copiar al portapapeles",
11
+ copied: "Copiado",
12
+ no_content: "Sin contenido",
13
+ unresolved_reference: "Referencia no resuelta",
14
+ circular_reference: "Referencia circular",
15
+ read_only: "Solo lectura",
16
+ write_only: "Solo escritura",
17
+ optional: "Opcional",
18
+ min: "Mín",
19
+ max: "Máx",
20
+ nullable: "Nulo",
21
+ body: "Cuerpo",
22
+ payload: "Caga útil",
23
+ headers: "Headers",
24
+ header: "Header",
25
+ authorizations: "Autorizaciones",
26
+ responses: "Respuestas",
27
+ response: "Respuesta",
28
+ path_parameters: "Parámetros de ruta",
29
+ query_parameters: "Parámetros de consulta",
30
+ header_parameters: "Parámetros de encabezado",
31
+ attributes: "Atributos",
32
+ test_it: "Pruébalo",
33
+ information: "Información",
34
+ success: "Éxito",
35
+ redirect: "Redirección",
36
+ error: "Error",
37
+ show: "Mostrar ${1}",
38
+ hide: "Ocultar ${1}",
39
+ available_items: "Elementos disponibles",
40
+ required_scopes: "Scopes requeridos",
41
+ properties: "Propiedades",
42
+ or: "o",
43
+ and: "y",
44
+ possible_values: "Valores posibles"
45
+ };
46
+
47
+ //#endregion
48
+ export { es };
@@ -0,0 +1,48 @@
1
+ //#region src/translations/fr.ts
2
+ const fr = {
3
+ required: "Requis",
4
+ deprecated: "Obsolète",
5
+ deprecated_and_sunset_on: "Cette opération est obsolète et sera supprimée le ${1}.",
6
+ stability_experimental: "Expérimental",
7
+ stability_alpha: "Alpha",
8
+ stability_beta: "Bêta",
9
+ discriminator: "Discriminateur",
10
+ copy_to_clipboard: "Copier dans le presse-papiers",
11
+ copied: "Copié",
12
+ no_content: "Aucun contenu",
13
+ unresolved_reference: "Référence non résolue",
14
+ circular_reference: "Référence circulaire",
15
+ read_only: "Lecture seule",
16
+ write_only: "Écriture seule",
17
+ optional: "Optionnel",
18
+ min: "Min",
19
+ max: "Max",
20
+ nullable: "Nullable",
21
+ body: "Corps",
22
+ payload: "Charge utile",
23
+ headers: "Headers",
24
+ header: "Header",
25
+ authorizations: "Autorisations",
26
+ responses: "Réponses",
27
+ response: "Réponse",
28
+ path_parameters: "Paramètres de chemin",
29
+ query_parameters: "Paramètres de requête",
30
+ header_parameters: "Paramètres d'en-tête",
31
+ attributes: "Attributs",
32
+ test_it: "Tester",
33
+ information: "Information",
34
+ success: "Succès",
35
+ redirect: "Redirection",
36
+ error: "Erreur",
37
+ show: "Afficher ${1}",
38
+ hide: "Masquer ${1}",
39
+ available_items: "Éléments disponibles",
40
+ required_scopes: "Scopes requis",
41
+ properties: "Propriétés",
42
+ or: "ou",
43
+ and: "et",
44
+ possible_values: "Valeurs possibles"
45
+ };
46
+
47
+ //#endregion
48
+ export { fr };