Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug implementation for SwaggerUi #1276

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions utoipa-swagger-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

* Update axum to v0.8 (https://github.com/juhaku/utoipa/pull/1269)

### Fixed

* Add debug implementation for SwaggerUi (https://github.com/juhaku/utoipa/pull/1276)

## 8.1.0 - Dec 19 2024

### Added
Expand Down
1 change: 1 addition & 0 deletions utoipa-swagger-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ more details at [serve](https://docs.rs/utoipa-swagger-ui/latest/utoipa_swagger_
* **`url`** Enabled by default for parsing and encoding the download URL.
* **`vendored`** Enables vendored Swagger UI via `utoipa-swagger-ui-vendored` crate.
- **`cache`** Enables caching of the Swagger UI download in `utoipa-swagger-ui` during the build process.
- **`debug`**: Implement debug trait for SwaggerUi and other types.

## Install

Expand Down
2 changes: 2 additions & 0 deletions utoipa-swagger-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,7 @@ impl From<String> for Config<'_> {
/// Basic auth options for Swagger UI. By providing `BasicAuth` to `Config::basic_auth` the access to the
/// Swagger UI can be restricted behind given basic authentication.
#[derive(Serialize, Clone)]
#[cfg_attr(feature = "debug", derive(Debug))]
pub struct BasicAuth {
/// Username for the `BasicAuth`
pub username: String,
Expand All @@ -1354,6 +1355,7 @@ pub struct BasicAuth {
/// Represents settings related to syntax highlighting of payloads and
/// cURL commands.
#[derive(Serialize, Clone)]
#[cfg_attr(feature = "debug", derive(Debug))]
#[non_exhaustive]
pub struct SyntaxHighlight {
/// Boolean telling whether syntax highlighting should be
Expand Down
Loading