mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-10-08 14:26:28 +00:00
feat(resolvemcp)!: make the server read-only by default
Tests / Integration Tests (push) Skipped
Build , Vet Test, and Lint / Build (push) Successful in 1m33s
Tests / Unit Tests (push) Successful in 2m1s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 2m36s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 2m38s
Build , Vet Test, and Lint / Lint Code (push) Successful in 2m49s
Tests / Race Detector (push) Successful in 4m31s
Tests / Integration Tests (push) Skipped
Build , Vet Test, and Lint / Build (push) Successful in 1m33s
Tests / Unit Tests (push) Successful in 2m1s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 2m36s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 2m38s
Build , Vet Test, and Lint / Lint Code (push) Successful in 2m49s
Tests / Race Detector (push) Successful in 4m31s
BREAKING CHANGE: Config.ReadOnly is now a *bool and unset means read-only. Use ReadOnly: resolvemcp.Bool(false) to enable insert/update/delete, annotations and function calls. Adds the Bool helper and updates docs.
This commit is contained in:
@@ -145,8 +145,8 @@ func (h *Handler) BuildCatalog() Catalog {
|
||||
GeneratedAt: time.Now().UTC(),
|
||||
Server: h.name,
|
||||
Version: h.version,
|
||||
ReadOnly: h.config.ReadOnly,
|
||||
Guide: guideFor(h.config.ReadOnly, h.config.AllowFunctionCalls),
|
||||
ReadOnly: h.config.readOnly,
|
||||
Guide: guideFor(h.config.readOnly, h.config.AllowFunctionCalls),
|
||||
Limits: CatalogLimits{
|
||||
DefaultLimit: h.config.DefaultLimit,
|
||||
MaxLimit: h.config.MaxLimit,
|
||||
@@ -179,7 +179,7 @@ func (h *Handler) BuildCatalog() Catalog {
|
||||
for mt != nil && (mt.Kind() == reflect.Pointer || mt.Kind() == reflect.Slice) {
|
||||
mt = mt.Elem()
|
||||
}
|
||||
if !h.config.ReadOnly && mt != nil && mt.Kind() == reflect.Struct {
|
||||
if !h.config.readOnly && mt != nil && mt.Kind() == reflect.Struct {
|
||||
for k := range reflectionJSONColumns(mt) {
|
||||
writable[k] = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user