diff options
author | Puyodead1 <puyodead@proton.me> | 2023-03-24 18:28:32 -0400 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-04-13 15:20:17 -0400 |
commit | 0d2a2c7258524dedf15f4e799d3b6713d5a3add6 (patch) | |
tree | d1e0824e06dba3c0a16ac34a34c19e7245a2a88b /scripts/openapi.js | |
parent | fixing lots of openapi crap (diff) | |
download | server-0d2a2c7258524dedf15f4e799d3b6713d5a3add6.tar.xz |
default responses
Diffstat (limited to 'scripts/openapi.js')
-rw-r--r-- | scripts/openapi.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/openapi.js b/scripts/openapi.js index 35654eea..ff648a70 100644 --- a/scripts/openapi.js +++ b/scripts/openapi.js @@ -164,7 +164,6 @@ function apiRoutes() { let schema = { $ref: `#/components/schemas/${v.body}`, }; - // if (!v.body) schema = schema.allOf[0]; obj.responses = { [k]: { @@ -183,8 +182,13 @@ function apiRoutes() { }), }, }.merge(obj.responses); - delete obj.responses.default; } + } else { + obj.responses = { + default: { + description: "No description available", + }, + }; } // handles path parameters |