docusaurus-plugin-openapi-docs 0.0.0-1003 → 0.0.0-1005

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.
@@ -13,7 +13,7 @@ function createAuthentication(securitySchemes) {
13
13
  if (!securitySchemes || !Object.keys(securitySchemes).length)
14
14
  return "";
15
15
  const createAuthenticationTable = (securityScheme) => {
16
- const { bearerFormat, flows, name, scheme, type, openIdConnectUrl } = securityScheme;
16
+ const { bearerFormat, flows, name, scheme, type, openIdConnectUrl, in: paramIn, } = securityScheme;
17
17
  const createSecuritySchemeTypeRow = () => (0, utils_1.create)("tr", {
18
18
  children: [
19
19
  (0, utils_1.create)("th", { children: "Security Scheme Type:" }),
@@ -54,7 +54,9 @@ function createAuthentication(securitySchemes) {
54
54
  createSecuritySchemeTypeRow(),
55
55
  (0, utils_1.create)("tr", {
56
56
  children: [
57
- (0, utils_1.create)("th", { children: "Header parameter name:" }),
57
+ (0, utils_1.create)("th", {
58
+ children: `${paramIn.charAt(0).toUpperCase() + paramIn.slice(1)} parameter name:`,
59
+ }),
58
60
  (0, utils_1.create)("td", { children: name }),
59
61
  ],
60
62
  }),
@@ -11,6 +11,9 @@ exports.getQualifierMessage = getQualifierMessage;
11
11
  function prettyName(schema, circular) {
12
12
  var _a, _b, _c, _d, _e;
13
13
  if (schema.format) {
14
+ if (schema.type) {
15
+ return `${schema.type}<${schema.format}>`;
16
+ }
14
17
  return schema.format;
15
18
  }
16
19
  if (schema.allOf) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-openapi-docs",
3
3
  "description": "OpenAPI plugin for Docusaurus.",
4
- "version": "0.0.0-1003",
4
+ "version": "0.0.0-1005",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -65,5 +65,5 @@
65
65
  "engines": {
66
66
  "node": ">=14"
67
67
  },
68
- "gitHead": "a88297191793fbd5400b0b4291e794853cf07222"
68
+ "gitHead": "4263fa2f5bae006b1d7328a0f16af378786fed47"
69
69
  }
@@ -13,8 +13,15 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) {
13
13
  if (!securitySchemes || !Object.keys(securitySchemes).length) return "";
14
14
 
15
15
  const createAuthenticationTable = (securityScheme: any) => {
16
- const { bearerFormat, flows, name, scheme, type, openIdConnectUrl } =
17
- securityScheme;
16
+ const {
17
+ bearerFormat,
18
+ flows,
19
+ name,
20
+ scheme,
21
+ type,
22
+ openIdConnectUrl,
23
+ in: paramIn,
24
+ } = securityScheme;
18
25
 
19
26
  const createSecuritySchemeTypeRow = () =>
20
27
  create("tr", {
@@ -70,7 +77,9 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) {
70
77
  createSecuritySchemeTypeRow(),
71
78
  create("tr", {
72
79
  children: [
73
- create("th", { children: "Header parameter name:" }),
80
+ create("th", {
81
+ children: `${paramIn.charAt(0).toUpperCase() + paramIn.slice(1)} parameter name:`,
82
+ }),
74
83
  create("td", { children: name }),
75
84
  ],
76
85
  }),
@@ -142,7 +151,6 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) {
142
151
  return "";
143
152
  }
144
153
  };
145
-
146
154
  const formatTabLabel = (key: string, type: string, scheme: string) => {
147
155
  const formattedLabel = key
148
156
  .replace(/(_|-)/g, " ")
@@ -9,6 +9,9 @@ import { SchemaObject } from "../openapi/types";
9
9
 
10
10
  function prettyName(schema: SchemaObject, circular?: boolean) {
11
11
  if (schema.format) {
12
+ if (schema.type) {
13
+ return `${schema.type}<${schema.format}>`;
14
+ }
12
15
  return schema.format;
13
16
  }
14
17