go-sdk/jsonschema
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonathan Amsterdam 1e40ede369
jsonschema: options for inference (#185)
- Add ForOptions to hold options for schema inference.

- Replace ForLax with ForOptions.IgnoreBadTypes.

- Add an option to provide schemas for arbitrary types.

- Provide a default mapping from types to schemas that includes stdlib
types with MarshalJSON methods.

- Add Schema.CloneSchemas. This is needed to make copies of the schemas
in the above map: a schema cannot appear twice in a parent schema,
because schema addresses matter when resolving internal references.
2025-08-04 10:50:57 -04:00
..
meta-schemas/draft2020-12 jsonschema: resolve remote references 2025-05-13 11:46:13 -07:00
testdata testdata: explain omitted test files (#106) 2025-07-08 14:08:01 -04:00
annotations.go internal/mcp: move jsonschema out of mcp/internal 2025-05-05 13:17:44 -07:00
doc.go jsonschema: add missing colon to link block (#126) 2025-07-11 17:34:18 -04:00
infer.go jsonschema: options for inference (#185) 2025-08-04 10:50:57 -04:00
infer_test.go jsonschema: options for inference (#185) 2025-08-04 10:50:57 -04:00
json_pointer.go internal/mcp/internal/util: add Wrapf 2025-06-09 08:52:39 -07:00
json_pointer_test.go jsonschema: implement JSON Pointers for schemas 2025-05-07 09:31:46 -07:00
LICENSE jsonschema: improve doc (#122) 2025-07-11 11:27:33 -04:00
README.md jsonschema: improve doc (#122) 2025-07-11 11:27:33 -04:00
resolve.go jsonschema: make schema state independent of resolve arguments (#85) 2025-07-21 10:41:00 -04:00
resolve_test.go jsonschema: make schema state independent of resolve arguments (#85) 2025-07-21 10:41:00 -04:00
schema.go jsonschema: options for inference (#185) 2025-08-04 10:50:57 -04:00
schema_test.go jsonschema: options for inference (#185) 2025-08-04 10:50:57 -04:00
util.go jsonchema: support additional keywords 2025-07-01 07:02:26 -04:00
util_test.go jsonchema: support additional keywords 2025-07-01 07:02:26 -04:00
validate.go jsonschema: make schema state independent of resolve arguments (#85) 2025-07-21 10:41:00 -04:00
validate_test.go internal/mcp: unify json tag parsing 2025-06-04 11:03:21 -07:00

TODO: this file should live at the root of the jsonschema-go module, above the jsonschema package.

JSON Schema for GO

This module implements the JSON Schema specification. The jsonschema package supports creating schemas, validating JSON values against a schema, and inferring a schema from a Go struct. See the package documentation for usage.

Contributing

This module welcomes external contributions. It has no dependencies outside of the standard library, and can be built with the standard Go toolchain. Run go test ./... at the module root to run all the tests.

Issues

This project uses the GitHub issue tracker for bug reports, feature requests, and other issues.

Please report bugs. If the SDK is not working as you expected, it is likely due to a bug or inadequate documentation, and reporting an issue will help us address this shortcoming.

When reporting a bug, make sure to answer these five questions:

  1. What did you do?
  2. What did you see?
  3. What did you expect to see?
  4. What version of the Go MCP SDK are you using?
  5. What version of Go are you using (go version)?

License

This project is licensed under the MIT license. See the LICENSE file for details.