docusaurus-plugin-openapi-docs 1.4.5 → 1.4.6

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.
@@ -216,10 +216,13 @@ function createItems(schema) {
216
216
  if (mergedSchemas.oneOf !== undefined ||
217
217
  mergedSchemas.anyOf !== undefined) {
218
218
  return (0, utils_1.create)("div", {
219
- children: [
220
- createAnyOneOf(mergedSchemas),
221
- createProperties(mergedSchemas),
222
- ],
219
+ children: [createAnyOneOf(mergedSchemas)],
220
+ });
221
+ }
222
+ // Handles properties
223
+ if (mergedSchemas.properties !== undefined) {
224
+ return (0, utils_1.create)("div", {
225
+ children: [createProperties(mergedSchemas)],
223
226
  });
224
227
  }
225
228
  }
@@ -217,10 +217,13 @@ function createItems(schema) {
217
217
  if (mergedSchemas.oneOf !== undefined ||
218
218
  mergedSchemas.anyOf !== undefined) {
219
219
  return (0, utils_1.create)("div", {
220
- children: [
221
- createAnyOneOf(mergedSchemas),
222
- createProperties(mergedSchemas),
223
- ],
220
+ children: [createAnyOneOf(mergedSchemas)],
221
+ });
222
+ }
223
+ // Handles properties
224
+ if (mergedSchemas.properties !== undefined) {
225
+ return (0, utils_1.create)("div", {
226
+ children: [createProperties(mergedSchemas)],
224
227
  });
225
228
  }
226
229
  }
@@ -111,6 +111,9 @@ const sampleRequestFromSchema = (schema = {}) => {
111
111
  }
112
112
  }
113
113
  }
114
+ if (prop.readOnly && prop.readOnly === true) {
115
+ continue;
116
+ }
114
117
  if (prop.deprecated) {
115
118
  continue;
116
119
  }
@@ -111,6 +111,9 @@ const sampleResponseFromSchema = (schema = {}) => {
111
111
  }
112
112
  }
113
113
  }
114
+ if (prop.writeOnly && prop.writeOnly === true) {
115
+ continue;
116
+ }
114
117
  if (prop.deprecated) {
115
118
  continue;
116
119
  }
package/lib/types.d.ts CHANGED
@@ -72,6 +72,7 @@ export interface ApiItem extends OperationObject {
72
72
  [key: string]: SecuritySchemeObject;
73
73
  };
74
74
  postman?: Request;
75
+ proxy?: string;
75
76
  info: InfoObject;
76
77
  }
77
78
  export interface InfoPageMetadata extends ApiMetadataBase {
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": "1.4.5",
4
+ "version": "1.4.6",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=14"
70
70
  },
71
- "gitHead": "84ff5b3176d6734e9ec967131f45e044eca5d108"
71
+ "gitHead": "cb1f7125cd919da03346cdcb9eef49f4de8537e7"
72
72
  }
@@ -258,10 +258,14 @@ function createItems(schema: SchemaObject) {
258
258
  mergedSchemas.anyOf !== undefined
259
259
  ) {
260
260
  return create("div", {
261
- children: [
262
- createAnyOneOf(mergedSchemas),
263
- createProperties(mergedSchemas),
264
- ],
261
+ children: [createAnyOneOf(mergedSchemas)],
262
+ });
263
+ }
264
+
265
+ // Handles properties
266
+ if (mergedSchemas.properties !== undefined) {
267
+ return create("div", {
268
+ children: [createProperties(mergedSchemas)],
265
269
  });
266
270
  }
267
271
  }
@@ -263,10 +263,14 @@ function createItems(schema: SchemaObject) {
263
263
  mergedSchemas.anyOf !== undefined
264
264
  ) {
265
265
  return create("div", {
266
- children: [
267
- createAnyOneOf(mergedSchemas),
268
- createProperties(mergedSchemas),
269
- ],
266
+ children: [createAnyOneOf(mergedSchemas)],
267
+ });
268
+ }
269
+
270
+ // Handles properties
271
+ if (mergedSchemas.properties !== undefined) {
272
+ return create("div", {
273
+ children: [createProperties(mergedSchemas)],
270
274
  });
271
275
  }
272
276
  }
@@ -135,6 +135,10 @@ export const sampleRequestFromSchema = (schema: SchemaObject = {}): any => {
135
135
  }
136
136
  }
137
137
 
138
+ if (prop.readOnly && prop.readOnly === true) {
139
+ continue;
140
+ }
141
+
138
142
  if (prop.deprecated) {
139
143
  continue;
140
144
  }
@@ -135,6 +135,10 @@ export const sampleResponseFromSchema = (schema: SchemaObject = {}): any => {
135
135
  }
136
136
  }
137
137
 
138
+ if (prop.writeOnly && prop.writeOnly === true) {
139
+ continue;
140
+ }
141
+
138
142
  if (prop.deprecated) {
139
143
  continue;
140
144
  }
package/src/types.ts CHANGED
@@ -99,6 +99,7 @@ export interface ApiItem extends OperationObject {
99
99
  [key: string]: SecuritySchemeObject;
100
100
  };
101
101
  postman?: Request;
102
+ proxy?: string;
102
103
  info: InfoObject;
103
104
  }
104
105