Browse Source

v1.1.2: swagger requestBody required

CrazyDoctor 1 month ago
parent
commit
52b10abb24

+ 1 - 0
dist/base/swagger/SwaggerDoc.js

@@ -62,6 +62,7 @@ class SwaggerDoc {
         }
         }
         if (this.requestBody) {
         if (this.requestBody) {
             annotation += ' *\t\t\trequestBody:\n';
             annotation += ' *\t\t\trequestBody:\n';
+            annotation += ` *\t\t\t\trequired: ${this.requestBody.required}`;
             annotation += ` *\t\t\t\tdescription: ${this.requestBody.description}\n`;
             annotation += ` *\t\t\t\tdescription: ${this.requestBody.description}\n`;
             annotation += ' *\t\t\t\tcontent:\n';
             annotation += ' *\t\t\t\tcontent:\n';
             annotation += ` *\t\t\t\t\t${this.requestBody.content.mediaType}:\n`;
             annotation += ` *\t\t\t\t\t${this.requestBody.content.mediaType}:\n`;

File diff suppressed because it is too large
+ 0 - 0
dist/base/swagger/SwaggerDoc.js.map


+ 1 - 0
dist/base/swagger/SwaggerRequestBodyType.d.ts

@@ -1,5 +1,6 @@
 import { SwaggerRequestBodyContent } from './SwaggerRequestBodyContentType';
 import { SwaggerRequestBodyContent } from './SwaggerRequestBodyContentType';
 type SwaggerRequestBody = {
 type SwaggerRequestBody = {
+    required: boolean;
     description: string;
     description: string;
     content: SwaggerRequestBodyContent;
     content: SwaggerRequestBodyContent;
 };
 };

+ 1 - 0
lib/base/swagger/SwaggerDoc.ts

@@ -83,6 +83,7 @@ class SwaggerDoc {
 
 
 		if(this.requestBody) {
 		if(this.requestBody) {
 			annotation	+=	' *\t\t\trequestBody:\n';
 			annotation	+=	' *\t\t\trequestBody:\n';
+			annotation	+=	` *\t\t\t\trequired: ${this.requestBody.required}`;
 			annotation	+=	` *\t\t\t\tdescription: ${this.requestBody.description}\n`;
 			annotation	+=	` *\t\t\t\tdescription: ${this.requestBody.description}\n`;
 			annotation	+=	' *\t\t\t\tcontent:\n';
 			annotation	+=	' *\t\t\t\tcontent:\n';
 			annotation	+=	` *\t\t\t\t\t${this.requestBody.content.mediaType}:\n`;
 			annotation	+=	` *\t\t\t\t\t${this.requestBody.content.mediaType}:\n`;

+ 1 - 0
lib/base/swagger/SwaggerRequestBodyType.ts

@@ -1,6 +1,7 @@
 import { SwaggerRequestBodyContent } from './SwaggerRequestBodyContentType';
 import { SwaggerRequestBodyContent } from './SwaggerRequestBodyContentType';
 
 
 type SwaggerRequestBody = {
 type SwaggerRequestBody = {
+    required: boolean,
     description: string,
     description: string,
     content: SwaggerRequestBodyContent
     content: SwaggerRequestBodyContent
 };
 };

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "org.crazydoctor.expressts",
   "name": "org.crazydoctor.expressts",
-  "version": "1.1.1",
+  "version": "1.1.2",
   "devDependencies": {
   "devDependencies": {
     "@types/express-session": "^1.17.7",
     "@types/express-session": "^1.17.7",
     "@types/node": "^20.4.9",
     "@types/node": "^20.4.9",

Some files were not shown because too many files changed in this diff