Skip to main content

to_openapi_path

Function to_openapi_path 

Source
pub fn to_openapi_path(path: &str) -> String
Expand description

Convert a :parameter path to the OpenAPI template syntax.

ยงExamples

use lino_rest_api::description::to_openapi_path;

assert_eq!(to_openapi_path("/items/:id/tags/:tag"), "/items/{id}/tags/{tag}");