Document implementing JsonSchema manually

This commit is contained in:
Graham Esau 2019-12-26 16:43:58 +00:00
parent 64b0f79851
commit 583edc08ca
2 changed files with 40 additions and 2 deletions

View file

@ -222,7 +222,7 @@ pub trait JsonSchema {
/// Whether JSON Schemas generated for this type should be re-used where possible using the `$ref` keyword.
///
/// For trivial types (such as primitives), this should return `false`. For more complex types, it should return `true`.
/// For recursive types, this *must* return `true` to prevent infinite cycles when generating schemas.
/// For recursive types, this **must** return `true` to prevent infinite cycles when generating schemas.
///
/// By default, this returns `true`.
fn is_referenceable() -> bool {