Skip to content

Commit

Permalink
fix(rust): do not crash when the "docs" command fails
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Aug 30, 2024
1 parent 0b88720 commit 22f6815
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/agama-server/src/agama-web-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async fn serve_command(args: ServeArgs) -> anyhow::Result<()> {

/// Display the API documentation in OpenAPI format.
fn openapi_command() -> anyhow::Result<()> {
println!("{}", web::ApiDoc::openapi().to_pretty_json().unwrap());
println!("{}", web::ApiDoc::build().to_pretty_json()?);
Ok(())
}

Expand Down

0 comments on commit 22f6815

Please sign in to comment.