Skip to content

Commit

Permalink
Agency ID -> UID
Browse files Browse the repository at this point in the history
  • Loading branch information
DMalone87 committed Sep 5, 2024
1 parent 5710da2 commit dca32c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions oas/2.0/agencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ paths:
parameters:
- name: "agency_uid"
in: "path"
description: "The id of the agency you want to retrieve."
description: "The uid of the agency you want to retrieve."
required: true
schema:
type: "string"
get:
summary: "Get Agency"
operationId: "getAgency"
description: "Get a single agency by id."
description: "Get a single agency by uid."
tags:
- Agencies
responses:
Expand Down Expand Up @@ -105,7 +105,7 @@ paths:
parameters:
- name: "agency_uid"
in: "path"
description: "The id of the agency you want to retrieve."
description: "The uid of the agency you want to retrieve."
required: true
schema:
type: "string"
Expand Down Expand Up @@ -156,7 +156,7 @@ paths:
parameters:
- name: "agency_uid"
in: "path"
description: "The id of the agency you want to retrieve."
description: "The uid of the agency you want to retrieve."
required: true
schema:
type: "string"
Expand Down Expand Up @@ -201,13 +201,13 @@ paths:
parameters:
- name: "agency_uid"
in: "path"
description: "The id of the agency you want to retrieve."
description: "The uid of the agency you want to retrieve."
required: true
schema:
type: "string"
- name: "unit_uid"
in: "path"
description: "The id of the agency you want to retrieve."
description: "The uid of the agency you want to retrieve."
required: true
schema:
type: "string"
Expand All @@ -221,7 +221,7 @@ paths:
parameters:
- name: "agency_uid"
in: "path"
description: "The id of the agency you want to retrieve units for."
description: "The uid of the agency you want to retrieve units for."
required: true
schema:
type: "string"
Expand Down Expand Up @@ -264,7 +264,7 @@ components:
BaseAgency:
type: "object"
properties:
id:
uid:
type: "string"
description: "Unique identifier for the agency"
name:
Expand Down Expand Up @@ -322,7 +322,7 @@ components:
- $ref: "#/components/schemas/BaseAgency"
- type: "object"
properties:
id:
uid:
type: "string"
description: "Unique identifier for the agency"
officers_url:
Expand Down Expand Up @@ -373,7 +373,7 @@ components:
- $ref: "#/components/schemas/BaseUnit"
- type: "object"
properties:
id:
uid:
type: "string"
description: "Unique identifier for the unit"
agency_url:
Expand All @@ -399,7 +399,7 @@ components:
properties:
officer_uid:
type: "string"
description: "The id of the officer"
description: "The uid of the officer"
earliest_employment:
type: "string"
format: "date"
Expand Down Expand Up @@ -434,7 +434,7 @@ components:
properties:
officer_uid:
type: "string"
description: "The id of the officer"
description: "The uid of the officer"
reason:
type: "string"
description: "The reason the employment record could not be added"
Expand Down
14 changes: 7 additions & 7 deletions oas/pydantic/agencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class BaseAgency(BaseModel):
id: Optional[str] = Field(None, description="Unique identifier for the agency")
uid: Optional[str] = Field(None, description="Unique identifier for the agency")
name: Optional[str] = Field(None, description="Name of the agency")
hq_address: Optional[str] = Field(None, description="Address of the agency")
hq_city: Optional[str] = Field(None, description="City of the agency")
Expand All @@ -16,7 +16,7 @@ class BaseAgency(BaseModel):


class CreateAgency(BaseAgency, BaseModel):
id: Optional[str] = Field(None, description="Unique identifier for the agency")
uid: Optional[str] = Field(None, description="Unique identifier for the agency")
name: Optional[str] = Field(None, description="Name of the agency")
hq_address: Optional[str] = Field(None, description="Address of the agency")
hq_city: Optional[str] = Field(None, description="City of the agency")
Expand All @@ -29,7 +29,7 @@ class CreateAgency(BaseAgency, BaseModel):


class UpdateAgency(BaseAgency, BaseModel):
id: Optional[str] = Field(None, description="Unique identifier for the agency")
uid: Optional[str] = Field(None, description="Unique identifier for the agency")
name: Optional[str] = Field(None, description="Name of the agency")
hq_address: Optional[str] = Field(None, description="Address of the agency")
hq_city: Optional[str] = Field(None, description="City of the agency")
Expand All @@ -46,7 +46,7 @@ class AgencyList(PaginatedResponse, BaseModel):


class Agency(BaseAgency, BaseModel):
id: Optional[str] = Field(None, description="Unique identifier for the agency")
uid: Optional[str] = Field(None, description="Unique identifier for the agency")
name: Optional[str] = Field(None, description="Name of the agency")
hq_address: Optional[str] = Field(None, description="Address of the agency")
hq_city: Optional[str] = Field(None, description="City of the agency")
Expand Down Expand Up @@ -103,7 +103,7 @@ class Unit(BaseUnit, BaseModel):
address: Optional[str] = Field(None, description="Street address of the unit")
zip: Optional[str] = Field(None, description="Zip code of the unit")
commander: Optional[str] = Field(None, description="The Officer UID of the unit's commander")
id: Optional[str] = Field(None, description="Unique identifier for the unit")
uid: Optional[str] = Field(None, description="Unique identifier for the unit")
agency_url: Optional[str] = Field(None, description="URL to get the agency that this unit belongs to.")
officers_url: Optional[str] = Field(None, description="URL to get a list of officers for this unit.")

Expand All @@ -113,7 +113,7 @@ class UnitList(PaginatedResponse, BaseModel):


class AddOfficer(BaseModel):
officer_uid: str = Field(..., description="The id of the officer")
officer_uid: str = Field(..., description="The uid of the officer")
earliest_employment: Optional[str] = Field(None, description="The earliest date of employment")
latest_employment: Optional[str] = Field(None, description="The latest date of employment")
badge_number: str = Field(..., description="The badge number of the officer")
Expand All @@ -127,7 +127,7 @@ class AddOfficerList(BaseModel):


class AddOfficerFailed(BaseModel):
officer_uid: Optional[str] = Field(None, description="The id of the officer")
officer_uid: Optional[str] = Field(None, description="The uid of the officer")
reason: Optional[str] = Field(None, description="The reason the employment record could not be added")


Expand Down

0 comments on commit dca32c1

Please sign in to comment.