mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-11-15 18:38:04 +00:00
Dabase setup widget
This commit is contained in:
1 parent
853ef909a7
commit
741c9c982f
25 files changed
+1133
-66
No files matched your search
@@ -138,6 +138,11 @@
|
||||
"$ref": "file://./paths/schema/get.json"
|
||||
}
|
||||
},
|
||||
"/setup/database": {
|
||||
"post": {
|
||||
"$ref": "file://./paths/setup/database/post.json"
|
||||
}
|
||||
},
|
||||
"/settings": {
|
||||
"get": {
|
||||
"$ref": "file://./paths/settings/get.json"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"type": "object",
|
||||
"description": "HealthObject",
|
||||
"additionalProperties": false,
|
||||
"required": ["version", "commit", "healthy", "setup"],
|
||||
"required": ["version", "commit", "healthy", "db_setup", "setup"],
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
@@ -18,6 +18,10 @@
|
||||
"type": "boolean",
|
||||
"description": "Healthy?"
|
||||
},
|
||||
"db_setup": {
|
||||
"type": "boolean",
|
||||
"description": "Is the database configured?"
|
||||
},
|
||||
"setup": {
|
||||
"type": "boolean",
|
||||
"description": "Is the application set up?"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"version": "3.0.0",
|
||||
"commit": "9f119b6",
|
||||
"healthy": true,
|
||||
"db_setup": true,
|
||||
"setup": true
|
||||
}
|
||||
}
|
||||
@@ -32,6 +33,7 @@
|
||||
"version": "3.0.0",
|
||||
"commit": "9f119b6",
|
||||
"healthy": false,
|
||||
"db_setup": true,
|
||||
"setup": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"operationId": "setupDatabase",
|
||||
"summary": "Configure the database connection. Only available before a database has been configured",
|
||||
"tags": ["Setup"],
|
||||
"requestBody": {
|
||||
"description": "Database Connection Payload",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": "{{schema.SetupDatabase}}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "400 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "object",
|
||||
"nullable": true
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/components/schemas/ErrorObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": null,
|
||||
"error": {
|
||||
"code": 400,
|
||||
"message": "failed to connect to `user=npm database=npm`: dial tcp 172.18.0.2:5432: connect: connection refused"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "403 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "object",
|
||||
"nullable": true
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/components/schemas/ErrorObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": null,
|
||||
"error": {
|
||||
"code": 403,
|
||||
"message": "Database is already configured"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user