Skip to content

Commit e5f7f70

Browse files
committed
Update README.md docs
Update utoipa-redoc README and utoipa-swagger-ui docs.
1 parent 6baa9b0 commit e5f7f70

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

utoipa-redoc/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
This crate works as a bridge between [utoipa](https://docs.rs/utoipa/latest/utoipa/) and [Redoc](https://redocly.com/) OpenAPI visualizer.
99

1010
Utoipa-redoc provides simple mechanism to transform OpenAPI spec resource to a servable HTML
11-
file which can be served via [predefined framework integration][Self#examples] or used
12-
[standalone][Self#using-standalone] and served manually.
11+
file which can be served via [predefined framework integration](#examples) or used
12+
[standalone](#using-standalone) and served manually.
1313

1414
You may find fullsize examples from utoipa's Github [repository][examples].
1515

@@ -41,7 +41,7 @@ framework.
4141

4242
`Redoc::to_html` method can be used to convert the `Redoc` instance to a servable html
4343
file.
44-
```
44+
```rust
4545
let redoc = Redoc::new(ApiDoc::openapi());
4646

4747
// Then somewhere in your application that handles http operation.
@@ -54,7 +54,7 @@ let redoc_handler = move || async {
5454
# Customization
5555

5656
Utoipa-redoc enables full customizaton support for [Redoc][redoc] according to what can be
57-
customized by modifying the HTML template and [configuration options][Self#configuration].
57+
customized by modifying the HTML template and [configuration options](#configuration).
5858

5959
The default [HTML template][redoc_html_quickstart] can be fully overridden to ones liking with
6060
`Redoc::custom_html` method. The HTML template **must** contain **`$spec`** and **`$config`**
@@ -120,15 +120,13 @@ _**Serve `Redoc` via `axum` framework.**_
120120

121121
_**Use `Redoc` to serve OpenAPI spec from url.**_
122122
```rust
123-
# use utoipa_redoc::Redoc;
124123
Redoc::new(
125124
"https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml")
126125
```
127126

128127
_**Use `Redoc` to serve custom OpenAPI spec using serde's `json!()` macro.**_
129128
```rust
130-
# use utoipa_redoc::Redoc;
131-
Redoc::new(json!({"openapi": 3.1.0}));
129+
Redoc::new(json!({"openapi": "3.1.0"}));
132130
```
133131

134132
[redoc]: <https://redocly.com/>

utoipa-swagger-ui/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Use only the raw types without any boilerplate implementation.
3737
```toml
3838
[dependencies]
3939
utoipa-swagger-ui = "3"
40-
4140
```
41+
4242
Enable actix-web framework with Swagger UI you could define the dependency as follows.
4343
```toml
4444
[dependencies]

utoipa-swagger-ui/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
//! ```toml
3535
//! [dependencies]
3636
//! utoipa-swagger-ui = "3"
37-
//!
3837
//! ```
38+
//!
3939
//! Enable actix-web framework with Swagger UI you could define the dependency as follows.
4040
//! ```toml
4141
//! [dependencies]

0 commit comments

Comments
 (0)