-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Description
When I add an enum only in the header, it gets referenced in the yaml output, but there is no corresponding schema in the yaml schema definitions. When I additionally add the enum to a body, it appears in the schema definitions and works as expected.
yaml:
"schema": {
"$ref": "#/components/schemas/AnalysisType" // missing in schema definitions
}
#[derive(Deserialize, Serialize, Debug, ToSchema)]
pub enum AnalysisType {
Spending,
Nutrition,
}
#[utoipa::path(
get,
path = "/analysis",
params(
("Analysis-Type" = AnalysisType, Header, description = "Type of analysis to be performed. Either 'Spending' or 'Nutrition'")),
)]
```
Foorack, barskern, madebyherzblut and avandecreme
Metadata
Metadata
Assignees
Labels
No labels