docusaurus-theme-openapi-docs 0.0.0-735 → 0.0.0-736

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 (50) hide show
  1. package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +4 -2
  2. package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +3 -1
  3. package/lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +2 -1
  4. package/lib/theme/ApiExplorer/Request/_Request.scss +4 -2
  5. package/lib/theme/ApiExplorer/Response/_Response.scss +4 -2
  6. package/package.json +3 -3
  7. package/src/index.ts +1 -1
  8. package/src/markdown/schema.ts +3 -3
  9. package/src/markdown/utils.ts +1 -1
  10. package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.js +1 -1
  11. package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +1 -1
  12. package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +4 -4
  13. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +1 -1
  14. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +1 -1
  15. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +4 -4
  16. package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js +1 -1
  17. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +1 -1
  18. package/src/theme/ApiExplorer/Authorization/index.tsx +5 -5
  19. package/src/theme/ApiExplorer/Authorization/slice.ts +1 -1
  20. package/src/theme/ApiExplorer/Body/index.tsx +4 -4
  21. package/src/theme/ApiExplorer/Body/slice.ts +2 -2
  22. package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +4 -2
  23. package/src/theme/ApiExplorer/CodeTabs/index.js +7 -7
  24. package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +3 -1
  25. package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +1 -1
  26. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +1 -1
  27. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +1 -1
  28. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +5 -5
  29. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +1 -1
  30. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +1 -1
  31. package/src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +2 -1
  32. package/src/theme/ApiExplorer/Request/_Request.scss +4 -2
  33. package/src/theme/ApiExplorer/Request/index.tsx +1 -1
  34. package/src/theme/ApiExplorer/Request/makeRequest.ts +3 -3
  35. package/src/theme/ApiExplorer/Response/_Response.scss +4 -2
  36. package/src/theme/ApiExplorer/Response/index.tsx +2 -2
  37. package/src/theme/ApiExplorer/Server/index.tsx +8 -8
  38. package/src/theme/ApiExplorer/Server/slice.ts +1 -1
  39. package/src/theme/ApiExplorer/buildPostmanRequest.ts +3 -3
  40. package/src/theme/ApiExplorer/persistanceMiddleware.ts +1 -1
  41. package/src/theme/ApiItem/index.tsx +3 -3
  42. package/src/theme/ApiItem/store.ts +2 -2
  43. package/src/theme/ApiTabs/index.js +6 -6
  44. package/src/theme/DiscriminatorTabs/index.js +4 -4
  45. package/src/theme/MimeTabs/index.js +4 -4
  46. package/src/theme/OperationTabs/index.js +4 -4
  47. package/src/theme/ParamsItem/index.js +3 -3
  48. package/src/theme/SchemaItem/index.js +1 -1
  49. package/src/theme/SchemaTabs/index.js +4 -4
  50. package/src/theme-openapi.d.ts +5 -5
@@ -18,12 +18,14 @@
18
18
  background-color: var(--ifm-pre-background);
19
19
  border-radius: var(--ifm-global-radius);
20
20
  border: 1px solid var(--openapi-explorer-border-color);
21
- box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
21
+ box-shadow:
22
+ 0 2px 3px hsla(222, 8%, 43%, 0.1),
22
23
  0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
23
24
  transition: 300ms;
24
25
 
25
26
  &:hover {
26
- box-shadow: 0 0 0 2px rgba(38, 53, 61, 0.15),
27
+ box-shadow:
28
+ 0 0 0 2px rgba(38, 53, 61, 0.15),
27
29
  0 2px 3px hsla(222, 8%, 43%, 0.15),
28
30
  0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
29
31
  }
@@ -11,7 +11,9 @@
11
11
  padding: 0.4rem 0.5rem;
12
12
  opacity: 0;
13
13
  visibility: hidden;
14
- transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,
14
+ transition:
15
+ opacity 0.2s ease-in-out,
16
+ visibility 0.2s ease-in-out,
15
17
  bottom 0.2s ease-in-out;
16
18
  position: absolute;
17
19
  right: calc(var(--ifm-pre-padding) / 2);
@@ -107,7 +107,8 @@
107
107
  }
108
108
 
109
109
  &:active {
110
- box-shadow: inset 0 0 0 1px var(--openapi-input-border),
110
+ box-shadow:
111
+ inset 0 0 0 1px var(--openapi-input-border),
111
112
  inset 0 0 0 2px var(--openapi-inverse-color);
112
113
  }
113
114
  }
@@ -2,7 +2,8 @@
2
2
  background-color: var(--ifm-pre-background);
3
3
  border-radius: var(--openapi-card-border-radius);
4
4
  border: 1px solid var(--openapi-explorer-border-color);
5
- box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
5
+ box-shadow:
6
+ 0 2px 3px hsla(222, 8%, 43%, 0.1),
6
7
  0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
7
8
  color: var(--ifm-pre-color);
8
9
  line-height: var(--ifm-pre-line-height);
@@ -19,7 +20,8 @@
19
20
  }
20
21
 
21
22
  &:hover {
22
- box-shadow: 0 0 0 2px rgba(38, 53, 61, 0.15),
23
+ box-shadow:
24
+ 0 0 0 2px rgba(38, 53, 61, 0.15),
23
25
  0 2px 3px hsla(222, 8%, 43%, 0.15),
24
26
  0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
25
27
  }
@@ -2,7 +2,8 @@
2
2
  background-color: var(--ifm-pre-background);
3
3
  border-radius: var(--openapi-card-border-radius);
4
4
  border: 1px solid var(--openapi-explorer-border-color);
5
- box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
5
+ box-shadow:
6
+ 0 2px 3px hsla(222, 8%, 43%, 0.1),
6
7
  0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
7
8
  color: var(--ifm-pre-color);
8
9
  line-height: var(--ifm-pre-line-height);
@@ -12,7 +13,8 @@
12
13
  transition: 300ms;
13
14
 
14
15
  &:hover {
15
- box-shadow: 0 0 0 2px rgba(38, 53, 61, 0.15),
16
+ box-shadow:
17
+ 0 0 0 2px rgba(38, 53, 61, 0.15),
16
18
  0 2px 3px hsla(222, 8%, 43%, 0.15),
17
19
  0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
18
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-theme-openapi-docs",
3
3
  "description": "OpenAPI theme for Docusaurus.",
4
- "version": "0.0.0-735",
4
+ "version": "0.0.0-736",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -41,7 +41,7 @@
41
41
  "clsx": "^1.1.1",
42
42
  "copy-text-to-clipboard": "^3.1.0",
43
43
  "crypto-js": "^4.1.1",
44
- "docusaurus-plugin-openapi-docs": "0.0.0-735",
44
+ "docusaurus-plugin-openapi-docs": "0.0.0-736",
45
45
  "docusaurus-plugin-sass": "^0.2.3",
46
46
  "file-saver": "^2.0.5",
47
47
  "lodash": "^4.17.20",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=14"
70
70
  },
71
- "gitHead": "0aacbd3243e7d31d391ed5b15216f54b142c9fa2"
71
+ "gitHead": "ac63a892a690324697897289720d42d4bd3989fa"
72
72
  }
package/src/index.ts CHANGED
@@ -18,7 +18,7 @@ export default function docusaurusThemeOpenAPI(): Plugin<void> {
18
18
  getClientModules() {
19
19
  const modules = [
20
20
  require.resolve(
21
- path.join(__dirname, "..", "lib", "theme", "styles.scss")
21
+ path.join(__dirname, "..", "lib", "theme", "styles.scss"),
22
22
  ),
23
23
  ];
24
24
  return modules;
@@ -45,7 +45,7 @@ function prettyName(schema: SchemaObject, circular?: boolean) {
45
45
 
46
46
  export function getSchemaName(
47
47
  schema: SchemaObject,
48
- circular?: boolean
48
+ circular?: boolean,
49
49
  ): string {
50
50
  if (schema.items) {
51
51
  return prettyName(schema.items, circular) + "[]";
@@ -79,7 +79,7 @@ export function getQualifierMessage(schema?: SchemaObject): string | undefined {
79
79
  if (schema.items && schema.items.enum) {
80
80
  if (schema.items.enum) {
81
81
  qualifierGroups.push(
82
- `[${schema.items.enum.map((e) => `\`${e}\``).join(", ")}]`
82
+ `[${schema.items.enum.map((e) => `\`${e}\``).join(", ")}]`,
83
83
  );
84
84
  }
85
85
  }
@@ -150,7 +150,7 @@ export function getQualifierMessage(schema?: SchemaObject): string | undefined {
150
150
 
151
151
  if (schema.pattern) {
152
152
  qualifierGroups.push(
153
- `Value must match regular expression \`${schema.pattern}\``
153
+ `Value must match regular expression \`${schema.pattern}\``,
154
154
  );
155
155
  }
156
156
 
@@ -22,7 +22,7 @@ export function create(tag: string, props: Props): string {
22
22
 
23
23
  export function guard<T>(
24
24
  value: T | undefined | string,
25
- cb: (value: T) => Children
25
+ cb: (value: T) => Children,
26
26
  ): string {
27
27
  if (!!value || value === 0) {
28
28
  const children = cb(value as T);
@@ -22,7 +22,7 @@ export default function CodeBlockContainer({ as: As, ...props }) {
22
22
  className={clsx(
23
23
  "openapi-explorer__code-block-container",
24
24
  props.className,
25
- ThemeClassNames.common.codeBlock
25
+ ThemeClassNames.common.codeBlock,
26
26
  )}
27
27
  />
28
28
  );
@@ -21,7 +21,7 @@ export default function CodeBlockJSX({ children, className }) {
21
21
  className={clsx(
22
22
  "openapi-explorer__code-block-standalone",
23
23
  "thin-scrollbar",
24
- className
24
+ className,
25
25
  )}
26
26
  >
27
27
  <code className="openapi-explorer__code-block-lines">{children}</code>
@@ -57,7 +57,7 @@ export default function CodeBlockString({
57
57
  blockClassName,
58
58
  language &&
59
59
  !blockClassName.includes(`language-${language}`) &&
60
- `language-${language}`
60
+ `language-${language}`,
61
61
  )}
62
62
  >
63
63
  {title && (
@@ -78,14 +78,14 @@ export default function CodeBlockString({
78
78
  className={clsx(
79
79
  className,
80
80
  "openapi-explorer__code-block",
81
- "thin-scrollbar"
81
+ "thin-scrollbar",
82
82
  )}
83
83
  >
84
84
  <code
85
85
  className={clsx(
86
86
  "openapi-explorer__code-block-lines",
87
87
  showLineNumbers &&
88
- "openapi-explorer__code-block-lines-numbering"
88
+ "openapi-explorer__code-block-lines-numbering",
89
89
  )}
90
90
  >
91
91
  {tokens.map((line, i) => (
@@ -117,7 +117,7 @@ export default function CodeBlockString({
117
117
  <ExpandButton
118
118
  className={clsx(
119
119
  "openapi-explorer__code-block-code-btn",
120
- "openapi-explorer__expand-btn"
120
+ "openapi-explorer__expand-btn",
121
121
  )}
122
122
  code={code}
123
123
  language={language}
@@ -48,7 +48,7 @@ export default function CopyButton({ code, className }) {
48
48
  "clean-btn",
49
49
  className,
50
50
  "openapi-explorer__code-block-copy-btn",
51
- isCopied && "openapi-explorer__code-block-copy-btn--copied"
51
+ isCopied && "openapi-explorer__code-block-copy-btn--copied",
52
52
  )}
53
53
  onClick={handleCopyCode}
54
54
  >
@@ -27,7 +27,7 @@ export default function ExitButton({ className, handler }) {
27
27
  className={clsx(
28
28
  "clean-btn",
29
29
  "openapi-explorer__code-block-exit-btn",
30
- className
30
+ className,
31
31
  )}
32
32
  onClick={handler}
33
33
  >
@@ -59,7 +59,7 @@ export default function ExpandButton({
59
59
  "clean-btn",
60
60
  className,
61
61
  "openapi-explorer__code-block-expand-btn",
62
- isModalOpen && "openapi-explorer__code-block-expand-btn--copied"
62
+ isModalOpen && "openapi-explorer__code-block-expand-btn--copied",
63
63
  )}
64
64
  onClick={() => setIsModalOpen(true)}
65
65
  >
@@ -94,7 +94,7 @@ export default function ExpandButton({
94
94
  "openapi-explorer__code-block-container",
95
95
  language &&
96
96
  !blockClassName.includes(`language-${language}`) &&
97
- `language-${language}`
97
+ `language-${language}`,
98
98
  )}
99
99
  >
100
100
  {title && (
@@ -114,14 +114,14 @@ export default function ExpandButton({
114
114
  className={clsx(
115
115
  className,
116
116
  "openapi-explorer__code-block",
117
- "thin-scrollbar"
117
+ "thin-scrollbar",
118
118
  )}
119
119
  >
120
120
  <code
121
121
  className={clsx(
122
122
  "openapi-explorer__code-block-lines",
123
123
  showLineNumbers &&
124
- "openapi-explorer__code-block-lines-numbers"
124
+ "openapi-explorer__code-block-lines-numbers",
125
125
  )}
126
126
  >
127
127
  {tokens.map((line, i) => (
@@ -23,7 +23,7 @@ export default function CodeBlockLine({
23
23
  line,
24
24
  className: clsx(
25
25
  classNames,
26
- showLineNumbers && "openapi-explorer__code-block-code-line"
26
+ showLineNumbers && "openapi-explorer__code-block-code-line",
27
27
  ),
28
28
  });
29
29
  const lineTokens = line.map((token, key) => (
@@ -24,7 +24,7 @@ export default function WordWrapButton({ className, onClick, isEnabled }) {
24
24
  className={clsx(
25
25
  "clean-btn",
26
26
  className,
27
- isEnabled && "openapi-explorer__code-block-word-wrap-btn--enabled"
27
+ isEnabled && "openapi-explorer__code-block-word-wrap-btn--enabled",
28
28
  )}
29
29
  aria-label={title}
30
30
  title={title}
@@ -56,7 +56,7 @@ function Authorization() {
56
56
  scheme: a.key,
57
57
  key: "token",
58
58
  value: value ? value : undefined,
59
- })
59
+ }),
60
60
  );
61
61
  }}
62
62
  />
@@ -77,7 +77,7 @@ function Authorization() {
77
77
  scheme: a.key,
78
78
  key: "token",
79
79
  value: value ? value : undefined,
80
- })
80
+ }),
81
81
  );
82
82
  }}
83
83
  />
@@ -99,7 +99,7 @@ function Authorization() {
99
99
  scheme: a.key,
100
100
  key: "username",
101
101
  value: value ? value : undefined,
102
- })
102
+ }),
103
103
  );
104
104
  }}
105
105
  />
@@ -116,7 +116,7 @@ function Authorization() {
116
116
  scheme: a.key,
117
117
  key: "password",
118
118
  value: value ? value : undefined,
119
- })
119
+ }),
120
120
  );
121
121
  }}
122
122
  />
@@ -138,7 +138,7 @@ function Authorization() {
138
138
  scheme: a.key,
139
139
  key: "apiKey",
140
140
  value: value ? value : undefined,
141
- })
141
+ }),
142
142
  );
143
143
  }}
144
144
  />
@@ -130,7 +130,7 @@ export const slice = createSlice({
130
130
  reducers: {
131
131
  setAuthData: (
132
132
  state,
133
- action: PayloadAction<{ scheme: string; key: string; value?: string }>
133
+ action: PayloadAction<{ scheme: string; key: string; value?: string }>,
134
134
  ) => {
135
135
  const { scheme, key, value } = action.payload;
136
136
  state.data[scheme][key] = value;
@@ -108,7 +108,7 @@ function Body({
108
108
  setFileRawBody({
109
109
  src: `/path/to/${file.name}`,
110
110
  content: file,
111
- })
111
+ }),
112
112
  );
113
113
  }}
114
114
  />
@@ -148,7 +148,7 @@ function Body({
148
148
  src: `/path/to/${file.name}`,
149
149
  content: file,
150
150
  },
151
- })
151
+ }),
152
152
  );
153
153
  }}
154
154
  />
@@ -177,7 +177,7 @@ function Body({
177
177
  setStringFormBody({
178
178
  key: key,
179
179
  value: val,
180
- })
180
+ }),
181
181
  );
182
182
  }
183
183
  }}
@@ -204,7 +204,7 @@ function Body({
204
204
  placeholder={val.description || key}
205
205
  onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
206
206
  dispatch(
207
- setStringFormBody({ key: key, value: e.target.value })
207
+ setStringFormBody({ key: key, value: e.target.value }),
208
208
  );
209
209
  }}
210
210
  />
@@ -78,7 +78,7 @@ export const slice = createSlice({
78
78
  },
79
79
  setStringFormBody: (
80
80
  state,
81
- action: PayloadAction<{ key: string; value: string }>
81
+ action: PayloadAction<{ key: string; value: string }>,
82
82
  ) => {
83
83
  if (state?.type !== "form") {
84
84
  return {
@@ -99,7 +99,7 @@ export const slice = createSlice({
99
99
  },
100
100
  setFileFormBody: (
101
101
  state,
102
- action: PayloadAction<{ key: string; value: FileContent["value"] }>
102
+ action: PayloadAction<{ key: string; value: FileContent["value"] }>,
103
103
  ) => {
104
104
  if (state?.type !== "form") {
105
105
  return {
@@ -18,12 +18,14 @@
18
18
  background-color: var(--ifm-pre-background);
19
19
  border-radius: var(--ifm-global-radius);
20
20
  border: 1px solid var(--openapi-explorer-border-color);
21
- box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
21
+ box-shadow:
22
+ 0 2px 3px hsla(222, 8%, 43%, 0.1),
22
23
  0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
23
24
  transition: 300ms;
24
25
 
25
26
  &:hover {
26
- box-shadow: 0 0 0 2px rgba(38, 53, 61, 0.15),
27
+ box-shadow:
28
+ 0 0 0 2px rgba(38, 53, 61, 0.15),
27
29
  0 2px 3px hsla(222, 8%, 43%, 0.15),
28
30
  0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
29
31
  }
@@ -44,19 +44,19 @@ function TabList({
44
44
  let newLanguage;
45
45
  if (currentLanguage && includeVariant) {
46
46
  newLanguage = languageSet.filter(
47
- (lang) => lang.language === currentLanguage
47
+ (lang) => lang.language === currentLanguage,
48
48
  )[0];
49
49
  newLanguage.variant = newTabValue;
50
50
  action.setSelectedVariant(newTabValue.toLowerCase());
51
51
  } else if (currentLanguage && includeSample) {
52
52
  newLanguage = languageSet.filter(
53
- (lang) => lang.language === currentLanguage
53
+ (lang) => lang.language === currentLanguage,
54
54
  )[0];
55
55
  newLanguage.sample = newTabValue;
56
56
  action.setSelectedSample(newTabValue);
57
57
  } else {
58
58
  newLanguage = languageSet.filter(
59
- (lang) => lang.language === newTabValue
59
+ (lang) => lang.language === newTabValue,
60
60
  )[0];
61
61
  action.setSelectedVariant(newLanguage.variant.toLowerCase());
62
62
  action.setSelectedSample(newLanguage.sample);
@@ -99,7 +99,7 @@ function TabList({
99
99
  {
100
100
  "tabs--block": block,
101
101
  },
102
- className
102
+ className,
103
103
  )}
104
104
  >
105
105
  {tabValues.map(({ value, label, attributes }) => (
@@ -119,7 +119,7 @@ function TabList({
119
119
  attributes?.className,
120
120
  {
121
121
  active: selectedValue === value,
122
- }
122
+ },
123
123
  )}
124
124
  >
125
125
  <span>{label ?? value}</span>
@@ -134,7 +134,7 @@ function TabContent({ lazy, children, selectedValue }) {
134
134
  children = Array.isArray(children) ? children : [children];
135
135
  if (lazy) {
136
136
  const selectedTabItem = children.find(
137
- (tabItem) => tabItem.props.value === selectedValue
137
+ (tabItem) => tabItem.props.value === selectedValue,
138
138
  );
139
139
  if (!selectedTabItem) {
140
140
  // fail-safe or fail-fast? not sure what's best here
@@ -148,7 +148,7 @@ function TabContent({ lazy, children, selectedValue }) {
148
148
  cloneElement(tabItem, {
149
149
  key: i,
150
150
  hidden: tabItem.props.value !== selectedValue,
151
- })
151
+ }),
152
152
  )}
153
153
  </div>
154
154
  );
@@ -11,7 +11,9 @@
11
11
  padding: 0.4rem 0.5rem;
12
12
  opacity: 0;
13
13
  visibility: hidden;
14
- transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,
14
+ transition:
15
+ opacity 0.2s ease-in-out,
16
+ visibility 0.2s ease-in-out,
15
17
  bottom 0.2s ease-in-out;
16
18
  position: absolute;
17
19
  right: calc(var(--ifm-pre-padding) / 2);
@@ -48,7 +48,7 @@ function MethodEndpoint({ method, path }: Props) {
48
48
  Object.keys(serverValue.variables).forEach((variable) => {
49
49
  serverUrlWithVariables = serverUrlWithVariables.replace(
50
50
  `{${variable}}`,
51
- serverValue.variables?.[variable].default ?? ""
51
+ serverValue.variables?.[variable].default ?? "",
52
52
  );
53
53
  });
54
54
  }
@@ -74,7 +74,7 @@ export default function ParamArrayFormItem({ param }: ParamProps) {
74
74
  setParam({
75
75
  ...param,
76
76
  value: values.length > 0 ? values : undefined,
77
- })
77
+ }),
78
78
  );
79
79
  // eslint-disable-next-line react-hooks/exhaustive-deps
80
80
  }, [items]);
@@ -43,7 +43,7 @@ export default function ParamBooleanFormItem({ param }: ParamProps) {
43
43
  setParam({
44
44
  ...param,
45
45
  value: val === "---" ? undefined : val,
46
- })
46
+ }),
47
47
  );
48
48
  onChange(val);
49
49
  }}
@@ -37,10 +37,10 @@ export default function ParamMultiSelectFormItem({ param }: ParamProps) {
37
37
  const paramTypeToWatch = pathParams.length
38
38
  ? pathParams
39
39
  : queryParams.length
40
- ? queryParams
41
- : cookieParams.length
42
- ? cookieParams
43
- : headerParams;
40
+ ? queryParams
41
+ : cookieParams.length
42
+ ? cookieParams
43
+ : headerParams;
44
44
 
45
45
  const handleChange = (e: any, onChange: any) => {
46
46
  const values = Array.prototype.filter
@@ -51,7 +51,7 @@ export default function ParamMultiSelectFormItem({ param }: ParamProps) {
51
51
  setParam({
52
52
  ...param,
53
53
  value: values.length > 0 ? values : undefined,
54
- })
54
+ }),
55
55
  );
56
56
 
57
57
  onChange(paramTypeToWatch);
@@ -44,7 +44,7 @@ export default function ParamSelectFormItem({ param }: ParamProps) {
44
44
  setParam({
45
45
  ...param,
46
46
  value: val === "---" ? undefined : val,
47
- })
47
+ }),
48
48
  );
49
49
  onChange(val);
50
50
  }}
@@ -30,7 +30,7 @@ export default function ParamTextFormItem({ param }: ParamProps) {
30
30
  param.in === "path" || param.in === "query"
31
31
  ? e.target.value.replace(/\s/g, "%20")
32
32
  : e.target.value,
33
- })
33
+ }),
34
34
  )
35
35
  }
36
36
  />
@@ -107,7 +107,8 @@
107
107
  }
108
108
 
109
109
  &:active {
110
- box-shadow: inset 0 0 0 1px var(--openapi-input-border),
110
+ box-shadow:
111
+ inset 0 0 0 1px var(--openapi-input-border),
111
112
  inset 0 0 0 2px var(--openapi-inverse-color);
112
113
  }
113
114
  }
@@ -2,7 +2,8 @@
2
2
  background-color: var(--ifm-pre-background);
3
3
  border-radius: var(--openapi-card-border-radius);
4
4
  border: 1px solid var(--openapi-explorer-border-color);
5
- box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
5
+ box-shadow:
6
+ 0 2px 3px hsla(222, 8%, 43%, 0.1),
6
7
  0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
7
8
  color: var(--ifm-pre-color);
8
9
  line-height: var(--ifm-pre-line-height);
@@ -19,7 +20,8 @@
19
20
  }
20
21
 
21
22
  &:hover {
22
- box-shadow: 0 0 0 2px rgba(38, 53, 61, 0.15),
23
+ box-shadow:
24
+ 0 0 0 2px rgba(38, 53, 61, 0.15),
23
25
  0 2px 3px hsla(222, 8%, 43%, 0.15),
24
26
  0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
25
27
  }
@@ -90,7 +90,7 @@ function Request({ item }: { item: NonNullable<ApiItem> }) {
90
90
  const paramType = param.in;
91
91
  const paramsArray: ParameterObject[] = paramsObject[paramType];
92
92
  paramsArray.push(param as ParameterObject);
93
- }
93
+ },
94
94
  );
95
95
 
96
96
  const methods = useForm({ shouldFocusError: false });
@@ -11,12 +11,12 @@ import sdk from "postman-collection";
11
11
  function fetchWithtimeout(
12
12
  url: string,
13
13
  options: RequestInit,
14
- timeout = 5000
14
+ timeout = 5000,
15
15
  ): any {
16
16
  return Promise.race([
17
17
  fetch(url, options),
18
18
  new Promise((_, reject) =>
19
- setTimeout(() => reject(new Error("Request timed out")), timeout)
19
+ setTimeout(() => reject(new Error("Request timed out")), timeout),
20
20
  ),
21
21
  ]);
22
22
  }
@@ -47,7 +47,7 @@ async function loadImage(content: Blob): Promise<string | ArrayBuffer | null> {
47
47
  async function makeRequest(
48
48
  request: sdk.Request,
49
49
  proxy: string | undefined,
50
- _body: Body
50
+ _body: Body,
51
51
  ) {
52
52
  const headers = request.toJSON().header;
53
53
 
@@ -2,7 +2,8 @@
2
2
  background-color: var(--ifm-pre-background);
3
3
  border-radius: var(--openapi-card-border-radius);
4
4
  border: 1px solid var(--openapi-explorer-border-color);
5
- box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
5
+ box-shadow:
6
+ 0 2px 3px hsla(222, 8%, 43%, 0.1),
6
7
  0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
7
8
  color: var(--ifm-pre-color);
8
9
  line-height: var(--ifm-pre-line-height);
@@ -12,7 +13,8 @@
12
13
  transition: 300ms;
13
14
 
14
15
  &:hover {
15
- box-shadow: 0 0 0 2px rgba(38, 53, 61, 0.15),
16
+ box-shadow:
17
+ 0 0 0 2px rgba(38, 53, 61, 0.15),
16
18
  0 2px 3px hsla(222, 8%, 43%, 0.15),
17
19
  0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
18
20
  }
@@ -52,8 +52,8 @@ function Response({ item }: { item: NonNullable<ApiItem> }) {
52
52
  (parseInt(code) >= 400
53
53
  ? "openapi-response__dot--danger"
54
54
  : parseInt(code) >= 200 && parseInt(code) < 300
55
- ? "openapi-response__dot--success"
56
- : "openapi-response__dot--info");
55
+ ? "openapi-response__dot--success"
56
+ : "openapi-response__dot--info");
57
57
 
58
58
  if (!item.servers || hideSendButton) {
59
59
  return null;
@@ -51,7 +51,7 @@ function Server() {
51
51
  Object.keys(value.variables).forEach((variable) => {
52
52
  url = url.replace(
53
53
  `{${variable}}`,
54
- value.variables?.[variable].default ?? ""
54
+ value.variables?.[variable].default ?? "",
55
55
  );
56
56
  });
57
57
  }
@@ -76,9 +76,9 @@ function Server() {
76
76
  dispatch(
77
77
  setServer(
78
78
  JSON.stringify(
79
- options.filter((s: any) => s.url === e.target.value)[0]
80
- )
81
- )
79
+ options.filter((s: any) => s.url === e.target.value)[0],
80
+ ),
81
+ ),
82
82
  );
83
83
  }}
84
84
  value={value?.url}
@@ -97,8 +97,8 @@ function Server() {
97
97
  onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
98
98
  dispatch(
99
99
  setServerVariable(
100
- JSON.stringify({ key, value: e.target.value })
101
- )
100
+ JSON.stringify({ key, value: e.target.value }),
101
+ ),
102
102
  );
103
103
  }}
104
104
  value={value?.variables[key].default}
@@ -113,8 +113,8 @@ function Server() {
113
113
  onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
114
114
  dispatch(
115
115
  setServerVariable(
116
- JSON.stringify({ key, value: e.target.value })
117
- )
116
+ JSON.stringify({ key, value: e.target.value }),
117
+ ),
118
118
  );
119
119
  }}
120
120
  value={value?.variables?.[key].default}
@@ -22,7 +22,7 @@ export const slice = createSlice({
22
22
  reducers: {
23
23
  setServer: (state, action: PayloadAction<string>) => {
24
24
  state.value = state.options.find(
25
- (s) => s.url === JSON.parse(action.payload).url
25
+ (s) => s.url === JSON.parse(action.payload).url,
26
26
  );
27
27
  },
28
28
  setServerVariable: (state, action: PayloadAction<string>) => {
@@ -92,7 +92,7 @@ function setHeaders(
92
92
  accept: string,
93
93
  cookie: string,
94
94
  headerParams: Param[],
95
- other: { key: string; value: string }[]
95
+ other: { key: string; value: string }[],
96
96
  ) {
97
97
  postman.headers.clear();
98
98
  if (contentType) {
@@ -213,7 +213,7 @@ function buildPostmanRequest(
213
213
  body,
214
214
  server,
215
215
  auth,
216
- }: Options
216
+ }: Options,
217
217
  ) {
218
218
  const clonedPostman = cloneDeep(postman);
219
219
 
@@ -316,7 +316,7 @@ function buildPostmanRequest(
316
316
  accept,
317
317
  cookie,
318
318
  headerParams,
319
- otherHeaders
319
+ otherHeaders,
320
320
  );
321
321
 
322
322
  setBody(clonedPostman, body);
@@ -39,7 +39,7 @@ export function createPersistanceMiddleware(options: ThemeConfig["api"]) {
39
39
  if (state.auth.selected) {
40
40
  storage.setItem(
41
41
  hashArray(Object.keys(state.auth.options)),
42
- state.auth.selected
42
+ state.auth.selected,
43
43
  );
44
44
  }
45
45
  }
@@ -59,7 +59,7 @@ export default function ApiItem(props: Props): JSX.Element {
59
59
  if (api) {
60
60
  try {
61
61
  api = JSON.parse(
62
- zlib.inflateSync(Buffer.from(api as any, "base64")).toString()
62
+ zlib.inflateSync(Buffer.from(api as any, "base64")).toString(),
63
63
  );
64
64
  } catch {}
65
65
  }
@@ -105,7 +105,7 @@ export default function ApiItem(props: Props): JSX.Element {
105
105
  const paramType = param.in;
106
106
  const paramsArray: ParameterObject[] = params[paramType];
107
107
  paramsArray.push(param as ParameterObject);
108
- }
108
+ },
109
109
  );
110
110
  const auth = createAuth({
111
111
  security: api?.security,
@@ -137,7 +137,7 @@ export default function ApiItem(props: Props): JSX.Element {
137
137
  params,
138
138
  auth,
139
139
  },
140
- [persistanceMiddleware]
140
+ [persistanceMiddleware],
141
141
  );
142
142
  }
143
143
 
@@ -28,7 +28,7 @@ export type RootState = ReturnType<typeof rootReducer>;
28
28
 
29
29
  export const createStoreWithState = (
30
30
  preloadedState: RootState,
31
- middlewares: any[]
31
+ middlewares: any[],
32
32
  ) =>
33
33
  configureStore({
34
34
  reducer: rootReducer,
@@ -39,7 +39,7 @@ export const createStoreWithState = (
39
39
 
40
40
  export const createStoreWithoutState = (
41
41
  preloadedState: {},
42
- middlewares: any[]
42
+ middlewares: any[],
43
43
  ) =>
44
44
  configureStore({
45
45
  reducer: rootReducer,
@@ -114,7 +114,7 @@ function TabList({
114
114
  {
115
115
  "tabs--block": block,
116
116
  },
117
- className
117
+ className,
118
118
  )}
119
119
  >
120
120
  {tabValues.map(({ value, label, attributes }) => (
@@ -135,11 +135,11 @@ function TabList({
135
135
  parseInt(value) >= 400
136
136
  ? "danger"
137
137
  : parseInt(value) >= 200 && parseInt(value) < 300
138
- ? "success"
139
- : "info",
138
+ ? "success"
139
+ : "info",
140
140
  {
141
141
  active: selectedValue === value,
142
- }
142
+ },
143
143
  )}
144
144
  >
145
145
  {label ?? value}
@@ -161,7 +161,7 @@ function TabContent({ lazy, children, selectedValue }) {
161
161
  children = Array.isArray(children) ? children : [children];
162
162
  if (lazy) {
163
163
  const selectedTabItem = children.find(
164
- (tabItem) => tabItem.props.value === selectedValue
164
+ (tabItem) => tabItem.props.value === selectedValue,
165
165
  );
166
166
  if (!selectedTabItem) {
167
167
  // fail-safe or fail-fast? not sure what's best here
@@ -175,7 +175,7 @@ function TabContent({ lazy, children, selectedValue }) {
175
175
  cloneElement(tabItem, {
176
176
  key: i,
177
177
  hidden: tabItem.props.value !== selectedValue,
178
- })
178
+ }),
179
179
  )}
180
180
  </div>
181
181
  );
@@ -101,7 +101,7 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
101
101
  {
102
102
  "tabs--block": block,
103
103
  },
104
- className
104
+ className,
105
105
  )}
106
106
  >
107
107
  {tabValues.map(({ value, label, attributes }) => (
@@ -121,7 +121,7 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
121
121
  attributes?.className,
122
122
  {
123
123
  active: selectedValue === value,
124
- }
124
+ },
125
125
  )}
126
126
  >
127
127
  <span className="openapi-tabs__discriminator-tab-label">
@@ -146,7 +146,7 @@ function TabContent({ lazy, children, selectedValue }) {
146
146
  const flattenedChildren = flatten(children);
147
147
  if (lazy) {
148
148
  const selectedTabItem = flattenedChildren.find(
149
- (tabItem) => tabItem.props.value === selectedValue
149
+ (tabItem) => tabItem.props.value === selectedValue,
150
150
  );
151
151
  if (!selectedTabItem) {
152
152
  // fail-safe or fail-fast? not sure what's best here
@@ -160,7 +160,7 @@ function TabContent({ lazy, children, selectedValue }) {
160
160
  cloneElement(tabItem, {
161
161
  key: i,
162
162
  hidden: tabItem.props.value !== selectedValue,
163
- })
163
+ }),
164
164
  )}
165
165
  </div>
166
166
  );
@@ -138,7 +138,7 @@ function TabList({
138
138
  {
139
139
  "tabs--block": block,
140
140
  },
141
- className
141
+ className,
142
142
  )}
143
143
  >
144
144
  {tabValues.map(({ value, label, attributes }) => {
@@ -159,7 +159,7 @@ function TabList({
159
159
  attributes?.className,
160
160
  {
161
161
  active: selectedValue === value,
162
- }
162
+ },
163
163
  )}
164
164
  >
165
165
  {label ?? value}
@@ -182,7 +182,7 @@ function TabContent({ lazy, children, selectedValue }) {
182
182
  children = Array.isArray(children) ? children : [children];
183
183
  if (lazy) {
184
184
  const selectedTabItem = children.find(
185
- (tabItem) => tabItem.props.value === selectedValue
185
+ (tabItem) => tabItem.props.value === selectedValue,
186
186
  );
187
187
  if (!selectedTabItem) {
188
188
  // fail-safe or fail-fast? not sure what's best here
@@ -196,7 +196,7 @@ function TabContent({ lazy, children, selectedValue }) {
196
196
  cloneElement(tabItem, {
197
197
  key: i,
198
198
  hidden: tabItem.props.value !== selectedValue,
199
- })
199
+ }),
200
200
  )}
201
201
  </div>
202
202
  );
@@ -104,7 +104,7 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
104
104
  {
105
105
  "tabs--block": block,
106
106
  },
107
- className
107
+ className,
108
108
  )}
109
109
  >
110
110
  {tabValues.map(({ value, label, attributes }) => {
@@ -125,7 +125,7 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
125
125
  attributes?.className,
126
126
  {
127
127
  active: selectedValue === value,
128
- }
128
+ },
129
129
  )}
130
130
  >
131
131
  {label ?? value}
@@ -148,7 +148,7 @@ function TabContent({ lazy, children, selectedValue }) {
148
148
  children = Array.isArray(children) ? children : [children];
149
149
  if (lazy) {
150
150
  const selectedTabItem = children.find(
151
- (tabItem) => tabItem.props.value === selectedValue
151
+ (tabItem) => tabItem.props.value === selectedValue,
152
152
  );
153
153
  if (!selectedTabItem) {
154
154
  // fail-safe or fail-fast? not sure what's best here
@@ -162,7 +162,7 @@ function TabContent({ lazy, children, selectedValue }) {
162
162
  cloneElement(tabItem, {
163
163
  key: i,
164
164
  hidden: tabItem.props.value !== selectedValue,
165
- })
165
+ }),
166
166
  )}
167
167
  </div>
168
168
  );
@@ -79,13 +79,13 @@ function ParamsItem({
79
79
  schema && schema.items
80
80
  ? schema.items.default
81
81
  : schema
82
- ? schema.default
83
- : undefined,
82
+ ? schema.default
83
+ : undefined,
84
84
  (value) => (
85
85
  <div>
86
86
  <ReactMarkdown children={`**Default value:** \`${value}\``} />
87
87
  </div>
88
- )
88
+ ),
89
89
  );
90
90
 
91
91
  const renderExample = guard(toString(example), (example) => (
@@ -38,7 +38,7 @@ function SchemaItem({
38
38
 
39
39
  const renderRequired = guard(
40
40
  Array.isArray(required) ? required.includes(name) : required,
41
- () => <span className="openapi-schema__required">required</span>
41
+ () => <span className="openapi-schema__required">required</span>,
42
42
  );
43
43
 
44
44
  const renderDeprecated = guard(deprecated, () => (
@@ -102,7 +102,7 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
102
102
  {
103
103
  "tabs--block": block,
104
104
  },
105
- className
105
+ className,
106
106
  )}
107
107
  >
108
108
  {tabValues.map(({ value, label, attributes }) => (
@@ -122,7 +122,7 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
122
122
  attributes?.className,
123
123
  {
124
124
  active: selectedValue === value,
125
- }
125
+ },
126
126
  )}
127
127
  >
128
128
  <span className="openapi-tabs__schema-label">{label ?? value}</span>
@@ -145,7 +145,7 @@ function TabContent({ lazy, children, selectedValue }) {
145
145
 
146
146
  if (lazy) {
147
147
  const selectedTabItem = flattenedChildren.find(
148
- (tabItem) => tabItem.props.value === selectedValue
148
+ (tabItem) => tabItem.props.value === selectedValue,
149
149
  );
150
150
  if (!selectedTabItem) {
151
151
  // fail-safe or fail-fast? not sure what's best here
@@ -159,7 +159,7 @@ function TabContent({ lazy, children, selectedValue }) {
159
159
  cloneElement(tabItem, {
160
160
  key: i,
161
161
  hidden: tabItem.props.value !== selectedValue,
162
- })
162
+ }),
163
163
  )}
164
164
  </div>
165
165
  );
@@ -132,7 +132,7 @@ declare module "@theme/ApiExplorer/FloatingButton" {
132
132
  import { Props as FloatingButtonProps } from "@theme/ApiExplorer/FloatingButton";
133
133
 
134
134
  export default function FloatingButton(
135
- props: FloatingButtonProps
135
+ props: FloatingButtonProps,
136
136
  ): JSX.Element;
137
137
  }
138
138
 
@@ -158,7 +158,7 @@ declare module "@theme/ApiExplorer/FormFileUpload" {
158
158
  import { Props as FormFileUploadProps } from "@theme/ApiExplorer/FormFileUpload";
159
159
 
160
160
  export default function FormFileUpload(
161
- props: FormFileUploadProps
161
+ props: FormFileUploadProps,
162
162
  ): JSX.Element;
163
163
  }
164
164
 
@@ -166,7 +166,7 @@ declare module "@theme/ApiExplorer/FormMultiSelect" {
166
166
  import { Props as FormMultiSelectProps } from "@theme/ApiExplorer/FormMultiSelect";
167
167
 
168
168
  export default function FormMultiSelect(
169
- props: FormMultiSelectProps
169
+ props: FormMultiSelectProps,
170
170
  ): JSX.Element;
171
171
  }
172
172
 
@@ -184,7 +184,7 @@ declare module "@theme/ApiExplorer/MethodEndpoint" {
184
184
  import { Props as MethodEndpointProps } from "@theme/ApiExplorer/MethodEndpoint";
185
185
 
186
186
  export default function MethodEndpoint(
187
- props: MethodEndpointProps
187
+ props: MethodEndpointProps,
188
188
  ): JSX.Element;
189
189
  }
190
190
 
@@ -198,7 +198,7 @@ declare module "@theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectF
198
198
  import { ParamProps } from "@theme/ApiExplorer/ParamOptions";
199
199
 
200
200
  export default function ParamMultiSelectFormItem(
201
- props: ParamProps
201
+ props: ParamProps,
202
202
  ): JSX.Element;
203
203
  }
204
204