We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de3dad9 commit 4eb7a35Copy full SHA for 4eb7a35
src/utils.rs
@@ -33,7 +33,10 @@ pub async fn openapi_spec_json() -> Result<Response> {
33
/// Currently this function doesn't return any error. this is for feature
34
/// functionality
35
pub async fn openapi_spec_yaml() -> Result<Response> {
36
- format::yaml(&get_openapi_spec().to_yaml()?)
+ let yaml = get_openapi_spec()
37
+ .to_yaml()
38
+ .map_err(|e| loco_rs::Error::Any(Box::new(e)))?;
39
+ format::yaml(&yaml)
40
}
41
42
/// Adds the `OpenAPI` endpoints the app router
0 commit comments