diff --git a/express-api/src/routes/administrativeAreas.swagger.yaml b/express-api/src/routes/administrativeAreas.swagger.yaml index cd005eb0e..67728b0a3 100644 --- a/express-api/src/routes/administrativeAreas.swagger.yaml +++ b/express-api/src/routes/administrativeAreas.swagger.yaml @@ -90,13 +90,13 @@ paths: $ref: '#/components/schemas/AdministrativeAreaPost' responses: '201': - description: OK. Returns created Administrative Area. + description: Created content: application/json: schema: $ref: '#/components/schemas/AdministrativeArea' '409': - description: Given when an administrative area matching that name already exists. + description: Conflict content: text/plain: schema: @@ -116,7 +116,7 @@ paths: required: true responses: '200': - description: OK. Returns a single administrative area. + description: OK content: application/json: schema: @@ -139,13 +139,13 @@ paths: $ref: '#/components/schemas/AdministrativeArea' responses: '200': - description: OK. Returns the updated administrative area. + description: OK content: application/json: schema: $ref: '#/components/schemas/AdministrativeArea' '404': - description: That administrative area did not exist. + description: Not Found content: text/plain: schema: diff --git a/express-api/src/routes/agencies.swagger.yaml b/express-api/src/routes/agencies.swagger.yaml index ca793ddd7..7ac879090 100644 --- a/express-api/src/routes/agencies.swagger.yaml +++ b/express-api/src/routes/agencies.swagger.yaml @@ -108,13 +108,13 @@ paths: $ref: '#/components/schemas/AgencyPost' responses: '201': - description: OK. Returns created Agency. + description: Created content: application/json: schema: $ref: '#/components/schemas/Agency' '409': - description: Given when an agency matching that name or code already exists. + description: Conflict content: text/plain: schema: @@ -134,7 +134,7 @@ paths: required: true responses: '200': - description: OK. + description: OK content: application/json: schema: @@ -157,27 +157,27 @@ paths: $ref: '#/components/schemas/Agency' responses: '200': - description: OK. Returns the updated agency. + description: OK content: application/json: schema: $ref: '#/components/schemas/Agency' '400': - description: Id in query parameters does not match the request body. + description: Bad Request content: text/plain: schema: type: string example: The param ID does not match the request body. '403': - description: Request tried to set an agency as its own parent. + description: Forbidden content: text/plain: schema: type: string example: An agency cannot be its own parent. '404': - description: That agency did not exist. + description: Not Found content: text/plain: schema: @@ -196,11 +196,11 @@ paths: required: true responses: '204': - description: Successful deletion + description: No Content '400': - description: The Id was not parsed succesfully. + description: Bad Request '404': - description: That agency did not exist. + description: Not Found content: text/plain: schema: diff --git a/express-api/src/routes/buildings.swagger.yaml b/express-api/src/routes/buildings.swagger.yaml index f90afdd4f..867ceec3d 100644 --- a/express-api/src/routes/buildings.swagger.yaml +++ b/express-api/src/routes/buildings.swagger.yaml @@ -76,7 +76,7 @@ paths: items: $ref: '#/components/schemas/Building' '400': - description: Filter supplied did not pass parsing check. + description: Bad Request content: text/plain: schema: @@ -95,13 +95,13 @@ paths: $ref: '#/components/schemas/BuildingPost' responses: '201': - description: OK. Returns created Building. + description: Created content: application/json: schema: $ref: '#/components/schemas/Building' '409': - description: Given if the building already exists in PIMS. + description: Conflict content: text/plain: schema: @@ -120,25 +120,25 @@ paths: type: integer responses: '200': - description: OK. Returns a single Building. + description: OK content: application/json: schema: $ref: '#/components/schemas/Building' '400': - description: Building ID not a valid number. + description: Bad Request content: text/plain: type: string example: Building ID was invalid. '403': - description: Sent when user does not have permission to view this building. + description: Forbidden content: text/plain: type: string example: You are not authorized to view this building. '404': - description: Sent when the building is not found. + description: Not Found content: text/plain: type: string @@ -160,27 +160,27 @@ paths: $ref: '#/components/schemas/Building' responses: '200': - description: OK. Returns the updated Building. + description: OK content: application/json: schema: $ref: '#/components/schemas/Building' '400': - description: Request included invalid or incomplete data. + description: Bad Request content: text/plain: schema: type: string example: The param ID does not match the request body. '403': - description: Request tried to change the agency, but user wasn't an admin. + description: Forbidden content: text/plain: schema: type: string example: Changing agency is not permitted. '404': - description: That Building did not exist. + description: Not Found content: text/plain: schema: @@ -198,23 +198,23 @@ paths: type: integer responses: '200': - description: Successful deletion + description: OK '400': - description: The Id was not parsed succesfully. + description: Bad Request content: text/plain: schema: type: string example: Building ID was invalid. '403': - description: Building belongs to a project. Cannot be deleted. + description: Forbidden content: text/plain: schema: type: string example: Building is involved in one or more projects with ID(s) ... '404': - description: That Building did not exist. + description: Not Found content: text/plain: schema: diff --git a/express-api/src/routes/notifications.swagger.yaml b/express-api/src/routes/notifications.swagger.yaml index 480a9b37c..1b5a42cc8 100644 --- a/express-api/src/routes/notifications.swagger.yaml +++ b/express-api/src/routes/notifications.swagger.yaml @@ -42,14 +42,14 @@ paths: items: $ref: '#/components/schemas/NotificationQueue' '400': - description: Filter parsing issue. + description: Bad Request content: text/plain: schema: type: string example: Could not parse filter. '403': - description: Authorization issue. + description: Forbidden content: text/plain: schema: diff --git a/express-api/src/routes/parcels.swagger.yaml b/express-api/src/routes/parcels.swagger.yaml index a9692d4f2..286548e39 100644 --- a/express-api/src/routes/parcels.swagger.yaml +++ b/express-api/src/routes/parcels.swagger.yaml @@ -64,7 +64,7 @@ paths: items: $ref: '#/components/schemas/Parcel' '400': - description: Could not parse filter. + description: Bad Request content: text/plain: schema: @@ -83,20 +83,20 @@ paths: $ref: '#/components/schemas/ParcelPost' responses: '201': - description: OK. Returns created Parcel. + description: OK content: application/json: schema: $ref: '#/components/schemas/Parcel' '400': - description: Given if the provided PID is not the correct format. + description: Bad Request content: text/plain: schema: type: string example: 'PID must be a number and in the format #########' '409': - description: Given if the parcel already exists in PIMS. + description: Conflict content: text/plain: schema: @@ -115,25 +115,25 @@ paths: type: integer responses: '200': - description: OK. Returns a single Parcel. + description: OK content: application/json: schema: $ref: '#/components/schemas/Parcel' '400': - description: Parcel ID not a valid number. + description: Bad Request content: text/plain: type: string example: Parcel ID was invalid. '403': - description: Sent when user does not have permission to view this parcel. + description: Forbidden content: text/plain: type: string example: You are not authorized to view this parcel. '404': - description: Sent when the parcel is not found. + description: Not Found content: text/plain: type: string @@ -150,25 +150,25 @@ paths: type: integer responses: '200': - description: OK. Returns the updated Parcel. + description: OK content: application/json: schema: $ref: '#/components/schemas/Parcel' '400': - description: Request included invalid or incomplete data. + description: Bad Request content: text/plain: type: string example: Parcel ID was invalid or mismatched with body. '403': - description: Requested change not possible due to permissions or business logic. + description: Forbidden content: text/plain: type: string example: This agency change is not permitted. '404': - description: Sent when the parcel is not found. + description: Not Found content: text/plain: type: string @@ -185,23 +185,23 @@ paths: type: integer responses: '200': - description: Successful deletion + description: OK '400': - description: The Id was not parsed succesfully. + description: Bad Request content: text/plain: schema: type: string example: Parcel ID was invalid. '403': - description: Parcel belongs to a project. Cannot be deleted. + description: Forbidden content: text/plain: schema: type: string example: Parcel is involved in one or more projects with ID(s) ... '404': - description: That Parcel did not exist. + description: Not Found content: text/plain: schema: diff --git a/express-api/src/swagger/common.swagger.yaml b/express-api/src/swagger/common.swagger.yaml index 8ef511a84..209698417 100644 --- a/express-api/src/swagger/common.swagger.yaml +++ b/express-api/src/swagger/common.swagger.yaml @@ -29,14 +29,14 @@ components: example: null responses: 400BadRequest: - description: Bad request response. + description: Bad Request content: text/plain: schema: type: string example: 'Response could not be processed.' 429TooManyRequests: - description: Express rate limiter reached. Too many requests. + description: Too Many Requests content: text/plain: schema: