From 06e9b57e949425b547419da838054805e305762d Mon Sep 17 00:00:00 2001 From: maiyerlee Date: Tue, 22 Oct 2024 10:46:19 -0500 Subject: [PATCH 1/4] fix: update can funding summary openapi spec --- backend/openapi.yml | 66 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/backend/openapi.yml b/backend/openapi.yml index d1107d72b3..6e2912629d 100644 --- a/backend/openapi.yml +++ b/backend/openapi.yml @@ -1076,29 +1076,69 @@ paths: "purpose": "" } ] - /api/v1/can-funding-summary/{can_id}: + /api/v1/can-funding-summary: get: tags: - CAN Funding Summary - operationId: getFundingTotalsByCanId - description: Get Funding Totals by CAN Id + operationId: getFundingTotals + description: Get Funding Totals parameters: - $ref: "#/components/parameters/simulatedError" + - name: can_ids + in: query + description: Comma-separated list of CAN Ids (required) + required: true + schema: + type: array + items: + type: integer + example: [ 12345, 12346, 12347 ] - name: fiscal_year in: query + description: Fiscal year (optional) schema: type: string - example: "2023" - - in: path - name: can_id - description: CAN Id - required: true + example: "2023" + - name: active_period + in: query + description: List of active periods (optional) schema: - type: integer - format: int32 - minimum: 0 - default: 0 - responses: + type: array + items: + type: integer + example: [ 1, 5 ] + - name: transfer + in: query + description: List of CAN Method of Transfer (optional) + schema: + type: array + items: + type: string + enum: + - DIRECT + - COST_SHARE + - IAA + - IDDA + example: [ "DIRECT", "IAA" ] + - name: portfolio + in: query + description: List of portfolios (optional) + schema: + type: array + items: + type: string + example: [ "HS", "HMRF", "CC" ] + - name: fy_budget + in: query + description: List of two values representing the min and max fiscal year budget (optional) + schema: + type: array + items: + type: integer + minItems: 2 + maxItems: 2 + example: [ 50000, 100000 ] + responses: "200": description: OK content: From 4b2db6e98fd9d341ad2ea57a615128fc2ef4bd25 Mon Sep 17 00:00:00 2001 From: maiyerlee Date: Tue, 22 Oct 2024 14:35:50 -0500 Subject: [PATCH 2/4] fix: add fy new funding to can funding summary response --- backend/openapi.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/openapi.yml b/backend/openapi.yml index 6e2912629d..ccacca1050 100644 --- a/backend/openapi.yml +++ b/backend/openapi.yml @@ -1193,6 +1193,8 @@ paths: type: string expected_funding: type: string + new_funding: + type: string examples: "0": value: | @@ -1220,7 +1222,8 @@ paths: "in_execution_funding": "2000000.00", "obligated_funding": 0, "planned_funding": 0, - "total_funding": "10000000.00" + "total_funding": "10000000.00", + "new_funding": "2000000.00" } /api/v1/users/: get: From 6df1ded3913b44c92414dc20c9be847ee227f45a Mon Sep 17 00:00:00 2001 From: maiyerlee Date: Tue, 22 Oct 2024 14:54:59 -0500 Subject: [PATCH 3/4] chore: add space to fix json syntax --- backend/openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/openapi.yml b/backend/openapi.yml index ccacca1050..6d173ac3d3 100644 --- a/backend/openapi.yml +++ b/backend/openapi.yml @@ -1138,7 +1138,7 @@ paths: minItems: 2 maxItems: 2 example: [ 50000, 100000 ] - responses: + responses: "200": description: OK content: From 018a29153994842023788a6064e8e4a9d1523cbd Mon Sep 17 00:00:00 2001 From: maiyerlee Date: Tue, 22 Oct 2024 23:47:09 -0500 Subject: [PATCH 4/4] docs: use portfolio abbreviations --- backend/openapi.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/openapi.yml b/backend/openapi.yml index 6d173ac3d3..471c8150a2 100644 --- a/backend/openapi.yml +++ b/backend/openapi.yml @@ -1086,7 +1086,7 @@ paths: - $ref: "#/components/parameters/simulatedError" - name: can_ids in: query - description: Comma-separated list of CAN Ids (required) + description: List of CAN Ids (required) required: true schema: type: array @@ -1109,7 +1109,7 @@ paths: example: [ 1, 5 ] - name: transfer in: query - description: List of CAN Method of Transfer (optional) + description: List of CAN Method of Transfers (optional) schema: type: array items: @@ -1122,7 +1122,7 @@ paths: example: [ "DIRECT", "IAA" ] - name: portfolio in: query - description: List of portfolios (optional) + description: List of portfolio abbreviations (optional) schema: type: array items: