Skip to content

Commit

Permalink
docs(features/openapi.md): Add translation (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
TnZzZHlp authored Oct 10, 2024
1 parent 4ee14e2 commit 4ad0a93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/book/features/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ struct Query {
}
```

- `rename_all = ...`: 支持于 `serde` 类似的语法定义重命名字段的规则. 如果同时定义了 `#[serde(rename_all = "...")]` `#[salvo(schema(rename_all = "..."))]`, 则优先使用 `#[serde(rename_all = "...")]`.
- `rename_all = ...`: Support for defining renaming rules with a syntax similar to `serde`. If both `#[serde(rename_all = "...")]` and `#[salvo(schema(rename_all = "..."))]` are defined, `#[serde(rename_all = "...")]` takes precedence.

- `symbol = ...`: 一个字符串字面量, 用于定义结构在 OpenAPI 中线上的名字路径. 比如 `#[salvo(schema(symbol = "path.to.Pet"))]`.
- `symbol = ...`: A string literal, used to define the name path of a structure in OpenAPI. For example `#[salvo(schema(symbol = "path.to.Pet"))]`.

- `default`: Can be used to populate default values on all fields using the struct’s Default implementation.

Expand Down

0 comments on commit 4ad0a93

Please sign in to comment.