Skip to content

Commit

Permalink
fix(cat-gateway): Response Documentation consistency for document end…
Browse files Browse the repository at this point in the history
…points
  • Loading branch information
stevenj committed Jan 15, 2025
1 parent 35296e2 commit 69cbdd9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ use crate::service::common::{responses::WithErrorResponses, types::payload::cbor
#[derive(ApiResponse)]
#[allow(dead_code)]
pub(crate) enum Responses {
/// ## OK
///
/// The Document that was requested.
#[oai(status = 200)]
Ok(Cbor<Body>),
/// ## Not Found
///
/// The document could not be found.
#[oai(status = 404)]
NotFound,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,25 @@ pub(crate) const MAXIMUM_DOCUMENT_SIZE: usize = 1_048_576;
#[derive(ApiResponse)]
#[allow(dead_code)]
pub(crate) enum Responses {
/// ## Created
///
/// The Document was stored OK for the first time.
#[oai(status = 201)]
Created,
/// ## No Content
///
/// The Document was already stored, and has not changed.
#[oai(status = 204)]
NoContent,
/// Error Response
/// ## Bad Request
///
/// The document submitted is invalid.
/// Error Response. The document submitted is invalid.
#[oai(status = 400)]
BadRequest(Json<PutDocumentBadRequest>),
/// Payload Too Large
/// ## Content Too Large
///
/// The document exceeds the maximum size of a legitimate single document.
/// Payload Too Large. The document exceeds the maximum size of a legitimate single
/// document.
#[oai(status = 413)]
PayloadTooLarge,
}
Expand Down

0 comments on commit 69cbdd9

Please sign in to comment.