瀏覽代碼

Merge pull request #4346 from Sander0542/feature/security-schemes-component

API Schema Improvements
jc21 10 月之前
父節點
當前提交
79d28f03d0

+ 4 - 0
backend/models/dead_host.js

@@ -12,7 +12,11 @@ Model.knex(db);
 
 const boolFields = [
 	'is_deleted',
+	'ssl_forced',
+	'http2_support',
 	'enabled',
+	'hsts_enabled',
+	'hsts_subdomains',
 ];
 
 class DeadHost extends Model {

+ 1 - 1
backend/models/stream.js

@@ -8,8 +8,8 @@ const now         = require('./now_helper');
 Model.knex(db);
 
 const boolFields = [
-	'enabled',
 	'is_deleted',
+	'enabled',
 	'tcp_forwarding',
 	'udp_forwarding',
 ];

+ 1 - 2
backend/schema/components/proxy-host-object.json

@@ -22,8 +22,7 @@
 		"enabled",
 		"locations",
 		"hsts_enabled",
-		"hsts_subdomains",
-		"certificate"
+		"hsts_subdomains"
 	],
 	"additionalProperties": false,
 	"properties": {

+ 9 - 0
backend/schema/swagger.json

@@ -9,6 +9,15 @@
 			"url": "http://127.0.0.1:81/api"
 		}
 	],
+	"components": {
+		"securitySchemes": {
+			"bearerAuth": {
+				"type": "http",
+				"scheme": "bearer",
+				"bearerFormat": "JWT"
+			}
+		}
+	},
 	"paths": {
 		"/": {
 			"get": {