Skip to content

Commit

Permalink
feat: adds division_id to CAN prop
Browse files Browse the repository at this point in the history
  • Loading branch information
fpigeonjr committed Sep 23, 2024
1 parent 61887bc commit 1974573
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ yarn-error.log*
# MacOS stuff
.DS_Store

# IDE
.vscode/*
# allow vscode launch/tasks to be shared
!.vscode/launch.json
!.vscode/tasks.json
.idea

# HTTP-Client
Expand Down
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.cwd": "./backend/ops_api",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
34 changes: 34 additions & 0 deletions backend/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2740,6 +2740,9 @@ components:
can_id:
type: integer
example: 1
can:
type: object
$ref: "#/components/schemas/BudgetLineItemCAN"
comments:
type: string
date_needed:
Expand Down Expand Up @@ -2805,6 +2808,37 @@ components:
description: optional notes added to a Change Request when a PATCH is made that creates a CR
type: string
writeOnly: true
BudgetLineItemCAN:
type: object
properties:
id:
type: integer
example: 1
portfolio:
type: object
$ref: "#/components/schemas/PortfolioBLISchema"
portfolio_id:
type: integer
example: 1
display_name:
type: string
nick_name:
type: string
number:
type: string
description:
type: string
active_period:
type: integer
expiration_date:
type: integer
appropriation_date:
type: integer
PortfolioBLISchema:
type: object
properties:
division_id:
type: integer
BudgetLineItemRequest:
type: object
properties:
Expand Down
4 changes: 4 additions & 0 deletions backend/ops_api/ops/schemas/budget_line_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,12 @@ class Meta:
email = fields.Str(default=None, allow_none=True)


class PortfolioBLISchema(Schema):
division_id = fields.Int(required=True)

class BudgetLineItemCANSchema(Schema):
id = fields.Int(required=True)
portfolio = fields.Nested(PortfolioBLISchema())
display_name = fields.Str(required=True)
number = fields.Str(required=True)
description = fields.Str(required=True)
Expand Down

0 comments on commit 1974573

Please sign in to comment.