docusaurus-plugin-openapi-docs 0.0.0-1096 → 0.0.0-1097

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.
@@ -10,6 +10,11 @@ exports.getSchemaName = getSchemaName;
10
10
  exports.getQualifierMessage = getQualifierMessage;
11
11
  function prettyName(schema, circular) {
12
12
  var _a, _b, _c, _d, _e;
13
+ // Handle enum-only schemas (valid in JSON Schema)
14
+ // When enum is present without explicit type, treat as string
15
+ if (schema.enum && !schema.type) {
16
+ return "string";
17
+ }
13
18
  if (schema.format) {
14
19
  if (schema.type) {
15
20
  return `${schema.type}<${schema.format}>`;
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-1096",
4
+ "version": "0.0.0-1097",
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": "0582169799b8f32b85ee3bca3cc43250e68976a2"
68
+ "gitHead": "3746c00807a095e5501d59d57945498812aab1ba"
69
69
  }
@@ -8,6 +8,12 @@
8
8
  import { SchemaObject } from "../openapi/types";
9
9
 
10
10
  function prettyName(schema: SchemaObject, circular?: boolean) {
11
+ // Handle enum-only schemas (valid in JSON Schema)
12
+ // When enum is present without explicit type, treat as string
13
+ if (schema.enum && !schema.type) {
14
+ return "string";
15
+ }
16
+
11
17
  if (schema.format) {
12
18
  if (schema.type) {
13
19
  return `${schema.type}<${schema.format}>`;