Skip to content

Commit

Permalink
revise: changes the Subject response to include a specific description
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod committed Oct 16, 2023
1 parent 1e611f7 commit 88c6a20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/ccdi-server/src/responses/subject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ use models::count::Total;

/// A response representing a single [`Subject`](models::Subject).
#[derive(Debug, Deserialize, Serialize, ToSchema)]
#[serde(transparent)]
#[schema(as = responses::Subject)]
pub struct Subject(models::Subject);
pub struct Subject {
/// Subject.
#[serde(flatten)]
inner: models::Subject
}

/// A response representing multiple subjects known about by the server with a
/// summarized total count.
Expand Down
5 changes: 4 additions & 1 deletion swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,10 @@ components:
type: string
example: An error occurred.
responses.Subject:
$ref: '#/components/schemas/models.Subject'
allOf:
- $ref: '#/components/schemas/models.Subject'
- type: object
description: A response representing a single [`Subject`](models::Subject).
responses.Subjects:
type: object
description: |-
Expand Down

0 comments on commit 88c6a20

Please sign in to comment.