This fixes an issue where the doc comment description of an e.g. JSON parameter of a request would not show up in the generated API spec.
For example:
#[oai(path = "/users", method = "post", operation_id = "createUser")]
async fn create_user(
&self,
/// Parameters required to create a new user
Json(params): Json<CreateUserParams>,
)
should translate to:
/users:
post:
requestBody:
description: Parameters required to create a new user
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/CreateUserParams'
required: true
This fixes an issue where the doc comment description of an e.g. JSON parameter of a request would not show up in the generated API spec.
For example:
should translate to:
but without this change
description
is missing.