Skip to content

Commit

Permalink
Update documentation and add example
Browse files Browse the repository at this point in the history
  • Loading branch information
juhaku committed Aug 7, 2024
1 parent d341340 commit b89461d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions utoipa-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,20 @@ use self::{
/// _`rename`_ attribute. It behaves similarly to serde's _`rename`_ attribute. If both _serde_
/// _`rename`_ and _schema_ _`rename`_ are defined __serde__ will take precedence.
///
/// ## Enum Unnamed Variant Field Configuration Options
///
/// * `inline` If the type of this field implements [`ToSchema`][to_schema], then the schema definition
/// will be inlined. **warning:** Don't use this for recursive data types!
///
/// _**Inline unnamed field variant schemas.**_
/// ```rust
/// #[derive(ToSchema)]
/// enum Card {
/// Number(#[schema(inline)] Number),
/// Color(#[schema(inline)] Color),
/// }
/// ```
///
/// # Unnamed Field Struct Optional Configuration Options for `#[schema(...)]`
/// * `description = ...` Can be literal string or Rust expression e.g. _`const`_ reference or
/// `include_str!(...)` statement. This can be used to override **default** description what is
Expand Down

0 comments on commit b89461d

Please sign in to comment.