docusaurus-theme-openapi-docs 0.0.0-1294 → 0.0.0-1295

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 (60) hide show
  1. package/lib/markdown/schema.js +4 -5
  2. package/lib/theme/ApiExplorer/Authorization/index.js +9 -10
  3. package/lib/theme/ApiExplorer/Body/index.js +4 -5
  4. package/lib/theme/ApiExplorer/Export/index.js +9 -2
  5. package/lib/theme/ApiExplorer/FormFileUpload/index.js +1 -2
  6. package/lib/theme/ApiExplorer/FormLabel/index.js +1 -2
  7. package/lib/theme/ApiExplorer/FormTextInput/index.js +1 -2
  8. package/lib/theme/ApiExplorer/LiveEditor/index.js +1 -2
  9. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +5 -3
  10. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +1 -2
  11. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +1 -2
  12. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +1 -2
  13. package/lib/theme/ApiExplorer/ParamOptions/index.js +2 -3
  14. package/lib/theme/ApiExplorer/Request/index.js +17 -18
  15. package/lib/theme/ApiExplorer/Response/index.js +7 -11
  16. package/lib/theme/ApiExplorer/SecuritySchemes/index.js +57 -50
  17. package/lib/theme/ApiExplorer/Server/index.js +2 -3
  18. package/lib/theme/ApiTabs/index.js +1 -2
  19. package/lib/theme/Example/index.js +3 -4
  20. package/lib/theme/ParamsDetails/index.js +1 -2
  21. package/lib/theme/ParamsItem/index.js +7 -8
  22. package/lib/theme/RequestSchema/index.js +4 -6
  23. package/lib/theme/ResponseExamples/index.js +3 -4
  24. package/lib/theme/ResponseSchema/index.js +2 -3
  25. package/lib/theme/Schema/index.js +8 -9
  26. package/lib/theme/SchemaExpansion/index.js +4 -5
  27. package/lib/theme/SchemaItem/index.js +9 -10
  28. package/lib/theme/StatusCodes/index.js +2 -4
  29. package/lib/theme/translationIds.d.ts +1 -99
  30. package/lib/theme/translationIds.js +0 -116
  31. package/package.json +3 -3
  32. package/src/markdown/schema.ts +4 -5
  33. package/src/theme/ApiExplorer/Authorization/index.tsx +9 -10
  34. package/src/theme/ApiExplorer/Body/index.tsx +7 -5
  35. package/src/theme/ApiExplorer/Export/index.tsx +6 -2
  36. package/src/theme/ApiExplorer/FormFileUpload/index.tsx +1 -2
  37. package/src/theme/ApiExplorer/FormLabel/index.tsx +1 -2
  38. package/src/theme/ApiExplorer/FormTextInput/index.tsx +1 -2
  39. package/src/theme/ApiExplorer/LiveEditor/index.tsx +1 -2
  40. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +5 -3
  41. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +1 -2
  42. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +1 -2
  43. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +1 -2
  44. package/src/theme/ApiExplorer/ParamOptions/index.tsx +2 -3
  45. package/src/theme/ApiExplorer/Request/index.tsx +23 -18
  46. package/src/theme/ApiExplorer/Response/index.tsx +10 -8
  47. package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +60 -52
  48. package/src/theme/ApiExplorer/Server/index.tsx +8 -3
  49. package/src/theme/ApiTabs/index.tsx +1 -2
  50. package/src/theme/Example/index.tsx +3 -4
  51. package/src/theme/ParamsDetails/index.tsx +1 -2
  52. package/src/theme/ParamsItem/index.tsx +13 -8
  53. package/src/theme/RequestSchema/index.tsx +4 -5
  54. package/src/theme/ResponseExamples/index.tsx +3 -4
  55. package/src/theme/ResponseSchema/index.tsx +2 -3
  56. package/src/theme/Schema/index.tsx +8 -9
  57. package/src/theme/SchemaExpansion/index.tsx +4 -5
  58. package/src/theme/SchemaItem/index.tsx +18 -10
  59. package/src/theme/StatusCodes/index.tsx +2 -3
  60. package/src/theme/translationIds.ts +37 -113
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.getSchemaName = getSchemaName;
10
10
  exports.getQualifierMessage = getQualifierMessage;
11
11
  const Translate_1 = require("@docusaurus/Translate");
12
- const translationIds_1 = require("../theme/translationIds");
13
12
  /**
14
13
  * Extracts enum values from a schema, including when wrapped in allOf.
15
14
  */
@@ -130,7 +129,7 @@ function getQualifierMessage(schema) {
130
129
  return getQualifierMessage(schema.items);
131
130
  }
132
131
  let message = `**${(0, Translate_1.translate)({
133
- id: translationIds_1.OPENAPI_SCHEMA_ITEM.POSSIBLE_VALUES,
132
+ id: "theme.openapi.schemaItem.possibleValues",
134
133
  message: "Possible values:",
135
134
  })}** `;
136
135
  let qualifierGroups = [];
@@ -146,11 +145,11 @@ function getQualifierMessage(schema) {
146
145
  let minLength;
147
146
  let maxLength;
148
147
  const charactersMessage = (0, Translate_1.translate)({
149
- id: translationIds_1.OPENAPI_SCHEMA_ITEM.CHARACTERS,
148
+ id: "theme.openapi.schemaItem.characters",
150
149
  message: "characters",
151
150
  });
152
151
  const nonEmptyMessage = (0, Translate_1.translate)({
153
- id: translationIds_1.OPENAPI_SCHEMA_ITEM.NON_EMPTY,
152
+ id: "theme.openapi.schemaItem.nonEmpty",
154
153
  message: "non-empty",
155
154
  });
156
155
  if (schema.minLength && schema.minLength > 1) {
@@ -211,7 +210,7 @@ function getQualifierMessage(schema) {
211
210
  }
212
211
  if (schema.pattern) {
213
212
  const expressionMessage = (0, Translate_1.translate)({
214
- id: translationIds_1.OPENAPI_SCHEMA_ITEM.EXPRESSION,
213
+ id: "theme.openapi.schemaItem.expression",
215
214
  message: "Value must match regular expression",
216
215
  });
217
216
  qualifierGroups.push(`${expressionMessage} \`${schema.pattern}\``);
@@ -19,7 +19,6 @@ const FormTextInput_1 = __importDefault(
19
19
  require("@theme/ApiExplorer/FormTextInput")
20
20
  );
21
21
  const hooks_1 = require("@theme/ApiItem/hooks");
22
- const translationIds_1 = require("@theme/translationIds");
23
22
  const slice_1 = require("./slice");
24
23
  function Authorization() {
25
24
  const data = (0, hooks_1.useTypedSelector)((state) => state.auth.data);
@@ -42,7 +41,7 @@ function Authorization() {
42
41
  null,
43
42
  react_1.default.createElement(FormSelect_1.default, {
44
43
  label: (0, Translate_1.translate)({
45
- id: translationIds_1.OPENAPI_AUTH.SECURITY_SCHEME,
44
+ id: "theme.openapi.auth.securityScheme",
46
45
  message: "Security Scheme",
47
46
  }),
48
47
  options: optionKeys,
@@ -59,11 +58,11 @@ function Authorization() {
59
58
  { key: a.key + "-bearer" },
60
59
  react_1.default.createElement(FormTextInput_1.default, {
61
60
  label: (0, Translate_1.translate)({
62
- id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
61
+ id: "theme.openapi.auth.bearerToken",
63
62
  message: "Bearer Token",
64
63
  }),
65
64
  placeholder: (0, Translate_1.translate)({
66
- id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
65
+ id: "theme.openapi.auth.bearerToken",
67
66
  message: "Bearer Token",
68
67
  }),
69
68
  password: true,
@@ -87,11 +86,11 @@ function Authorization() {
87
86
  { key: a.key + "-oauth2" },
88
87
  react_1.default.createElement(FormTextInput_1.default, {
89
88
  label: (0, Translate_1.translate)({
90
- id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
89
+ id: "theme.openapi.auth.bearerToken",
91
90
  message: "Bearer Token",
92
91
  }),
93
92
  placeholder: (0, Translate_1.translate)({
94
- id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
93
+ id: "theme.openapi.auth.bearerToken",
95
94
  message: "Bearer Token",
96
95
  }),
97
96
  password: true,
@@ -118,11 +117,11 @@ function Authorization() {
118
117
  null,
119
118
  react_1.default.createElement(FormTextInput_1.default, {
120
119
  label: (0, Translate_1.translate)({
121
- id: translationIds_1.OPENAPI_AUTH.USERNAME,
120
+ id: "theme.openapi.auth.username",
122
121
  message: "Username",
123
122
  }),
124
123
  placeholder: (0, Translate_1.translate)({
125
- id: translationIds_1.OPENAPI_AUTH.USERNAME,
124
+ id: "theme.openapi.auth.username",
126
125
  message: "Username",
127
126
  }),
128
127
  value: data[a.key].username ?? "",
@@ -143,11 +142,11 @@ function Authorization() {
143
142
  null,
144
143
  react_1.default.createElement(FormTextInput_1.default, {
145
144
  label: (0, Translate_1.translate)({
146
- id: translationIds_1.OPENAPI_AUTH.PASSWORD,
145
+ id: "theme.openapi.auth.password",
147
146
  message: "Password",
148
147
  }),
149
148
  placeholder: (0, Translate_1.translate)({
150
- id: translationIds_1.OPENAPI_AUTH.PASSWORD,
149
+ id: "theme.openapi.auth.password",
151
150
  message: "Password",
152
151
  }),
153
152
  password: true,
@@ -79,7 +79,6 @@ const hooks_1 = require("@theme/ApiItem/hooks");
79
79
  const Markdown_1 = __importDefault(require("@theme/Markdown"));
80
80
  const SchemaTabs_1 = __importDefault(require("@theme/SchemaTabs"));
81
81
  const TabItem_1 = __importDefault(require("@theme/TabItem"));
82
- const translationIds_1 = require("@theme/translationIds");
83
82
  const createSchemaExample_1 = require("docusaurus-plugin-openapi-docs/lib/openapi/createSchemaExample");
84
83
  const xml_formatter_1 = __importDefault(require("xml-formatter"));
85
84
  const FormBodyItem_1 = __importDefault(require("./FormBodyItem"));
@@ -340,7 +339,7 @@ function Body({
340
339
  placeholder:
341
340
  schema.description ||
342
341
  (0, Translate_1.translate)({
343
- id: translationIds_1.OPENAPI_REQUEST.BODY_TITLE,
342
+ id: "theme.openapi.request.body.title",
344
343
  message: "Body",
345
344
  }),
346
345
  onChange: (file) => {
@@ -373,7 +372,7 @@ function Body({
373
372
  TabItem_1.default,
374
373
  {
375
374
  label: (0, Translate_1.translate)({
376
- id: translationIds_1.OPENAPI_BODY.EXAMPLE_FROM_SCHEMA,
375
+ id: "theme.openapi.body.exampleFromSchema",
377
376
  message: "Example (from schema)",
378
377
  }),
379
378
  value: "Example (from schema)",
@@ -465,7 +464,7 @@ function Body({
465
464
  TabItem_1.default,
466
465
  {
467
466
  label: (0, Translate_1.translate)({
468
- id: translationIds_1.OPENAPI_BODY.EXAMPLE_FROM_SCHEMA,
467
+ id: "theme.openapi.body.exampleFromSchema",
469
468
  message: "Example (from schema)",
470
469
  }),
471
470
  value: "Example (from schema)",
@@ -517,7 +516,7 @@ function Body({
517
516
  TabItem_1.default,
518
517
  {
519
518
  label: (0, Translate_1.translate)({
520
- id: translationIds_1.OPENAPI_BODY.EXAMPLE_FROM_SCHEMA,
519
+ id: "theme.openapi.body.exampleFromSchema",
521
520
  message: "Example (from schema)",
522
521
  }),
523
522
  value: "Example (from schema)",
@@ -12,6 +12,7 @@ var __importDefault =
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  const react_1 = __importDefault(require("react"));
15
+ const Translate_1 = require("@docusaurus/Translate");
15
16
  const file_saver_1 = __importDefault(require("file-saver"));
16
17
  const saveFile = (url) => {
17
18
  let fileName;
@@ -30,7 +31,10 @@ function Export({ url, proxy }) {
30
31
  react_1.default.createElement(
31
32
  "button",
32
33
  { className: "export-button button button--sm button--secondary" },
33
- "Export"
34
+ (0, Translate_1.translate)({
35
+ id: "theme.openapi.export.button",
36
+ message: "Export",
37
+ })
34
38
  ),
35
39
  react_1.default.createElement(
36
40
  "ul",
@@ -48,7 +52,10 @@ function Export({ url, proxy }) {
48
52
  className: "dropdown__link",
49
53
  href: `${url}`,
50
54
  },
51
- "OpenAPI Spec"
55
+ (0, Translate_1.translate)({
56
+ id: "theme.openapi.export.openapiSpec",
57
+ message: "OpenAPI Spec",
58
+ })
52
59
  )
53
60
  )
54
61
  )
@@ -72,7 +72,6 @@ const Translate_1 = require("@docusaurus/Translate");
72
72
  const FloatingButton_1 = __importDefault(
73
73
  require("@theme/ApiExplorer/FloatingButton")
74
74
  );
75
- const translationIds_1 = require("@theme/translationIds");
76
75
  const react_magic_dropzone_1 = __importDefault(require("react-magic-dropzone"));
77
76
  function RenderPreview({ file }) {
78
77
  switch (file.type) {
@@ -161,7 +160,7 @@ function FormFileUpload({ placeholder, onChange }) {
161
160
  },
162
161
  },
163
162
  (0, Translate_1.translate)({
164
- id: translationIds_1.OPENAPI_FORM_FILE_UPLOAD.CLEAR_BUTTON,
163
+ id: "theme.openapi.formFileUpload.clearButton",
165
164
  message: "Clear",
166
165
  })
167
166
  ),
@@ -13,7 +13,6 @@ var __importDefault =
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  const react_1 = __importDefault(require("react"));
15
15
  const Translate_1 = require("@docusaurus/Translate");
16
- const translationIds_1 = require("@theme/translationIds");
17
16
  function FormLabel({ htmlFor, label, type, required }) {
18
17
  return react_1.default.createElement(
19
18
  react_1.default.Fragment,
@@ -41,7 +40,7 @@ function FormLabel({ htmlFor, label, type, required }) {
41
40
  "span",
42
41
  { className: "openapi-schema__required" },
43
42
  (0, Translate_1.translate)({
44
- id: translationIds_1.OPENAPI_SCHEMA_ITEM.REQUIRED,
43
+ id: "theme.openapi.schemaItem.required",
45
44
  message: "required",
46
45
  })
47
46
  )
@@ -72,7 +72,6 @@ const react_1 = __importStar(require("react"));
72
72
  const Translate_1 = require("@docusaurus/Translate");
73
73
  const error_message_1 = require("@hookform/error-message");
74
74
  const FormLabel_1 = __importDefault(require("@theme/ApiExplorer/FormLabel"));
75
- const translationIds_1 = require("@theme/translationIds");
76
75
  const clsx_1 = __importDefault(require("clsx"));
77
76
  const react_hook_form_1 = require("react-hook-form");
78
77
  function FormTextInput({
@@ -108,7 +107,7 @@ function FormTextInput({
108
107
  ...register(paramName, {
109
108
  required: isRequired
110
109
  ? (0, Translate_1.translate)({
111
- id: translationIds_1.OPENAPI_FORM.FIELD_REQUIRED,
110
+ id: "theme.openapi.form.fieldRequired",
112
111
  message: "This field is required",
113
112
  })
114
113
  : false,
@@ -72,7 +72,6 @@ const theme_common_1 = require("@docusaurus/theme-common");
72
72
  const Translate_1 = require("@docusaurus/Translate");
73
73
  const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
74
74
  const error_message_1 = require("@hookform/error-message");
75
- const translationIds_1 = require("@theme/translationIds");
76
75
  const clsx_1 = __importDefault(require("clsx"));
77
76
  const react_hook_form_1 = require("react-hook-form");
78
77
  const react_live_1 = require("react-live");
@@ -144,7 +143,7 @@ function App({
144
143
  required:
145
144
  isRequired && !code
146
145
  ? (0, Translate_1.translate)({
147
- id: translationIds_1.OPENAPI_FORM.FIELD_REQUIRED,
146
+ id: "theme.openapi.form.fieldRequired",
148
147
  message: "This field is required",
149
148
  })
150
149
  : false,
@@ -79,7 +79,6 @@ const FormTextInput_1 = __importDefault(
79
79
  );
80
80
  const slice_1 = require("@theme/ApiExplorer/ParamOptions/slice");
81
81
  const hooks_1 = require("@theme/ApiItem/hooks");
82
- const translationIds_1 = require("@theme/translationIds");
83
82
  const react_hook_form_1 = require("react-hook-form");
84
83
  function ArrayItem({ param, onChange, initialValue }) {
85
84
  const [value, setValue] = (0, react_1.useState)(initialValue || "");
@@ -171,7 +170,7 @@ function ParamArrayFormItem({ param, label, type, required }) {
171
170
  rules: {
172
171
  required: param.required
173
172
  ? (0, Translate_1.translate)({
174
- id: translationIds_1.OPENAPI_FORM.FIELD_REQUIRED,
173
+ id: "theme.openapi.form.fieldRequired",
175
174
  message: "This field is required",
176
175
  })
177
176
  : false,
@@ -219,7 +218,10 @@ function ParamArrayFormItem({ param, label, type, required }) {
219
218
  react_1.default.createElement(
220
219
  "button",
221
220
  { className: "openapi-explorer__thin-btn", onClick: handleAddItem },
222
- "Add item"
221
+ (0, Translate_1.translate)({
222
+ id: "theme.openapi.paramArray.addItem",
223
+ message: "Add item",
224
+ })
223
225
  )
224
226
  ),
225
227
  }),
@@ -74,7 +74,6 @@ const error_message_1 = require("@hookform/error-message");
74
74
  const FormSelect_1 = __importDefault(require("@theme/ApiExplorer/FormSelect"));
75
75
  const slice_1 = require("@theme/ApiExplorer/ParamOptions/slice");
76
76
  const hooks_1 = require("@theme/ApiItem/hooks");
77
- const translationIds_1 = require("@theme/translationIds");
78
77
  const react_hook_form_1 = require("react-hook-form");
79
78
  function ParamBooleanFormItem({ param, label, type, required }) {
80
79
  const dispatch = (0, hooks_1.useTypedDispatch)();
@@ -106,7 +105,7 @@ function ParamBooleanFormItem({ param, label, type, required }) {
106
105
  rules: {
107
106
  required: param.required
108
107
  ? (0, Translate_1.translate)({
109
- id: translationIds_1.OPENAPI_FORM.FIELD_REQUIRED,
108
+ id: "theme.openapi.form.fieldRequired",
110
109
  message: "This field is required",
111
110
  })
112
111
  : false,
@@ -21,7 +21,6 @@ const FormMultiSelect_1 = __importDefault(
21
21
  const ParamOptions_1 = require("@theme/ApiExplorer/ParamOptions");
22
22
  const slice_1 = require("@theme/ApiExplorer/ParamOptions/slice");
23
23
  const hooks_1 = require("@theme/ApiItem/hooks");
24
- const translationIds_1 = require("@theme/translationIds");
25
24
  const react_hook_form_1 = require("react-hook-form");
26
25
  function ParamMultiSelectFormItem({ param, label, type, required }) {
27
26
  const {
@@ -70,7 +69,7 @@ function ParamMultiSelectFormItem({ param, label, type, required }) {
70
69
  rules: {
71
70
  required: param.required
72
71
  ? (0, Translate_1.translate)({
73
- id: translationIds_1.OPENAPI_FORM.FIELD_REQUIRED,
72
+ id: "theme.openapi.form.fieldRequired",
74
73
  message: "This field is required",
75
74
  })
76
75
  : false,
@@ -75,7 +75,6 @@ const FormSelect_1 = __importDefault(require("@theme/ApiExplorer/FormSelect"));
75
75
  const ParamOptions_1 = require("@theme/ApiExplorer/ParamOptions");
76
76
  const slice_1 = require("@theme/ApiExplorer/ParamOptions/slice");
77
77
  const hooks_1 = require("@theme/ApiItem/hooks");
78
- const translationIds_1 = require("@theme/translationIds");
79
78
  const react_hook_form_1 = require("react-hook-form");
80
79
  function ParamSelectFormItem({ param, label, type, required }) {
81
80
  const {
@@ -100,7 +99,7 @@ function ParamSelectFormItem({ param, label, type, required }) {
100
99
  rules: {
101
100
  required: param.required
102
101
  ? (0, Translate_1.translate)({
103
- id: translationIds_1.OPENAPI_FORM.FIELD_REQUIRED,
102
+ id: "theme.openapi.form.fieldRequired",
104
103
  message: "This field is required",
105
104
  })
106
105
  : false,
@@ -87,7 +87,6 @@ const ParamTextFormItem_1 = __importDefault(
87
87
  require("@theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem")
88
88
  );
89
89
  const hooks_1 = require("@theme/ApiItem/hooks");
90
- const translationIds_1 = require("@theme/translationIds");
91
90
  /**
92
91
  * Extracts enum values from a schema, including when wrapped in allOf.
93
92
  * This handles cases where an enum is referenced via allOf for composition.
@@ -254,11 +253,11 @@ function ParamOptions() {
254
253
  ),
255
254
  showOptional
256
255
  ? (0, Translate_1.translate)({
257
- id: translationIds_1.OPENAPI_PARAM_OPTIONS.HIDE_OPTIONAL,
256
+ id: "theme.openapi.paramOptions.hideOptional",
258
257
  message: "Hide optional parameters",
259
258
  })
260
259
  : (0, Translate_1.translate)({
261
- id: translationIds_1.OPENAPI_PARAM_OPTIONS.SHOW_OPTIONAL,
260
+ id: "theme.openapi.paramOptions.showOptional",
262
261
  message: "Show optional parameters",
263
262
  })
264
263
  ),
@@ -85,14 +85,13 @@ const buildPostmanRequest_1 = __importDefault(
85
85
  const ContentType_1 = __importDefault(
86
86
  require("@theme/ApiExplorer/ContentType")
87
87
  );
88
+ const useResolvedEncoding_1 = require("@theme/ApiExplorer/EncodingSelection/useResolvedEncoding");
88
89
  const ParamOptions_1 = __importDefault(
89
90
  require("@theme/ApiExplorer/ParamOptions")
90
91
  );
91
92
  const slice_1 = require("@theme/ApiExplorer/Response/slice");
92
93
  const Server_1 = __importDefault(require("@theme/ApiExplorer/Server"));
93
- const useResolvedEncoding_1 = require("@theme/ApiExplorer/EncodingSelection/useResolvedEncoding");
94
94
  const hooks_1 = require("@theme/ApiItem/hooks");
95
- const translationIds_1 = require("@theme/translationIds");
96
95
  const sdk = __importStar(require("postman-collection"));
97
96
  const react_hook_form_1 = require("react-hook-form");
98
97
  const makeRequest_1 = __importStar(require("./makeRequest"));
@@ -200,26 +199,26 @@ function Request({ item }) {
200
199
  switch (errorType) {
201
200
  case "timeout":
202
201
  return (0, Translate_1.translate)({
203
- id: translationIds_1.OPENAPI_REQUEST.ERROR_TIMEOUT,
202
+ id: "theme.openapi.request.error.timeout",
204
203
  message:
205
204
  "The request timed out waiting for the server to respond. Please try again. If the issue persists, try using a different client (e.g., curl) with a longer timeout.",
206
205
  });
207
206
  case "network":
208
207
  return (0, Translate_1.translate)({
209
- id: translationIds_1.OPENAPI_REQUEST.ERROR_NETWORK,
208
+ id: "theme.openapi.request.error.network",
210
209
  message:
211
210
  "Unable to reach the server. Please check your network connection and verify the server URL is correct. If the server is running, this may be a CORS issue.",
212
211
  });
213
212
  case "cors":
214
213
  return (0, Translate_1.translate)({
215
- id: translationIds_1.OPENAPI_REQUEST.ERROR_CORS,
214
+ id: "theme.openapi.request.error.cors",
216
215
  message:
217
216
  "The request was blocked, possibly due to CORS restrictions. Ensure the server allows requests from this origin, or try using a proxy.",
218
217
  });
219
218
  case "unknown":
220
219
  default:
221
220
  return (0, Translate_1.translate)({
222
- id: translationIds_1.OPENAPI_REQUEST.ERROR_UNKNOWN,
221
+ id: "theme.openapi.request.error.unknown",
223
222
  message:
224
223
  "An unexpected error occurred while making the request. Please try again.",
225
224
  });
@@ -229,7 +228,7 @@ function Request({ item }) {
229
228
  dispatch(
230
229
  (0, slice_1.setResponse)(
231
230
  (0, Translate_1.translate)({
232
- id: translationIds_1.OPENAPI_REQUEST.FETCHING_MESSAGE,
231
+ id: "theme.openapi.request.fetchingMessage",
233
232
  message: "Fetching...",
234
233
  })
235
234
  )
@@ -256,7 +255,7 @@ function Request({ item }) {
256
255
  errorMessage = getErrorMessage(e.type);
257
256
  } else {
258
257
  errorMessage = (0, Translate_1.translate)({
259
- id: translationIds_1.OPENAPI_REQUEST.CONNECTION_FAILED,
258
+ id: "theme.openapi.request.connectionFailed",
260
259
  message: "Connection failed",
261
260
  });
262
261
  }
@@ -314,7 +313,7 @@ function Request({ item }) {
314
313
  "span",
315
314
  { className: "openapi-explorer__request-title" },
316
315
  (0, Translate_1.translate)({
317
- id: translationIds_1.OPENAPI_REQUEST.REQUEST_TITLE,
316
+ id: "theme.openapi.request.title",
318
317
  message: "Request",
319
318
  })
320
319
  ),
@@ -327,7 +326,7 @@ function Request({ item }) {
327
326
  onClick: collapseAllDetails,
328
327
  },
329
328
  (0, Translate_1.translate)({
330
- id: translationIds_1.OPENAPI_REQUEST.COLLAPSE_ALL,
329
+ id: "theme.openapi.request.collapseAll",
331
330
  message: "Collapse all",
332
331
  })
333
332
  )
@@ -339,7 +338,7 @@ function Request({ item }) {
339
338
  onClick: expandAllDetails,
340
339
  },
341
340
  (0, Translate_1.translate)({
342
- id: translationIds_1.OPENAPI_REQUEST.EXPAND_ALL,
341
+ id: "theme.openapi.request.expandAll",
343
342
  message: "Expand all",
344
343
  })
345
344
  )
@@ -366,7 +365,7 @@ function Request({ item }) {
366
365
  },
367
366
  },
368
367
  (0, Translate_1.translate)({
369
- id: translationIds_1.OPENAPI_REQUEST.BASE_URL_TITLE,
368
+ id: "theme.openapi.request.baseUrl.title",
370
369
  message: "Base URL",
371
370
  })
372
371
  ),
@@ -391,7 +390,7 @@ function Request({ item }) {
391
390
  },
392
391
  },
393
392
  (0, Translate_1.translate)({
394
- id: translationIds_1.OPENAPI_REQUEST.AUTH_TITLE,
393
+ id: "theme.openapi.request.auth.title",
395
394
  message: "Auth",
396
395
  })
397
396
  ),
@@ -415,7 +414,7 @@ function Request({ item }) {
415
414
  },
416
415
  },
417
416
  (0, Translate_1.translate)({
418
- id: translationIds_1.OPENAPI_REQUEST.PARAMETERS_TITLE,
417
+ id: "theme.openapi.request.parameters.title",
419
418
  message: "Parameters",
420
419
  })
421
420
  ),
@@ -438,7 +437,7 @@ function Request({ item }) {
438
437
  },
439
438
  },
440
439
  (0, Translate_1.translate)({
441
- id: translationIds_1.OPENAPI_REQUEST.BODY_TITLE,
440
+ id: "theme.openapi.request.body.title",
442
441
  message: "Body",
443
442
  }),
444
443
  requestBodyRequired &&
@@ -447,7 +446,7 @@ function Request({ item }) {
447
446
  { className: "openapi-schema__required" },
448
447
  "\u00A0",
449
448
  (0, Translate_1.translate)({
450
- id: translationIds_1.OPENAPI_REQUEST.REQUIRED_LABEL,
449
+ id: "theme.openapi.request.requiredLabel",
451
450
  message: "required",
452
451
  })
453
452
  )
@@ -480,7 +479,7 @@ function Request({ item }) {
480
479
  },
481
480
  },
482
481
  (0, Translate_1.translate)({
483
- id: translationIds_1.OPENAPI_REQUEST.ACCEPT_TITLE,
482
+ id: "theme.openapi.request.accept.title",
484
483
  message: "Accept",
485
484
  })
486
485
  ),
@@ -492,7 +491,7 @@ function Request({ item }) {
492
491
  "button",
493
492
  { className: "openapi-explorer__request-btn", type: "submit" },
494
493
  (0, Translate_1.translate)({
495
- id: translationIds_1.OPENAPI_REQUEST.SEND_BUTTON,
494
+ id: "theme.openapi.request.sendButton",
496
495
  message: "Send API Request",
497
496
  })
498
497
  )
@@ -80,7 +80,6 @@ const ApiCodeBlock_1 = __importDefault(
80
80
  const hooks_1 = require("@theme/ApiItem/hooks");
81
81
  const SchemaTabs_1 = __importDefault(require("@theme/SchemaTabs"));
82
82
  const TabItem_1 = __importDefault(require("@theme/TabItem"));
83
- const translationIds_1 = require("@theme/translationIds");
84
83
  const clsx_1 = __importDefault(require("clsx"));
85
84
  const slice_1 = require("./slice");
86
85
  // Pretty-print a JSON string by re-indenting structural tokens only.
@@ -193,7 +192,7 @@ function Response({ item }) {
193
192
  "span",
194
193
  { className: "openapi-explorer__response-title" },
195
194
  (0, Translate_1.translate)({
196
- id: translationIds_1.OPENAPI_RESPONSE.TITLE,
195
+ id: "theme.openapi.response.title",
197
196
  message: "Response",
198
197
  })
199
198
  ),
@@ -209,7 +208,7 @@ function Response({ item }) {
209
208
  },
210
209
  },
211
210
  (0, Translate_1.translate)({
212
- id: translationIds_1.OPENAPI_RESPONSE.CLEAR,
211
+ id: "theme.openapi.response.clear",
213
212
  message: "Clear",
214
213
  })
215
214
  )
@@ -263,17 +262,14 @@ function Response({ item }) {
263
262
  react_1.default.createElement(
264
263
  Translate_1.default,
265
264
  {
266
- id: translationIds_1.OPENAPI_RESPONSE.PLACEHOLDER,
265
+ id: "theme.openapi.response.placeholder",
267
266
  values: {
268
267
  code: react_1.default.createElement(
269
268
  "code",
270
269
  null,
271
270
  react_1.default.createElement(
272
271
  Translate_1.default,
273
- {
274
- id: translationIds_1.OPENAPI_REQUEST
275
- .SEND_BUTTON,
276
- },
272
+ { id: "theme.openapi.request.sendButton" },
277
273
  "Send API Request"
278
274
  )
279
275
  ),
@@ -288,7 +284,7 @@ function Response({ item }) {
288
284
  TabItem_1.default,
289
285
  {
290
286
  label: (0, Translate_1.translate)({
291
- id: translationIds_1.OPENAPI_RESPONSE.HEADERS_TAB,
287
+ id: "theme.openapi.response.headersTab",
292
288
  message: "Headers",
293
289
  }),
294
290
  value: "headers",
@@ -323,14 +319,14 @@ function Response({ item }) {
323
319
  react_1.default.createElement(
324
320
  Translate_1.default,
325
321
  {
326
- id: translationIds_1.OPENAPI_RESPONSE.PLACEHOLDER,
322
+ id: "theme.openapi.response.placeholder",
327
323
  values: {
328
324
  code: react_1.default.createElement(
329
325
  "code",
330
326
  null,
331
327
  react_1.default.createElement(
332
328
  Translate_1.default,
333
- { id: translationIds_1.OPENAPI_REQUEST.SEND_BUTTON },
329
+ { id: "theme.openapi.request.sendButton" },
334
330
  "Send API Request"
335
331
  )
336
332
  ),