move schema to an internal package

This commit is contained in:
Joel Wetzell
2026-03-23 12:51:26 -05:00
parent 256eeac6a8
commit 9a50ca8cfe
12 changed files with 223 additions and 159 deletions

View File

@@ -1,28 +1,6 @@
package config
import (
"encoding/json"
"github.com/google/jsonschema-go/jsonschema"
)
type ApiConfig struct {
Enabled bool `json:"enabled"`
Port int `json:"port"`
}
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",
},
},
Required: []string{"port"},
}