From 0f7909057fa6aaacfe7e1b3f380ad1b0289b5d2b Mon Sep 17 00:00:00 2001 From: Sam Lown Date: Wed, 6 Sep 2023 20:21:04 +0000 Subject: [PATCH] Updating readme example --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8a2c0d1..42ac355 100644 --- a/README.md +++ b/README.md @@ -304,6 +304,8 @@ Sometimes it can be useful to have custom JSON Marshal and Unmarshal methods in To override auto-generating an object type for your type, implement the `JSONSchema() *Schema` method and whatever is defined will be provided in the schema definitions. +You also have the option of defining a `JSONSchemaExtend(schema *jsonschema.Schema)` method for your types that will be called _after_ the schema has been generated, allowing you to add or manipulate the fields easily. + Take the following simplified example of a `CompactDate` that only includes the Year and Month: ```go