Access lists basics
This commit is contained in:
21
backend/internal/api/schema/create_access_list.go
Normal file
21
backend/internal/api/schema/create_access_list.go
Normal file
@ -0,0 +1,21 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CreateAccessList is the schema for incoming data validation
|
||||
func CreateAccessList() string {
|
||||
return fmt.Sprintf(`
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": %s
|
||||
}
|
||||
}
|
||||
`, stringMinMax(2, 100))
|
||||
}
|
17
backend/internal/api/schema/update_access_list.go
Normal file
17
backend/internal/api/schema/update_access_list.go
Normal file
@ -0,0 +1,17 @@
|
||||
package schema
|
||||
|
||||
import "fmt"
|
||||
|
||||
// UpdateAccessList is the schema for incoming data validation
|
||||
func UpdateAccessList() string {
|
||||
return fmt.Sprintf(`
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"minProperties": 1,
|
||||
"properties": {
|
||||
"name": %s
|
||||
}
|
||||
}
|
||||
`, stringMinMax(2, 100))
|
||||
}
|
Reference in New Issue
Block a user