Skip to content

Commit

Permalink
feat: include the response body on FullIncident model (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
firminochangani authored Dec 29, 2023
1 parent ee581d9 commit c5852b4
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 57 deletions.
4 changes: 3 additions & 1 deletion api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,16 @@ components:
allOf:
- $ref: '#/components/schemas/Incident'
- type: object
required: [response_headers, response_status, request_headers]
required: [response_headers, response_status, response_body, request_headers]
properties:
response_headers:
type: string
request_headers:
type: string
response_status:
type: integer
response_body:
type: string
LogInPayload:
required: [ token ]
properties:
Expand Down
1 change: 1 addition & 0 deletions internal/ports/http/mappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func mapIncidentToFullIncidentResponse(incident *monitor.Incident) FullIncident
ResolvedAt: incident.ResolvedAt(),
ResponseHeaders: incident.Details().RequestHeaders,
ResponseStatus: int(incident.Details().Status),
ResponseBody: incident.Details().ResponseBody,
}
}

Expand Down
57 changes: 29 additions & 28 deletions internal/ports/http/server.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 29 additions & 28 deletions tests/client/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c5852b4

Please sign in to comment.