mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-02-22 07:18:15 -05:00

- Renamed host templates to nginx templates - Generate upstream templates - Better nginx error reporting when reloading - Use tparse for golang test reporting
31 lines
514 B
Go
31 lines
514 B
Go
package schema
|
|
|
|
// CreateNginxTemplate is the schema for incoming data validation
|
|
func CreateNginxTemplate() string {
|
|
return `
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"name",
|
|
"type",
|
|
"template"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"pattern": "^proxy|redirect|dead|stream|upstream$"
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"minLength": 20
|
|
}
|
|
}
|
|
}
|
|
`
|
|
}
|