Skip to content

Commit

Permalink
fix typo in documentation (#1143)
Browse files Browse the repository at this point in the history
* fix typo in documentation

* also fix diagnostic message
  • Loading branch information
jrudolph authored Oct 16, 2024
1 parent 741196b commit 7073395
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utoipa-gen/src/component/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl ToTokensDiagnostics for Feature {
// inline feature is ignored by `ToTokens`
TokenStream::new()
}
Feature::NoRecursion(_) => return Err(Diagnostics::new("NoRecurse does not support `ToTokens`")),
Feature::NoRecursion(_) => return Err(Diagnostics::new("NoRecursion does not support `ToTokens`")),
Feature::IntoParamsNames(_) => {
return Err(Diagnostics::new("Names feature does not support `ToTokens`")
.help("Names is only used with IntoParams to artificially give names for unnamed struct type `IntoParams`."))
Expand Down
4 changes: 2 additions & 2 deletions utoipa-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static CONFIG: once_cell::sync::Lazy<utoipa_config::Config> =
/// syntax][derive@ToSchema#schemadiscriminator-syntax].
///
/// ### `#[schema(discriminator)]` syntax
///
///
/// Discriminator can **only** be used with enums having **`#[serde(untagged)]`** attribute and
/// each variant must have only one unnamed field schema reference to type implementing
/// _`ToSchema`_.
Expand Down Expand Up @@ -898,7 +898,7 @@ static CONFIG: once_cell::sync::Lazy<utoipa_config::Config> =
/// _**Use `no_recursion` attribute to break from looping schema tree e.g. `Pet` -> `Owner` ->
/// `Pet`.**_
///
/// `no_recurse` attribute can be provided on named field of a struct, on unnamed struct or unnamed
/// `no_recursion` attribute can be provided on named field of a struct, on unnamed struct or unnamed
/// enum variant. It must be provided in case of looping schema tree in order to stop recursion.
/// Failing to do so will cause runtime **panic**.
/// ```rust
Expand Down

0 comments on commit 7073395

Please sign in to comment.