Slide 19
Slide 19 text
18
4. Webアプリ開発に便利なcrateを活用
#[utoipa::path(
get,
path = "/internal/api/{id}/inventories",
responses(
(status = OK, description = "成功", body = Vec),
(status = NOT_FOUND, description = "存在しない")
),
params(
("id" = String, Path, description = "ID", example = "1234")
)
)]
pub async fn get_inventories(...)
utoipaによるOpenAPI
ドキュメントのパス定義
#[utopia::path(...)]
がcrate提供のマクロ