diff --git a/README.md b/README.md index d2b97ff..be80bb4 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ println!("{}", serde_json::to_string_pretty(&schema).unwrap()); `#[serde(...)]` attributes can be overriden using `#[schemars(...)]` attributes, which behave identically (e.g. `#[schemars(rename_all = "camelCase")]`). You may find this useful if you want to change the generated schema without affecting Serde's behaviour, or if you're just not using Serde. -### Schema from Example Values +### Schema from Example Value If you want a schema for a type that can't/doesn't implement `JsonSchema`, but does implement `serde::Serialize`, then you can generate a JSON schema from a value of that type. However, this schema will generally be less precise than if the type implemented `JsonSchema` - particularly when it involves enums, since schemars will not make any assumptions about the structure of an enum based on a single variant. diff --git a/docs/3-generating.md b/docs/3-generating.md index cc65004..e9cf09e 100644 --- a/docs/3-generating.md +++ b/docs/3-generating.md @@ -21,7 +21,7 @@ If you want more control over how the schema is generated, you can use the [`gen See the API documentation for more info on how to use those types for custom schema generation.