GREsau / GREsau/okapi

form field not supported

Open
#43 4 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted schemars
Dominant language
Rust
Stars
740
Forks
127
PR merge metrics
No merged PRs in 30d

Description

I have an api with a parameter async. This is a reserved word, so to handle this I have the following form defined, with the form field statement specifying that the variable is_async is called "async" in the API.
```rust
#[derive(FromForm, JsonSchema, Debug)]
struct MoveInput {
to: String,
#[form(field = "async")]
is_async: Option
}

#[openapi]
#[post("/move/?")]
fn mv(input: Form, session: State) {
```
in the swagger UI this is still shown as is_async.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.