2022-05-11 22:47:31 +00:00
|
|
|
package schema
|
|
|
|
|
2023-01-04 05:36:56 +00:00
|
|
|
// CreateNginxTemplate is the schema for incoming data validation
|
|
|
|
func CreateNginxTemplate() string {
|
2022-05-11 22:47:31 +00:00
|
|
|
return `
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": false,
|
|
|
|
"required": [
|
|
|
|
"name",
|
2023-01-04 05:36:56 +00:00
|
|
|
"type",
|
2022-05-11 22:47:31 +00:00
|
|
|
"template"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string",
|
|
|
|
"minLength": 1
|
|
|
|
},
|
2023-01-04 05:36:56 +00:00
|
|
|
"type": {
|
2022-05-11 22:47:31 +00:00
|
|
|
"type": "string",
|
2023-01-04 05:36:56 +00:00
|
|
|
"pattern": "^proxy|redirect|dead|stream|upstream$"
|
2022-05-11 22:47:31 +00:00
|
|
|
},
|
|
|
|
"template": {
|
|
|
|
"type": "string",
|
|
|
|
"minLength": 20
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
}
|