go-sdk/jsonschema
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonathan Amsterdam b0d437f1c5 internal/mcp/jsonschema: check for structure separately
Redo iteration. It was too subtle.

Write a separate recursive check for whether the schemas form a tree and
have any invalid nils.

While doing that, assign paths to schemas for better error messages,
even as we check structure. This also lets us detect re-occurring
schemas without a separate map.

Everything else, including the iterators, can now assume valid structure
and populated paths.

Change-Id: I90ec93d79d1d95c92258ad7afc94ef068fdf123f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/676376
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Jonathan Amsterdam <jba@google.com>
2025-05-28 07:47:15 -07:00
..
meta-schemas/draft2020-12 jsonschema: resolve remote references 2025-05-13 11:46:13 -07:00
testdata jsonschema: add more schema fields 2025-05-21 17:03:52 -07:00
annotations.go internal/mcp: move jsonschema out of mcp/internal 2025-05-05 13:17:44 -07:00
doc.go jsonschema: package doc 2025-05-21 19:27:34 -07:00
infer.go internal/mcp/jsonschema: support validating structs 2025-05-06 15:48:51 -07:00
infer_test.go internal/mcp: move jsonschema out of mcp/internal 2025-05-05 13:17:44 -07:00
json_pointer.go internal/mcp/jsonschema: generalize error wrapping 2025-05-27 14:23:27 -07:00
json_pointer_test.go jsonschema: implement JSON Pointers for schemas 2025-05-07 09:31:46 -07:00
resolve.go internal/mcp/jsonschema: check for structure separately 2025-05-28 07:47:15 -07:00
resolve_test.go internal/mcp/jsonschema: check for structure separately 2025-05-28 07:47:15 -07:00
schema.go internal/mcp/jsonschema: check for structure separately 2025-05-28 07:47:15 -07:00
schema_test.go internal/mcp/jsonschema: check for structure separately 2025-05-28 07:47:15 -07:00
util.go internal/mcp/jsonschema: generalize error wrapping 2025-05-27 14:23:27 -07:00
util_test.go internal/mcp: move jsonschema out of mcp/internal 2025-05-05 13:17:44 -07:00
validate.go internal/mcp/jsonschema: check for structure separately 2025-05-28 07:47:15 -07:00
validate_test.go internal/mcp/jsonschema: clearer validations errors 2025-05-27 13:58:26 -07:00