Fix (most) rustdoc warnings
This commit is contained in:
parent
34914a6c50
commit
9921d2859f
5 changed files with 10 additions and 6 deletions
4
docs-rs-custom.css
Normal file
4
docs-rs-custom.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
/* Hide the `[!NOTE] This branch...` alert at the top of the README, as it's only applicable to users on GitHub */
|
||||
h2#schemars + blockquote {
|
||||
display: none;
|
||||
}
|
|
@ -104,3 +104,4 @@ required-features = ["rust_decimal1", "bigdecimal04"]
|
|||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--extend-css", "docs-rs-custom.css "]
|
||||
|
|
|
@ -351,7 +351,7 @@ impl SchemaGenerator {
|
|||
|
||||
/// Generates a JSON Schema for the given example value.
|
||||
///
|
||||
/// If the value implements [`JsonSchema`](crate::JsonSchema), then prefer using the [`root_schema_for()`](Self::root_schema_for())
|
||||
/// If the value implements [`JsonSchema`], then prefer using the [`root_schema_for()`](Self::root_schema_for())
|
||||
/// function which will generally produce a more precise schema, particularly when the value contains any enums.
|
||||
///
|
||||
/// If the `Serialize` implementation of the value decides to fail, this will return an [`Err`].
|
||||
|
@ -382,7 +382,7 @@ impl SchemaGenerator {
|
|||
|
||||
/// Consumes `self` and generates a JSON Schema for the given example value.
|
||||
///
|
||||
/// If the value implements [`JsonSchema`](crate::JsonSchema), then prefer using the [`into_root_schema_for()!`](Self::into_root_schema_for())
|
||||
/// If the value implements [`JsonSchema`], then prefer using the [`into_root_schema_for()!`](Self::into_root_schema_for())
|
||||
/// function which will generally produce a more precise schema, particularly when the value contains any enums.
|
||||
///
|
||||
/// If the `Serialize` implementation of the value decides to fail, this will return an [`Err`].
|
||||
|
|
|
@ -11,9 +11,7 @@ mod macros;
|
|||
/// outside of `schemars`, and should not be considered part of the public API.
|
||||
#[doc(hidden)]
|
||||
pub mod _private;
|
||||
/// Types for generating JSON schemas.
|
||||
pub mod gen;
|
||||
/// Types for defining modifications to JSON schemas.
|
||||
pub mod transform;
|
||||
|
||||
#[cfg(feature = "schemars_derive")]
|
||||
|
@ -141,7 +139,7 @@ pub trait JsonSchema {
|
|||
/// Generates a JSON Schema for this type.
|
||||
///
|
||||
/// If the returned schema depends on any [non-inlined](JsonSchema::always_inline_schema) schemas, then this method will
|
||||
/// add them to the [`SchemaGenerator`](SchemaGenerator)'s schema definitions.
|
||||
/// add them to the [`SchemaGenerator`]'s schema definitions.
|
||||
///
|
||||
/// This should not return a `$ref` schema.
|
||||
fn json_schema(gen: &mut SchemaGenerator) -> Schema;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/// Generates a [`RootSchema`](crate::schema::RootSchema) for the given type using default settings.
|
||||
/// Generates a [`Schema`](crate::Schema) for the given type using default settings.
|
||||
/// The default settings currently conform to [JSON Schema 2020-12](https://json-schema.org/specification-links#2020-12), but this is liable to change in a future version of Schemars if support for other JSON Schema versions is added.
|
||||
///
|
||||
/// The type must implement [`JsonSchema`](crate::JsonSchema).
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue