nginx-proxy-manager/backend/internal/api/schema/create_nginx_template.go

31 lines
514 B
Go
Raw Normal View History

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
}
}
}
`
}