docusaurus-theme-openapi-docs 0.0.0-beta.672 → 0.0.0-beta.673

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.
@@ -66,15 +66,16 @@ function MethodEndpoint({ method, path }) {
66
66
  react_1.default.createElement(
67
67
  "span",
68
68
  { className: "badge badge--" + colorForMethod(method) },
69
- method.toUpperCase()
69
+ method === "event" ? "Webhook" : method.toUpperCase()
70
70
  ),
71
71
  " ",
72
- react_1.default.createElement(
73
- "h2",
74
- { className: "openapi__method-endpoint-path" },
75
- renderServerUrl(),
76
- `${path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}`
77
- )
72
+ method !== "event" &&
73
+ react_1.default.createElement(
74
+ "h2",
75
+ { className: "openapi__method-endpoint-path" },
76
+ renderServerUrl(),
77
+ `${path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}`
78
+ )
78
79
  ),
79
80
  react_1.default.createElement("div", { className: "openapi__divider" })
80
81
  );
@@ -235,6 +235,7 @@ function Request({ item }) {
235
235
  "div",
236
236
  { className: "openapi-explorer__details-outer-container" },
237
237
  showServerOptions &&
238
+ item.method !== "event" &&
238
239
  react_1.default.createElement(
239
240
  "details",
240
241
  {
@@ -351,6 +352,7 @@ function Request({ item }) {
351
352
  react_1.default.createElement(Accept_1.default, null)
352
353
  ),
353
354
  showRequestButton &&
355
+ item.method !== "event" &&
354
356
  react_1.default.createElement(
355
357
  "button",
356
358
  { className: "openapi-explorer__request-btn", type: "submit" },
@@ -25,10 +25,11 @@ function ApiExplorer({ item, infoPath }) {
25
25
  return react_1.default.createElement(
26
26
  react_1.default.Fragment,
27
27
  null,
28
- react_1.default.createElement(CodeSnippets_1.default, {
29
- postman: postman,
30
- codeSamples: item["x-code-samples"] ?? [],
31
- }),
28
+ item.method !== "event" &&
29
+ react_1.default.createElement(CodeSnippets_1.default, {
30
+ postman: postman,
31
+ codeSamples: item["x-code-samples"] ?? [],
32
+ }),
32
33
  react_1.default.createElement(Request_1.default, { item: item }),
33
34
  react_1.default.createElement(Response_1.default, { item: item })
34
35
  );
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-beta.672",
4
+ "version": "0.0.0-beta.673",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -43,7 +43,7 @@
43
43
  "clsx": "^1.1.1",
44
44
  "copy-text-to-clipboard": "^3.1.0",
45
45
  "crypto-js": "^4.1.1",
46
- "docusaurus-plugin-openapi-docs": "0.0.0-beta.672",
46
+ "docusaurus-plugin-openapi-docs": "0.0.0-beta.673",
47
47
  "docusaurus-plugin-sass": "^0.2.3",
48
48
  "file-saver": "^2.0.5",
49
49
  "lodash": "^4.17.20",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=14"
70
70
  },
71
- "gitHead": "7a6cdc1a2a7d2a01bd1ca473a4d1bbc7952ac808"
71
+ "gitHead": "601aa29ed5ee8e0402e3f11d6a3ca47954610992"
72
72
  }
@@ -70,12 +70,14 @@ function MethodEndpoint({ method, path }: Props) {
70
70
  <>
71
71
  <pre className="openapi__method-endpoint">
72
72
  <span className={"badge badge--" + colorForMethod(method)}>
73
- {method.toUpperCase()}
73
+ {method === "event" ? "Webhook" : method.toUpperCase()}
74
74
  </span>{" "}
75
- <h2 className="openapi__method-endpoint-path">
76
- {renderServerUrl()}
77
- {`${path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}`}
78
- </h2>
75
+ {method !== "event" && (
76
+ <h2 className="openapi__method-endpoint-path">
77
+ {renderServerUrl()}
78
+ {`${path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}`}
79
+ </h2>
80
+ )}
79
81
  </pre>
80
82
  <div className="openapi__divider" />
81
83
  </>
@@ -173,7 +173,7 @@ function Request({ item }: { item: NonNullable<ApiItem> }) {
173
173
  )}
174
174
  </div>
175
175
  <div className="openapi-explorer__details-outer-container">
176
- {showServerOptions && (
176
+ {showServerOptions && item.method !== "event" && (
177
177
  <details
178
178
  open={expandServer}
179
179
  className="openapi-explorer__details-container"
@@ -272,7 +272,7 @@ function Request({ item }: { item: NonNullable<ApiItem> }) {
272
272
  <Accept />
273
273
  </details>
274
274
  )}
275
- {showRequestButton && (
275
+ {showRequestButton && item.method !== "event" && (
276
276
  <button className="openapi-explorer__request-btn" type="submit">
277
277
  Send API Request
278
278
  </button>
@@ -24,10 +24,12 @@ function ApiExplorer({
24
24
 
25
25
  return (
26
26
  <>
27
- <CodeSnippets
28
- postman={postman}
29
- codeSamples={(item as any)["x-code-samples"] ?? []}
30
- />
27
+ {item.method !== "event" && (
28
+ <CodeSnippets
29
+ postman={postman}
30
+ codeSamples={(item as any)["x-code-samples"] ?? []}
31
+ />
32
+ )}
31
33
  <Request item={item} />
32
34
  <Response item={item} />
33
35
  </>