Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
o-tsaruk committed Oct 5, 2023
1 parent 62f58da commit 9c39fa9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/server/src/handlers/build_sessions/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub(super) enum BuildSessionDiagnosticError {
/// JSON response body.
#[derive(Serialize, JsonSchema)]
pub(super) struct BuildSessionDiagnosticResponse {
/// Diagnostic level(Error, Warning)
/// Diagnostic severity level.
#[schemars(example = "crate::schema::example_diagnostic_level")]
level: diagnostic::Level,

Expand All @@ -54,8 +54,11 @@ pub(super) struct BuildSessionDiagnosticResponse {

/// Generate OAPI documentation for the [`diagnostics`] handler.
pub(super) fn docs(op: TransformOperation) -> TransformOperation {
op.summary("Get all diagnostics for file.")
.response::<200, Json<Vec<BuildSessionDiagnosticResponse>>>()
op.summary("Get diagnostics related to the provided build session.")
.description(r#""#)
.response_with::<200, Json<Vec<BuildSessionDiagnosticResponse>>, _>(|op| {
op.description("JSON diagnostics response.")
})
.response_with::<404, Json<Value>, _>(|op| {
op.description("No build sessions with the provided identifier were found.")
.example(example_error(
Expand Down

0 comments on commit 9c39fa9

Please sign in to comment.