Skip to content

Commit

Permalink
Update utoipa-config docs
Browse files Browse the repository at this point in the history
Add warning about build config to utoipa-config
  • Loading branch information
juhaku committed Oct 17, 2024
1 parent c060a0c commit 155657f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utoipa-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ This crate provides global configuration capabilities for `utoipa`.
* `SchemaCollect:All` will collect all schemas from usages including inlined with `inline(T)`
* `SchemaCollect::NonInlined` will only collect non inlined schemas from usages.

> [!WARNING]
> The build config will be stored to projects `OUTPUT` directory. It is then read from there via `OUTPUT` environment
> variable which will return **any instance** rust compiler might find at that time (Whatever the `OUTPUT` environment variable points to).
> **Be aware** that sometimes you might face a situation where the config is not aligned with your Rust aliases.
> This might need you to change something on your code before changed config might apply.
## Install

Add dependency declaration to `Cargo.toml`.
Expand Down
10 changes: 10 additions & 0 deletions utoipa-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
//! * [`SchemaCollect::All`] will collect all schemas from usages including inlined with `inline(T)`
//! * [`SchemaCollect::NonInlined`] will only collect non inlined schemas from usages.
//!
//! <div class="warning">
//!
//! <b>Warning!</b><br>
//! The build config will be stored to projects `OUTPUT` directory. It is then read from there via `OUTPUT` environment
//! variable which will return **any instance** rust compiler might find at that time (Whatever the `OUTPUT` environment variable points to).
//! **Be aware** that sometimes you might face a situation where the config is not aligned with your Rust aliases.
//! This might need you to change something on your code before changed config might apply.
//!
//! </div>
//!
//! ## Install
//!
//! Add dependency declaration to `Cargo.toml`.
Expand Down

0 comments on commit 155657f

Please sign in to comment.