mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
move schema to an internal package
This commit is contained in:
26
internal/schema/api.go
Normal file
26
internal/schema/api.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/google/jsonschema-go/jsonschema"
|
||||
)
|
||||
|
||||
var ApiConfigSchema = jsonschema.Schema{
|
||||
Type: "object",
|
||||
Properties: map[string]*jsonschema.Schema{
|
||||
"enabled": {
|
||||
Type: "boolean",
|
||||
Description: "Whether the API server is enabled",
|
||||
Default: json.RawMessage(`false`),
|
||||
},
|
||||
"port": {
|
||||
Type: "integer",
|
||||
Description: "Port for the API server to listen on",
|
||||
Minimum: jsonschema.Ptr[float64](1024),
|
||||
Maximum: jsonschema.Ptr[float64](65535),
|
||||
Default: json.RawMessage(`8080`),
|
||||
},
|
||||
},
|
||||
Required: []string{"port"},
|
||||
}
|
||||
Reference in New Issue
Block a user