diff --git a/openapi/components/parameters/bblParam.yaml b/openapi/components/parameters/bblParam.yaml new file mode 100644 index 0000000..d84c85f --- /dev/null +++ b/openapi/components/parameters/bblParam.yaml @@ -0,0 +1,10 @@ +name: bbl +required: true +in: path +schema: + type: string + pattern: ^([0-9]{10})$ + example: '1000477501' +description: >- + The ten character code compromised of a one character borough, five character + block, and four character lot codes. diff --git a/openapi/components/parameters/boroughIdParam.yaml b/openapi/components/parameters/boroughIdParam.yaml new file mode 100644 index 0000000..b09270a --- /dev/null +++ b/openapi/components/parameters/boroughIdParam.yaml @@ -0,0 +1,10 @@ +name: boroughId +required: true +in: path +schema: + type: string + pattern: ^([0-9]{1})$ + example: '1' +description: >- + A single character numeric string containing the common number used to refer + to the borough. Possible values are 1-5. diff --git a/openapi/components/parameters/bufferParam.yaml b/openapi/components/parameters/bufferParam.yaml new file mode 100644 index 0000000..3a38a5d --- /dev/null +++ b/openapi/components/parameters/bufferParam.yaml @@ -0,0 +1,8 @@ +name: buffer +in: query +schema: + type: number + example: 600 +description: >- + A buffer around the spatial feature. Units are feet. It is optional when + applying a spatial filter. diff --git a/openapi/components/parameters/capitalProjectIdParam.yaml b/openapi/components/parameters/capitalProjectIdParam.yaml new file mode 100644 index 0000000..9e9d86a --- /dev/null +++ b/openapi/components/parameters/capitalProjectIdParam.yaml @@ -0,0 +1,9 @@ +name: capitalProjectId +required: true +in: path +schema: + type: string + example: HWPEDSF5 +description: >- + The id for the project, which combines with the managing code to make a unique + id diff --git a/openapi/components/parameters/cityCouncilDistrictIdParam.yaml b/openapi/components/parameters/cityCouncilDistrictIdParam.yaml new file mode 100644 index 0000000..d3cfd15 --- /dev/null +++ b/openapi/components/parameters/cityCouncilDistrictIdParam.yaml @@ -0,0 +1,8 @@ +name: cityCouncilDistrictId +required: true +in: path +schema: + type: string + pattern: ^([0-9]{1,2})$ + example: '25' +description: One or two character code to represent city council districts. diff --git a/openapi/components/parameters/communityDistrictIdParam.yaml b/openapi/components/parameters/communityDistrictIdParam.yaml new file mode 100644 index 0000000..ddcc5ad --- /dev/null +++ b/openapi/components/parameters/communityDistrictIdParam.yaml @@ -0,0 +1,10 @@ +name: communityDistrictId +required: true +in: path +schema: + type: string + pattern: ^([0-9]{2})$ + example: '01' +description: >- + The two character numeric string containing the number used to refer to the + community district. diff --git a/openapi/components/parameters/geometryParam.yaml b/openapi/components/parameters/geometryParam.yaml new file mode 100644 index 0000000..b5eb5ed --- /dev/null +++ b/openapi/components/parameters/geometryParam.yaml @@ -0,0 +1,16 @@ +name: geometry +required: false +in: query +schema: + type: string + enum: + - Point + - LineString + - Polygon + example: Polygon +description: >- + The type of geometry used for a spatial filter. It must be provided when + applying a spatial filter; each geometry has its own coordinate requirements. + Point geometries have length of 1. LineString geometries have length of 2 to + 5, inclusive. Polygons have length 4 to 5, inclusive; the last coordinate must + match the first coordinate to close the polygon. diff --git a/openapi/components/parameters/latsParam.yaml b/openapi/components/parameters/latsParam.yaml new file mode 100644 index 0000000..c8f5f20 --- /dev/null +++ b/openapi/components/parameters/latsParam.yaml @@ -0,0 +1,17 @@ +name: lats +required: false +in: query +schema: + type: array + items: + type: number + minItems: 1 + maxItems: 5 +style: form +explode: false +example: 40.708649,40.707800,40.707800,40.708649,40.708649 +description: >- + The latitude portion of coordinates. It must be provided when applying a + spatial filter and have the same length as the longitudes. (If using a tool + like axios, serializing the array with brackets is also supported. ex; + lats[]=40.708649&lats[]=40.707800) diff --git a/openapi/components/parameters/limitParam.yaml b/openapi/components/parameters/limitParam.yaml new file mode 100644 index 0000000..d614d1a --- /dev/null +++ b/openapi/components/parameters/limitParam.yaml @@ -0,0 +1,11 @@ +name: limit +required: false +in: query +schema: + type: integer + minimum: 1 + maximum: 100 + example: 100 +description: >- + The maximum number of results to be returned in each response. The default + value is 20. It must be between 1 and 100, inclusive. diff --git a/openapi/components/parameters/lonsParam.yaml b/openapi/components/parameters/lonsParam.yaml new file mode 100644 index 0000000..5b8707a --- /dev/null +++ b/openapi/components/parameters/lonsParam.yaml @@ -0,0 +1,17 @@ +name: lons +required: false +in: query +schema: + type: array + items: + type: number + minItems: 1 + maxItems: 5 + example: '-74.010776,-74.010776,-74.010139,-74.010139,-74.010776' +style: form +explode: false +description: >- + The longitude portion of coordinates. It must be provided when applying a + spatial filter and have the same length as the latitudes. (If using a tool + like axios, serializing the array with brackets is also supported. ex; + lons[]=-74.010776&lons[]=-74.010776) diff --git a/openapi/components/parameters/managingCodeParam.yaml b/openapi/components/parameters/managingCodeParam.yaml new file mode 100644 index 0000000..e4ece97 --- /dev/null +++ b/openapi/components/parameters/managingCodeParam.yaml @@ -0,0 +1,8 @@ +name: managingCode +required: true +in: path +schema: + type: string + pattern: ^([0-9]{3})$ + example: '801' +description: Three character string of numbers representing managing agency diff --git a/openapi/components/parameters/offsetParam.yaml b/openapi/components/parameters/offsetParam.yaml new file mode 100644 index 0000000..52b975d --- /dev/null +++ b/openapi/components/parameters/offsetParam.yaml @@ -0,0 +1,10 @@ +name: offset +required: false +in: query +schema: + type: integer + minimum: 0 + example: 100 +description: >- + The position in the full list to begin returning results. Default offset is 0. + If the offset is beyond the end of the list, no results will be returned. diff --git a/openapi/components/parameters/viewportXParam.yaml b/openapi/components/parameters/viewportXParam.yaml new file mode 100644 index 0000000..f37273c --- /dev/null +++ b/openapi/components/parameters/viewportXParam.yaml @@ -0,0 +1,7 @@ +name: x +in: path +description: viewport x component +required: true +schema: + type: integer + example: 1000 diff --git a/openapi/components/parameters/viewportYParam.yaml b/openapi/components/parameters/viewportYParam.yaml new file mode 100644 index 0000000..45702cc --- /dev/null +++ b/openapi/components/parameters/viewportYParam.yaml @@ -0,0 +1,7 @@ +name: 'y' +in: path +description: viewport y component +required: true +schema: + type: integer + example: 1000 diff --git a/openapi/components/parameters/viewportZoomParam.yaml b/openapi/components/parameters/viewportZoomParam.yaml new file mode 100644 index 0000000..923c154 --- /dev/null +++ b/openapi/components/parameters/viewportZoomParam.yaml @@ -0,0 +1,7 @@ +name: z +in: path +description: viewport zoom component +required: true +schema: + type: integer + example: 7 diff --git a/openapi/components/responses/BadRequest.yaml b/openapi/components/responses/BadRequest.yaml new file mode 100644 index 0000000..be1dd37 --- /dev/null +++ b/openapi/components/responses/BadRequest.yaml @@ -0,0 +1,5 @@ +description: Invalid client request +content: + application/json: + schema: + $ref: ../schemas/Error.yaml diff --git a/openapi/components/responses/InternalServerError.yaml b/openapi/components/responses/InternalServerError.yaml new file mode 100644 index 0000000..be2f5ce --- /dev/null +++ b/openapi/components/responses/InternalServerError.yaml @@ -0,0 +1,5 @@ +description: Server side error +content: + application/json: + schema: + $ref: ../schemas/Error.yaml diff --git a/openapi/components/responses/MVT.yaml b/openapi/components/responses/MVT.yaml new file mode 100644 index 0000000..ab837a2 --- /dev/null +++ b/openapi/components/responses/MVT.yaml @@ -0,0 +1,6 @@ +description: A protobuf file formatted as Mapbox Vector Tile +content: + application/x-protobuf: + schema: + type: string + format: byte diff --git a/openapi/components/responses/NotFound.yaml b/openapi/components/responses/NotFound.yaml new file mode 100644 index 0000000..75e8208 --- /dev/null +++ b/openapi/components/responses/NotFound.yaml @@ -0,0 +1,5 @@ +description: Requested resource does not exist or is not available +content: + application/json: + schema: + $ref: ../schemas/Error.yaml diff --git a/openapi/components/schemas/Agency.yaml b/openapi/components/schemas/Agency.yaml new file mode 100644 index 0000000..ea61d3c --- /dev/null +++ b/openapi/components/schemas/Agency.yaml @@ -0,0 +1,13 @@ +type: object +properties: + initials: + type: string + description: A string of variable length containing the initials of the agency. + example: DOT + name: + type: string + description: The full name of the agency. + example: Department of Transportation +required: + - initials + - name diff --git a/openapi/components/schemas/Borough.yaml b/openapi/components/schemas/Borough.yaml new file mode 100644 index 0000000..871de04 --- /dev/null +++ b/openapi/components/schemas/Borough.yaml @@ -0,0 +1,23 @@ +type: object +properties: + id: + type: string + description: >- + A single character numeric string containing the common number used to + refer to the borough. Possible values are 1-5. + pattern: ^([0-9])$ + example: 1 + title: + type: string + description: The full name of the borough. + example: Manhattan + abbr: + type: string + description: The two character abbreviation for the borough. + minLength: 2 + maxLength: 2 + example: MN +required: + - id + - title + - abbr diff --git a/openapi/components/schemas/CapitalCommitment.yaml b/openapi/components/schemas/CapitalCommitment.yaml new file mode 100644 index 0000000..d2ffb80 --- /dev/null +++ b/openapi/components/schemas/CapitalCommitment.yaml @@ -0,0 +1,51 @@ +type: object +properties: + id: + type: string + description: A uuid used to refer to the capital commitment. + format: uuid + type: + type: string + description: A four character string used to refer to the commitment type. + pattern: ^([A-z]{4})$ + example: DSGN + plannedDate: + type: string + format: date + description: >- + A string used to refer to the date when the commitment is projected to be + committed. + example: '2012-04-23' + budgetLineCode: + type: string + description: A string used to refer to the budget line. + example: HW + budgetLineId: + type: string + description: A string used to refer to the budget line. + example: 0002Q + sponsoringAgency: + type: string + nullable: true + description: >- + A string of variable length containing the initials of the sponsoring + agency. + example: DOT + budgetType: + type: string + nullable: true + description: A string of variable length denoting the type of budget. + example: Highways + totalValue: + type: number + description: A numeric string used to refer to the amount of total planned commitments. + example: 1600000 +required: + - id + - type + - plannedDate + - budgetLineCode + - budgetLineId + - sponsoringAgency + - budgetType + - totalValue diff --git a/openapi/components/schemas/CapitalCommitmentType.yaml b/openapi/components/schemas/CapitalCommitmentType.yaml new file mode 100644 index 0000000..f09bcc5 --- /dev/null +++ b/openapi/components/schemas/CapitalCommitmentType.yaml @@ -0,0 +1,15 @@ +type: object +properties: + code: + type: string + description: The four character code to represent the capital commitment type + minLength: 4 + maxLength: 4 + example: CONS + description: + type: string + description: The description of the capital commitment type. + example: CONSTRUCTION +required: + - code + - description diff --git a/openapi/components/schemas/CapitalProject.yaml b/openapi/components/schemas/CapitalProject.yaml new file mode 100644 index 0000000..07a21eb --- /dev/null +++ b/openapi/components/schemas/CapitalProject.yaml @@ -0,0 +1,42 @@ +type: object +properties: + id: + type: string + description: >- + The id for the project, which combines with the managing code to make a + unique id + example: HWPEDSF5 + description: + type: string + description: The capital project title. + example: Multi-Site Pedestrian Safety Phase 5 + managingCode: + type: string + description: Three character string of numbers representing managing agency + pattern: ^([0-9]{3})$ + example: 850 + managingAgency: + type: string + description: The managing agency name abbreviation or acronym + example: DOT + minDate: + type: string + format: date + description: The starting date of the capital project + example: '2024-05-15' + maxDate: + type: string + format: date + description: The ending date of the capital project + example: '2024-05-15' + category: + $ref: ./CapitalProjectCategory.yaml + nullable: true +required: + - id + - description + - managingCode + - managingAgency + - minDate + - maxDate + - category diff --git a/openapi/components/schemas/CapitalProjectBudgeted.yaml b/openapi/components/schemas/CapitalProjectBudgeted.yaml new file mode 100644 index 0000000..a244c0a --- /dev/null +++ b/openapi/components/schemas/CapitalProjectBudgeted.yaml @@ -0,0 +1,29 @@ +allOf: + - $ref: ./CapitalProject.yaml + - type: object + properties: + commitmentsTotal: + type: number + description: The sum total of commitments for the capital project + example: 200000 + sponsoringAgencies: + type: array + items: + type: string + description: >- + An array containing string values representing the sponsoring agencies + initials. + example: + - DOT + budgetTypes: + type: array + items: + type: string + description: An array containing string values representing the budget types. + example: + - Highways + - Highway Bridges + required: + - commitmentsTotal + - sponsoringAgencies + - budgetTypes diff --git a/openapi/components/schemas/CapitalProjectBudgetedGeoJson.yaml b/openapi/components/schemas/CapitalProjectBudgetedGeoJson.yaml new file mode 100644 index 0000000..68a1be8 --- /dev/null +++ b/openapi/components/schemas/CapitalProjectBudgetedGeoJson.yaml @@ -0,0 +1,21 @@ +type: object +properties: + id: + type: string + description: The concatenation of the managing code and capital project id. + example: 806RAMALG + type: + type: string + enum: + - Feature + geometry: + oneOf: + - $ref: ./MultiPoint.yaml + - $ref: ./MultiPolygon.yaml + properties: + $ref: ./CapitalProjectBudgeted.yaml +required: + - id + - type + - geometry + - properties diff --git a/openapi/components/schemas/CapitalProjectCategory.yaml b/openapi/components/schemas/CapitalProjectCategory.yaml new file mode 100644 index 0000000..3bf9ee5 --- /dev/null +++ b/openapi/components/schemas/CapitalProjectCategory.yaml @@ -0,0 +1,8 @@ +type: string +nullable: true +enum: + - Fixed Asset + - Lump Sum + - ITT, Vehicles and Equipment + - null +description: The type of Capital Project. diff --git a/openapi/components/schemas/CapitalProjectPage.yaml b/openapi/components/schemas/CapitalProjectPage.yaml new file mode 100644 index 0000000..6585a19 --- /dev/null +++ b/openapi/components/schemas/CapitalProjectPage.yaml @@ -0,0 +1,10 @@ +allOf: + - $ref: ./Page.yaml + - type: object + properties: + capitalProjects: + type: array + items: + $ref: ./CapitalProject.yaml + required: + - capitalProjects diff --git a/openapi/components/schemas/CityCouncilDistrict.yaml b/openapi/components/schemas/CityCouncilDistrict.yaml new file mode 100644 index 0000000..712d162 --- /dev/null +++ b/openapi/components/schemas/CityCouncilDistrict.yaml @@ -0,0 +1,9 @@ +type: object +properties: + id: + type: string + description: One or two character code to represent city council districts. + pattern: ^([0-9]{1,2})$ + example: '25' +required: + - id diff --git a/openapi/components/schemas/CityCouncilDistrictGeoJson.yaml b/openapi/components/schemas/CityCouncilDistrictGeoJson.yaml new file mode 100644 index 0000000..b0ddcc6 --- /dev/null +++ b/openapi/components/schemas/CityCouncilDistrictGeoJson.yaml @@ -0,0 +1,20 @@ +type: object +properties: + id: + type: string + description: One or two character code to represent city council districts. + pattern: ^([0-9]{1,2})$ + example: 25 + type: + type: string + enum: + - Feature + properties: + $ref: ./CityCouncilDistrict.yaml + geometry: + $ref: ./MultiPolygon.yaml +required: + - id + - type + - geometry + - properties diff --git a/openapi/components/schemas/CommunityDistrict.yaml b/openapi/components/schemas/CommunityDistrict.yaml new file mode 100644 index 0000000..7836352 --- /dev/null +++ b/openapi/components/schemas/CommunityDistrict.yaml @@ -0,0 +1,19 @@ +type: object +properties: + id: + type: string + description: >- + The two character numeric string containing the number used to refer to + the community district. + pattern: ^([0-9]{2})$ + example: 1 + boroughId: + type: string + description: >- + A single character numeric string containing the common number used to + refer to the borough. Possible values are 1-5. + pattern: ^([0-9])$ + example: 1 +required: + - id + - boroughId diff --git a/openapi/components/schemas/CommunityDistrictGeoJson.yaml b/openapi/components/schemas/CommunityDistrictGeoJson.yaml new file mode 100644 index 0000000..841f67a --- /dev/null +++ b/openapi/components/schemas/CommunityDistrictGeoJson.yaml @@ -0,0 +1,20 @@ +type: object +properties: + id: + type: string + description: Three character code to represent a borough and community district. + pattern: ^([0-9]{3})$ + example: 101 + type: + type: string + enum: + - Feature + properties: + $ref: ./CommunityDistrict.yaml + geometry: + $ref: ./MultiPolygon.yaml +required: + - id + - type + - geometry + - properties diff --git a/openapi/components/schemas/Error.yaml b/openapi/components/schemas/Error.yaml new file mode 100644 index 0000000..f38c65a --- /dev/null +++ b/openapi/components/schemas/Error.yaml @@ -0,0 +1,11 @@ +type: object +properties: + statusCode: + type: number + message: + type: string + error: + type: string +required: + - statusCode + - message diff --git a/openapi/components/schemas/LandUse.yaml b/openapi/components/schemas/LandUse.yaml new file mode 100644 index 0000000..e234598 --- /dev/null +++ b/openapi/components/schemas/LandUse.yaml @@ -0,0 +1,23 @@ +type: object +properties: + id: + type: string + description: >- + The two character code to represent the land use. Possible values are + 01-11. + minLength: 2 + maxLength: 2 + example: '05' + description: + type: string + description: The description of the land use. + example: Commercial and Office Buildings + color: + type: string + description: Hex-style color code to represent the land use. + pattern: ^#([A-Fa-f0-9]{8})$ + example: '#fc2929ff' +required: + - id + - description + - color diff --git a/openapi/components/schemas/MultiPoint.yaml b/openapi/components/schemas/MultiPoint.yaml new file mode 100644 index 0000000..91f468e --- /dev/null +++ b/openapi/components/schemas/MultiPoint.yaml @@ -0,0 +1,15 @@ +type: object +description: A geojson implementation of a MultiPoint Simple Feature +properties: + type: + type: string + enum: + - MultiPoint + coordinates: + type: array + description: Array of position coordinate arrays. + items: + $ref: ./Position.yaml +required: + - type + - coordinates diff --git a/openapi/components/schemas/MultiPolygon.yaml b/openapi/components/schemas/MultiPolygon.yaml new file mode 100644 index 0000000..b2269f7 --- /dev/null +++ b/openapi/components/schemas/MultiPolygon.yaml @@ -0,0 +1,19 @@ +type: object +description: A geojson implementation of a MultiPolygon Simple Feature +properties: + type: + type: string + enum: + - MultiPolygon + coordinates: + type: array + description: Array of polygon coordinate arrays. + items: + type: array + items: + type: array + items: + $ref: ./Position.yaml +required: + - type + - coordinates diff --git a/openapi/components/schemas/Page.yaml b/openapi/components/schemas/Page.yaml new file mode 100644 index 0000000..0f6b099 --- /dev/null +++ b/openapi/components/schemas/Page.yaml @@ -0,0 +1,35 @@ +type: object +properties: + limit: + type: integer + description: >- + The limit used for the response. Defaults to 20 when the request does not + specify one. + minimum: 1 + maximum: 100 + example: 20 + offset: + type: integer + description: >- + The offset used for the response. Defaults to 0 when the request does not + specify one. + minimum: 0 + example: 0 + total: + type: integer + description: >- + The number of rows returned in the response. If the total is less than the + limit, the user is on the last page and no more results match the query. + minimum: 0 + example: 10 + order: + type: string + description: >- + The criteria used to sort the results. Defaults to the primary key of the + table, ascending + example: bbl +required: + - limit + - offset + - total + - order diff --git a/openapi/components/schemas/Position.yaml b/openapi/components/schemas/Position.yaml new file mode 100644 index 0000000..3e30e12 --- /dev/null +++ b/openapi/components/schemas/Position.yaml @@ -0,0 +1,9 @@ +type: array +description: The fundamental spatial construct +minItems: 2 +maxItems: 3 +items: + type: number +example: + - -74.010835 + - 40.708442 diff --git a/openapi/components/schemas/TaxLot.yaml b/openapi/components/schemas/TaxLot.yaml new file mode 100644 index 0000000..9e39f79 --- /dev/null +++ b/openapi/components/schemas/TaxLot.yaml @@ -0,0 +1,36 @@ +type: object +properties: + bbl: + type: string + description: >- + The ten character code compromised of a one character borough, five + character block, and four character lot codes. + pattern: ^([0-9]{10})$ + example: '1000477501' + borough: + $ref: ./Borough.yaml + block: + type: string + description: The block code, without its padding zeros. + minLength: 1 + maxLength: 5 + example: 47 + lot: + type: string + description: The lot code, without its padding zeros. + minLength: 1 + maxLength: 4 + example: 7501 + address: + type: string + description: The street address. + example: 120 BROADWAY + landUse: + $ref: ./LandUse.yaml +required: + - bbl + - borough + - block + - lot + - address + - landUse diff --git a/openapi/components/schemas/TaxLotBasic.yaml b/openapi/components/schemas/TaxLotBasic.yaml new file mode 100644 index 0000000..779d638 --- /dev/null +++ b/openapi/components/schemas/TaxLotBasic.yaml @@ -0,0 +1,47 @@ +type: object +properties: + bbl: + type: string + description: >- + The ten character code compromised of a one character borough, five + character block, and four character lot codes. + pattern: ^([0-9]{10})$ + example: '1000477501' + boroughId: + type: string + description: >- + A single character numeric string containing the common number used to + refer to the borough. Possible values are 1-5. + pattern: ^([0-9])$ + example: 1 + block: + type: string + description: The block code, without its padding zeros. + minLength: 1 + maxLength: 5 + example: 47 + lot: + type: string + description: The lot code, without its padding zeros. + minLength: 1 + maxLength: 4 + example: 7501 + address: + type: string + description: The street address. + example: 120 BROADWAY + landUseId: + type: string + description: >- + The two character code to represent the land use. Possible values are + 01-11. + minLength: 2 + maxLength: 2 + example: '05' +required: + - bbl + - boroughId + - block + - lot + - address + - landUseId diff --git a/openapi/components/schemas/TaxLotBasicPage.yaml b/openapi/components/schemas/TaxLotBasicPage.yaml new file mode 100644 index 0000000..f9eb29e --- /dev/null +++ b/openapi/components/schemas/TaxLotBasicPage.yaml @@ -0,0 +1,10 @@ +allOf: + - $ref: ./Page.yaml + - type: object + properties: + taxLots: + type: array + items: + $ref: ./TaxLotBasic.yaml + required: + - taxLots diff --git a/openapi/components/schemas/TaxLotGeoJson.yaml b/openapi/components/schemas/TaxLotGeoJson.yaml new file mode 100644 index 0000000..8269f99 --- /dev/null +++ b/openapi/components/schemas/TaxLotGeoJson.yaml @@ -0,0 +1,21 @@ +type: object +properties: + id: + type: string + description: The bbl of the tax lot. + minLength: 10 + maxLength: 10 + example: '1000477501' + type: + type: string + enum: + - Feature + geometry: + $ref: ./MultiPolygon.yaml + properties: + $ref: ./TaxLot.yaml +required: + - id + - type + - geometry + - properties diff --git a/openapi/components/schemas/ZoningDistrict.yaml b/openapi/components/schemas/ZoningDistrict.yaml new file mode 100644 index 0000000..d60a84b --- /dev/null +++ b/openapi/components/schemas/ZoningDistrict.yaml @@ -0,0 +1,16 @@ +type: object +properties: + id: + type: string + description: An automatically generated uuid. + format: uuid + example: d1c09f3a-553b-4574-811e-abd59d19e01b + label: + type: string + description: >- + The zoning codes that apply to the district. Multiple codes are + concatenated with a slash. + example: M1-5/R7-3 +required: + - id + - label diff --git a/openapi/components/schemas/ZoningDistrictClass.yaml b/openapi/components/schemas/ZoningDistrictClass.yaml new file mode 100644 index 0000000..a0274a4 --- /dev/null +++ b/openapi/components/schemas/ZoningDistrictClass.yaml @@ -0,0 +1,26 @@ +type: object +properties: + id: + type: string + description: The code associated with the Zoning class. + pattern: ^[A-Z][0-9]+$ + example: M1 + category: + $ref: ./ZoningDistrictClassCategory.yaml + description: + type: string + description: Zoning class descriptions. + url: + type: string + description: Planning website page that explains the Zoning District + color: + type: string + description: Zoning classes from layer groups. + pattern: ^#([A-Fa-f0-9]{8})$ + example: '#f3b3ffff' +required: + - id + - category + - description + - url + - color diff --git a/openapi/components/schemas/ZoningDistrictClassCategory.yaml b/openapi/components/schemas/ZoningDistrictClassCategory.yaml new file mode 100644 index 0000000..65bd811 --- /dev/null +++ b/openapi/components/schemas/ZoningDistrictClassCategory.yaml @@ -0,0 +1,6 @@ +type: string +enum: + - Residential + - Commercial + - Manufacturing +description: The type of zoning district. diff --git a/openapi/components/schemas/ZoningDistrictClassCategoryColor.yaml b/openapi/components/schemas/ZoningDistrictClassCategoryColor.yaml new file mode 100644 index 0000000..2e7f358 --- /dev/null +++ b/openapi/components/schemas/ZoningDistrictClassCategoryColor.yaml @@ -0,0 +1,12 @@ +type: object +properties: + category: + $ref: ./ZoningDistrictClassCategory.yaml + color: + type: string + description: The color for the zoning district class category. + pattern: ^#([A-Fa-f0-9]{8})$ + example: '#f3b3ffff' +required: + - category + - color diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index a554c0a..50323cf 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -1,11 +1,10 @@ openapi: 3.0.0 info: title: Zoning API - description: |- - An API for serving data related to the zoning of New York City. + description: An API for serving data related to the zoning of New York City. version: 0.1.0 servers: - - url: https://zoning.planningdigital.com/api + - url: https://zoning.planningdigital.com/api security: [] tags: - name: Agencies @@ -19,9 +18,13 @@ tags: - name: Capital Projects description: An endpoint that returns or is otherwise related to capital projects - name: City Council Districts - description: An endpoint that returns or is otherwise related to NYC city council districts + description: >- + An endpoint that returns or is otherwise related to NYC city council + districts - name: Community Districts - description: An endpoint that returns or is otherwise related to NYC community districts + description: >- + An endpoint that returns or is otherwise related to NYC community + districts - name: GeoJSON description: An endpoint that returns spatial data in a geojson format - name: Land Uses @@ -34,1418 +37,63 @@ tags: description: An endpoint that returns or is otherwise related to zoning districts paths: /agencies: - get: - summary: Find agencies - operationId: findAgencies - tags: - - Agencies - responses: - '200': - description: An object containing all agencies. - content: - application/json: - schema: - type: object - properties: - agencies: - type: array - items: - $ref: '#/components/schemas/Agency' - required: - - agencies - '400': - $ref: "#/components/responses/BadRequest" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/agencies.yaml /boroughs: - get: - summary: List boroughs - operationId: findBoroughs - tags: - - Boroughs - responses: - '200': - description: An object containing all boroughs. - content: - application/json: - schema: - type: object - properties: - boroughs: - type: array - items: - $ref: '#/components/schemas/Borough' - required: - - boroughs - '400': - $ref: "#/components/responses/BadRequest" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/boroughs.yaml /boroughs/{boroughId}/community-districts: - get: - summary: Find community districts within a borough - operationId: findCommunityDistrictsByBoroughId - tags: - - Community Districts - parameters: - - $ref: "#/components/parameters/boroughIdParam" - responses: - '200': - description: An object of community district schemas for the borough - content: - application/json: - schema: - type: object - properties: - communityDistricts: - type: array - items: - $ref: '#/components/schemas/CommunityDistrict' - order: - type: string - description: Community district numbers are sorted in ascending order - example: 'id' - required: - - communityDistricts - - order - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/boroughs_{boroughId}_community-districts.yaml /boroughs/{boroughId}/community-districts/{communityDistrictId}/geojson: - get: - summary: Find GeoJson for a specific community district - operationId: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId - tags: - - Community Districts - - GeoJSON - parameters: - - $ref: "#/components/parameters/boroughIdParam" - - $ref: "#/components/parameters/communityDistrictIdParam" - responses: - '200': - description: a community district geojson object - content: - application/json: - schema: - $ref: '#/components/schemas/CommunityDistrictGeoJson' - '400': - $ref: '#/components/responses/BadRequest' - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: '#/components/responses/InternalServerError' + $ref: >- + paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_geojson.yaml /boroughs/{boroughId}/community-districts/{communityDistrictId}/capital-projects: - get: - summary: Find paginated capital projects within a specified community district - operationId: findCapitalProjectsByBoroughIdCommunityDistrictId - tags: - - Capital Projects - parameters: - - $ref: "#/components/parameters/boroughIdParam" - - $ref: "#/components/parameters/communityDistrictIdParam" - - $ref: "#/components/parameters/limitParam" - - $ref: "#/components/parameters/offsetParam" - responses: - '200': - description: An object containing pagination metadata and an array of capital projects for the community district - content: - application/json: - schema: - $ref: "#/components/schemas/CapitalProjectPage" - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: >- + paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects.yaml /boroughs/{boroughId}/community-districts/{communityDistrictId}/capital-projects/{z}/{x}/{y}.pbf: - get: - summary: Mapbox Vector Tiles for capital projects intersecting a community district - operationId: findCapitalProjectTilesByBoroughIdCommunityDistrictId - tags: - - MVT - - Capital Projects - - Community Districts - parameters: - - $ref: "#/components/parameters/boroughIdParam" - - $ref: "#/components/parameters/communityDistrictIdParam" - - $ref: '#/components/parameters/viewportZoomParam' - - $ref: '#/components/parameters/viewportXParam' - - $ref: '#/components/parameters/viewportYParam' - responses: - '200': - $ref: '#/components/responses/MVT' - '400': - $ref: '#/components/responses/BadRequest' - '500': - $ref: '#/components/responses/InternalServerError' + $ref: >- + paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml /capital-commitment-types: - get: - summary: Capital Commitment Types - operationId: findCapitalCommitmentTypes - tags: - - Capital Commitment Types - responses: - '200': - description: An object containing all capital commitment types. - content: - application/json: - schema: - type: object - properties: - capitalCommitmentTypes: - type: array - items: - $ref: '#/components/schemas/CapitalCommitmentType' - required: - - capitalCommitmentTypes - '400': - $ref: "#/components/responses/BadRequest" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/capital-commitment-types.yaml /capital-projects/{managingCode}/{capitalProjectId}/capital-commitments: - get: - summary: Find capital commitments associated with a specific capital project - operationId: findCapitalCommitmentsByManagingCodeCapitalProjectId - tags: - - Capital Commitments - parameters: - - $ref: '#/components/parameters/managingCodeParam' - - $ref: '#/components/parameters/capitalProjectIdParam' - responses: - '200': - description: an object of capital commitments for the capital project - content: - application/json: - schema: - type: object - properties: - capitalCommitments: - type: array - items: - $ref: '#/components/schemas/CapitalCommitment' - order: - type: string - description: Capital commitment dates are sorted in ascending order - example: 'plannedDate' - required: - - capitalCommitments - - order - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: >- + paths/capital-projects_{managingCode}_{capitalProjectId}_capital-commitments.yaml /capital-projects/{managingCode}/{capitalProjectId}/geojson: - get: - summary: Find a single capital project as a geojson feature - operationId: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId - tags: - - Capital Projects - - GeoJSON - parameters: - - $ref: '#/components/parameters/managingCodeParam' - - $ref: '#/components/parameters/capitalProjectIdParam' - responses: - '200': - description: A capital project geojson object - content: - application/json: - schema: - $ref: '#/components/schemas/CapitalProjectBudgetedGeoJson' - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/capital-projects_{managingCode}_{capitalProjectId}_geojson.yaml /capital-projects/{managingCode}/{capitalProjectId}: - get: - summary: Find details about a specific capital project - operationId: findCapitalProjectByManagingCodeCapitalProjectId - tags: - - Capital Projects - parameters: - - $ref: "#/components/parameters/managingCodeParam" - - $ref: "#/components/parameters/capitalProjectIdParam" - responses: - '200': - description: An object of capital project details - content: - application/json: - schema: - $ref: '#/components/schemas/CapitalProjectBudgeted' - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/capital-projects_{managingCode}_{capitalProjectId}.yaml /capital-projects/{z}/{x}/{y}.pbf: - get: - summary: Mapbox Vector Tiles for capital projects - operationId: findCapitalProjectTiles - tags: - - MVT - - Capital Projects - parameters: - - $ref: '#/components/parameters/viewportZoomParam' - - $ref: '#/components/parameters/viewportXParam' - - $ref: '#/components/parameters/viewportYParam' - responses: - '200': - $ref: '#/components/responses/MVT' - '400': - $ref: '#/components/responses/BadRequest' - '500': - $ref: '#/components/responses/InternalServerError' + $ref: paths/capital-projects_{z}_{x}_{y}.pbf.yaml /city-council-districts: - get: - summary: Find city council districts - operationId: findCityCouncilDistricts - tags: - - City Council Districts - responses: - '200': - description: an object of city council districts - content: - application/json: - schema: - type: object - properties: - cityCouncilDistricts: - type: array - items: - $ref: '#/components/schemas/CityCouncilDistrict' - order: - type: string - description: City council districts ids are sorted as if numbers in ascending order - example: 'id' - required: - - cityCouncilDistricts - - order - '400': - $ref: '#/components/responses/BadRequest' - '500': - $ref: '#/components/responses/InternalServerError' + $ref: paths/city-council-districts.yaml /city-council-districts/{cityCouncilDistrictId}/geojson: - get: - summary: Find GeoJson for a specific city council district - operationId: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId - tags: - - City Council Districts - - GeoJSON - parameters: - - $ref: "#/components/parameters/cityCouncilDistrictIdParam" - responses: - '200': - description: a city council district geojson object - content: - application/json: - schema: - $ref: '#/components/schemas/CityCouncilDistrictGeoJson' - '400': - $ref: '#/components/responses/BadRequest' - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: '#/components/responses/InternalServerError' + $ref: paths/city-council-districts_{cityCouncilDistrictId}_geojson.yaml /city-council-districts/{cityCouncilDistrictId}/capital-projects/{z}/{x}/{y}.pbf: - get: - summary: Mapbox Vector Tiles for capital projects intersecting a city council district - operationId: findCapitalProjectTilesByCityCouncilDistrictId - tags: - - MVT - - Capital Projects - - City Council Districts - parameters: - - $ref: "#/components/parameters/cityCouncilDistrictIdParam" - - $ref: '#/components/parameters/viewportZoomParam' - - $ref: '#/components/parameters/viewportXParam' - - $ref: '#/components/parameters/viewportYParam' - responses: - '200': - $ref: '#/components/responses/MVT' - '400': - $ref: '#/components/responses/BadRequest' - '500': - $ref: '#/components/responses/InternalServerError' + $ref: >- + paths/city-council-districts_{cityCouncilDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml /city-council-districts/{cityCouncilDistrictId}/capital-projects: - get: - summary: Find paginated capital projects within a specific city council district. - operationId: findCapitalProjectsByCityCouncilId - tags: - - Capital Projects - parameters: - - $ref: "#/components/parameters/cityCouncilDistrictIdParam" - - $ref: "#/components/parameters/limitParam" - - $ref: "#/components/parameters/offsetParam" - responses: - '200': - description: An object containing pagination metadata and an array of capital projects for the city council district - content: - application/json: - schema: - $ref: "#/components/schemas/CapitalProjectPage" - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/city-council-districts_{cityCouncilDistrictId}_capital-projects.yaml /city-council-districts/{z}/{x}/{y}.pbf: - get: - summary: Mapbox Vector Tiles for city council districts - operationId: findCityCouncilDistrictTiles - tags: - - MVT - - City Council Districts - parameters: - - $ref: '#/components/parameters/viewportZoomParam' - - $ref: '#/components/parameters/viewportXParam' - - $ref: '#/components/parameters/viewportYParam' - responses: - '200': - $ref: '#/components/responses/MVT' - '400': - $ref: '#/components/responses/BadRequest' - '500': - $ref: '#/components/responses/InternalServerError' + $ref: paths/city-council-districts_{z}_{x}_{y}.pbf.yaml /community-districts/{z}/{x}/{y}.pbf: - get: - summary: Mapbox Vector Tiles for community districts - operationId: findCommunityDistrictTiles - tags: - - MVT - - Community Districts - parameters: - - $ref: '#/components/parameters/viewportZoomParam' - - $ref: '#/components/parameters/viewportXParam' - - $ref: '#/components/parameters/viewportYParam' - responses: - '200': - $ref: '#/components/responses/MVT' - '400': - $ref: '#/components/responses/BadRequest' - '500': - $ref: '#/components/responses/InternalServerError' + $ref: paths/community-districts_{z}_{x}_{y}.pbf.yaml /land-uses: - get: - summary: List land uses - operationId: findLandUses - tags: - - Land Uses - responses: - '200': - description: An object containing all land uses. - content: - application/json: - schema: - type: object - properties: - landUses: - type: array - items: - $ref: '#/components/schemas/LandUse' - required: - - landUses - '400': - $ref: "#/components/responses/BadRequest" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/land-uses.yaml /tax-lots: - get: - summary: Non-spatial details for tax lots - operationId: findTaxLots - tags: - - Tax Lots - parameters: - - $ref: "#/components/parameters/limitParam" - - $ref: "#/components/parameters/offsetParam" - - $ref: "#/components/parameters/geometryParam" - - $ref: "#/components/parameters/lonsParam" - - $ref: "#/components/parameters/latsParam" - - $ref: "#/components/parameters/bufferParam" - responses: - '200': - description: An object containing a list of tax lots and pagination metadata. - An optional spatial filter will return all tax lots that intersect the spatial feature and its optional buffer. - When applying a spatial filter, tax lots are ordered by their closeness to the spatial feature. - content: - application/json: - schema: - $ref: "#/components/schemas/TaxLotBasicPage" - '400': - $ref: "#/components/responses/BadRequest" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/tax-lots.yaml /tax-lots/{bbl}: - get: - summary: Non-spatial details for a specific tax lot - operationId: findTaxLotByBbl - tags: - - Tax Lots - parameters: - - $ref: "#/components/parameters/bblParam" - responses: - '200': - description: A tax lot object - content: - application/json: - schema: - $ref: '#/components/schemas/TaxLot' - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/tax-lots_{bbl}.yaml /tax-lots/{bbl}/geojson: - get: - summary: GeoJSON for a specific tax lot - operationId: findTaxLotGeoJsonByBbl - tags: - - Tax Lots - - GeoJSON - parameters: - - $ref: "#/components/parameters/bblParam" - responses: - '200': - description: A tax lot geojson object - content: - application/json: - schema: - $ref: '#/components/schemas/TaxLotGeoJson' - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/tax-lots_{bbl}_geojson.yaml /tax-lots/{bbl}/zoning-districts: - get: - summary: Non-spatial details for zoning districts that spatially intersect a tax lot. - operationId: findZoningDistrictsByTaxLotBbl - tags: - - Tax Lots - - Zoning Districts - parameters: - - $ref: "#/components/parameters/bblParam" - responses: - '200': - description: An object containing zoning districts. - content: - application/json: - schema: - type: object - properties: - zoningDistricts: - type: array - items: - $ref: '#/components/schemas/ZoningDistrict' - required: - - zoningDistricts - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/tax-lots_{bbl}_zoning-districts.yaml /tax-lots/{bbl}/zoning-districts/classes: - get: - summary: Class schemas for all zoning districts that spatially intersect the tax lot - operationId: findZoningDistrictClassesByTaxLotBbl - tags: - - Tax Lots - - Zoning Districts - parameters: - - $ref: "#/components/parameters/bblParam" - responses: - '200': - description: An object containing zoning district class schemas. - content: - application/json: - schema: - type: object - properties: - zoningDistrictClasses: - type: array - items: - $ref: '#/components/schemas/ZoningDistrictClass' - required: - - zoningDistrictClasses - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/tax-lots_{bbl}_zoning-districts_classes.yaml /zoning-districts/{id}: - get: - summary: Non-spatial details for a specific zoning district - operationId: findZoningDistrictByZoningDistrictId - tags: - - Zoning Districts - parameters: - - name: id - in: path - required: true - schema: - type: string - format: uuid - responses: - '200': - description: A zoning district object - content: - application/json: - schema: - $ref: '#/components/schemas/ZoningDistrict' - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/zoning-districts_{id}.yaml /zoning-districts/{id}/classes: - get: - summary: Class schemas for the specified zoning district - operationId: findZoningDistrictClassesByZoningDistrictId - tags: - - Zoning Districts - parameters: - - name: id - in: path - required: true - schema: - type: string - format: uuid - responses: - '200': - description: An object of class schemas for the zoning district. - content: - application/json: - schema: - type: object - properties: - zoningDistrictClasses: - type: array - items: - $ref: '#/components/schemas/ZoningDistrictClass' - required: - - zoningDistrictClasses - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/zoning-districts_{id}_classes.yaml /zoning-district-classes: - get: - summary: Class schemas for all zoning districts - operationId: findZoningDistrictClasses - tags: - - Zoning Districts - responses: - '200': - description: An object containing all zoning district class schemas. - content: - application/json: - schema: - type: object - properties: - zoningDistrictClasses: - type: array - items: - $ref: "#/components/schemas/ZoningDistrictClass" - required: - - zoningDistrictClasses - '400': - $ref: "#/components/responses/BadRequest" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/zoning-district-classes.yaml /zoning-district-classes/category-colors: - get: - summary: List of color and class category - operationId: findZoningDistrictClassCategoryColors - tags: - - Zoning Districts - responses: - '200': - description: An object containing all zoning district category colors. - content: - application/json: - schema: - type: object - properties: - zoningDistrictClassCategoryColors: - type: array - items: - $ref: "#/components/schemas/ZoningDistrictClassCategoryColor" - required: - - zoningDistrictClassCategoryColors - '400': - $ref: "#/components/responses/BadRequest" - '500': - $ref: "#/components/responses/InternalServerError" + $ref: paths/zoning-district-classes_category-colors.yaml /zoning-district-classes/{id}: - get: - summary: Class schema for the specified class - operationId: findZoningDistrictClassByZoningDistrictClassId - tags: - - Zoning Districts - parameters: - - name: id - in: path - required: true - schema: - type: string - pattern: ^[A-z][0-9]+$ - responses: - '200': - description: A class schema for a zoning district - content: - application/json: - schema: - $ref: "#/components/schemas/ZoningDistrictClass" - '400': - $ref: "#/components/responses/BadRequest" - '404': - $ref: "#/components/responses/NotFound" - '500': - $ref: "#/components/responses/InternalServerError" -components: - parameters: - bblParam: - name: bbl - required: true - in: path - schema: - type: string - pattern: '^([0-9]{10})$' - example: '1000477501' - description: The ten character code compromised of a one character borough, five character block, and four character lot codes. - boroughIdParam: - name: boroughId - required: true - in: path - schema: - type: string - pattern: '^([0-9]{1})$' - example: '1' - description: A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5. - bufferParam: - name: buffer - in: query - schema: - type: number - example: 600 - description: A buffer around the spatial feature. Units are feet. It is optional when applying a spatial filter. - capitalProjectIdParam: - name: capitalProjectId - required: true - in: path - schema: - type: string - example: 'HWPEDSF5' - description: The id for the project, which combines with the managing code to make a unique id - cityCouncilDistrictIdParam: - name: cityCouncilDistrictId - required: true - in: path - schema: - type: string - pattern: '^([0-9]{1,2})$' - example: '25' - description: One or two character code to represent city council districts. - communityDistrictIdParam: - name: communityDistrictId - required: true - in: path - schema: - type: string - pattern: '^([0-9]{2})$' - example: '01' - description: The two character numeric string containing the number used to refer to the community district. - geometryParam: - name: geometry - required: false - in: query - schema: - type: string - enum: - - Point - - LineString - - Polygon - example: Polygon - description: The type of geometry used for a spatial filter. It must be provided when applying a spatial filter; each geometry has its own coordinate requirements. - Point geometries have length of 1. - LineString geometries have length of 2 to 5, inclusive. - Polygons have length 4 to 5, inclusive; the last coordinate must match the first coordinate to close the polygon. - lonsParam: - name: lons - required: false - in: query - schema: - type: array - items: - type: number - minItems: 1 - maxItems: 5 - example: -74.010776,-74.010776,-74.010139,-74.010139,-74.010776 - style: form - explode: false - description: The longitude portion of coordinates. It must be provided when applying a spatial filter and have the same length as the latitudes. - (If using a tool like axios, serializing the array with brackets is also supported. ex; lons[]=-74.010776&lons[]=-74.010776) - latsParam: - name: lats - required: false - in: query - schema: - type: array - items: - type: number - minItems: 1 - maxItems: 5 - style: form - explode: false - example: 40.708649,40.707800,40.707800,40.708649,40.708649 - description: The latitude portion of coordinates. It must be provided when applying a spatial filter and have the same length as the longitudes. - (If using a tool like axios, serializing the array with brackets is also supported. ex; lats[]=40.708649&lats[]=40.707800) - limitParam: - name: limit - required: false - in: query - schema: - type: integer - minimum: 1 - maximum: 100 - example: 100 - description: The maximum number of results to be returned in each response. The default value is 20. It must be between 1 and 100, inclusive. - offsetParam: - name: offset - required: false - in: query - schema: - type: integer - minimum: 0 - example: 100 - description: The position in the full list to begin returning results. Default offset is 0. If the offset is beyond the end of the list, no results will be returned. - managingCodeParam: - name: managingCode - required: true - in: path - schema: - type: string - pattern: '^([0-9]{3})$' - example: '801' - description: Three character string of numbers representing managing agency - viewportXParam: - name: x - in: path - description: viewport x component - required: true - schema: - type: integer - example: 1000 - viewportYParam: - name: y - in: path - description: viewport y component - required: true - schema: - type: integer - example: 1000 - viewportZoomParam: - name: z - in: path - description: viewport zoom component - required: true - schema: - type: integer - example: 7 - schemas: - Agency: - type: object - properties: - initials: - type: string - description: A string of variable length containing the initials of the agency. - example: DOT - name: - type: string - description: The full name of the agency. - example: Department of Transportation - required: - - initials - - name - Borough: - type: object - properties: - id: - type: string - description: A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5. - pattern: '^([0-9])$' - example: 1 - title: - type: string - description: The full name of the borough. - example: Manhattan - abbr: - type: string - description: The two character abbreviation for the borough. - minLength: 2 - maxLength: 2 - example: MN - required: - - id - - title - - abbr - CapitalCommitmentType: - type: object - properties: - code: - type: string - description: The four character code to represent the capital commitment type - minLength: 4 - maxLength: 4 - example: CONS - description: - type: string - description: The description of the capital commitment type. - example: CONSTRUCTION - required: - - code - - description - CapitalCommitment: - type: object - properties: - id: - type: string - description: A uuid used to refer to the capital commitment. - format: uuid - type: - type: string - description: A four character string used to refer to the commitment type. - pattern: '^([A-z]{4})$' - example: DSGN - plannedDate: - type: string - format: date - description: A string used to refer to the date when the commitment is projected to be committed. - example: '2012-04-23' - budgetLineCode: - type: string - description: A string used to refer to the budget line. - example: "HW" - budgetLineId: - type: string - description: A string used to refer to the budget line. - example: '0002Q' - sponsoringAgency: - type: string - nullable: true - description: A string of variable length containing the initials of the sponsoring agency. - example: DOT - budgetType: - type: string - nullable: true - description: A string of variable length denoting the type of budget. - example: 'Highways' - totalValue: - type: number - description: A numeric string used to refer to the amount of total planned commitments. - example: 1600000 - required: - - id - - type - - plannedDate - - budgetLineCode - - budgetLineId - - sponsoringAgency - - budgetType - - totalValue - CapitalProjectCategory: - type: string - nullable: true - enum: - - Fixed Asset - - Lump Sum - - ITT, Vehicles and Equipment - - null - description: The type of Capital Project. - CapitalProject: - type: object - properties: - id: - type: string - description: The id for the project, which combines with the managing code to make a unique id - example: 'HWPEDSF5' - description: - type: string - description: The capital project title. - example: 'Multi-Site Pedestrian Safety Phase 5' - managingCode: - type: string - description: Three character string of numbers representing managing agency - pattern: '^([0-9]{3})$' - example: 850 - managingAgency: - type: string - description: The managing agency name abbreviation or acronym - example: 'DOT' - minDate: - type: string - format: date - description: The starting date of the capital project - example: '2024-05-15' - maxDate: - type: string - format: date - description: The ending date of the capital project - example: '2024-05-15' - category: - $ref: '#/components/schemas/CapitalProjectCategory' - nullable: true - required: - - id - - description - - managingCode - - managingAgency - - minDate - - maxDate - - category - CapitalProjectPage: - allOf: - - $ref: '#/components/schemas/Page' - - type: object - properties: - capitalProjects: - type: array - items: - $ref: '#/components/schemas/CapitalProject' - required: - - capitalProjects - CapitalProjectBudgeted: - allOf: - - $ref: '#/components/schemas/CapitalProject' - - type: object - properties: - commitmentsTotal: - type: number - description: The sum total of commitments for the capital project - example: 200000 - sponsoringAgencies: - type: array - items: - type: string - description: An array containing string values representing the sponsoring agencies initials. - example: ["DOT"] - budgetTypes: - type: array - items: - type: string - description: An array containing string values representing the budget types. - example: ["Highways", "Highway Bridges"] - required: - - commitmentsTotal - - sponsoringAgencies - - budgetTypes - CapitalProjectBudgetedGeoJson: - type: object - properties: - id: - type: string - description: The concatenation of the managing code and capital project id. - example: '806RAMALG' - type: - type: string - enum: - - Feature - geometry: - oneOf: - - $ref: '#/components/schemas/MultiPoint' - - $ref: '#/components/schemas/MultiPolygon' - properties: - $ref: '#/components/schemas/CapitalProjectBudgeted' - required: - - id - - type - - geometry - - properties - CityCouncilDistrict: - type: object - properties: - id: - type: string - description: One or two character code to represent city council districts. - pattern: '^([0-9]{1,2})$' - example: '25' - required: - - id - CityCouncilDistrictGeoJson: - type: object - properties: - id: - type: string - description: One or two character code to represent city council districts. - pattern: '^([0-9]{1,2})$' - example: 25 - type: - type: string - enum: - - Feature - properties: - $ref: '#/components/schemas/CityCouncilDistrict' - geometry: - $ref: '#/components/schemas/MultiPolygon' - required: - - id - - type - - geometry - - properties - CommunityDistrict: - type: object - properties: - id: - type: string - description: The two character numeric string containing the number used to refer to the community district. - pattern: '^([0-9]{2})$' - example: 01 - boroughId: - type: string - description: A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5. - pattern: '^([0-9])$' - example: 1 - required: - - id - - boroughId - CommunityDistrictGeoJson: - type: object - properties: - id: - type: string - description: Three character code to represent a borough and community district. - pattern: '^([0-9]{3})$' - example: 101 - type: - type: string - enum: - - Feature - properties: - $ref: '#/components/schemas/CommunityDistrict' - geometry: - $ref: '#/components/schemas/MultiPolygon' - required: - - id - - type - - geometry - - properties - LandUse: - type: object - properties: - id: - type: string - description: The two character code to represent the land use. Possible values are 01-11. - minLength: 2 - maxLength: 2 - example: '05' - description: - type: string - description: The description of the land use. - example: Commercial and Office Buildings - color: - type: string - description: Hex-style color code to represent the land use. - pattern: '^#([A-Fa-f0-9]{8})$' - example: '#fc2929ff' - required: - - id - - description - - color - TaxLot: - type: object - properties: - bbl: - type: string - description: The ten character code compromised of a one character borough, five character block, and four character lot codes. - pattern: '^([0-9]{10})$' - example: '1000477501' - borough: - $ref: '#/components/schemas/Borough' - block: - type: string - description: The block code, without its padding zeros. - minLength: 1 - maxLength: 5 - example: 47 - lot: - type: string - description: The lot code, without its padding zeros. - minLength: 1 - maxLength: 4 - example: 7501 - address: - type: string - description: The street address. - example: 120 BROADWAY - landUse: - $ref: '#/components/schemas/LandUse' - required: - - bbl - - borough - - block - - lot - - address - - landUse - TaxLotBasic: - type: object - properties: - bbl: - type: string - description: The ten character code compromised of a one character borough, five character block, and four character lot codes. - pattern: '^([0-9]{10})$' - example: '1000477501' - boroughId: - type: string - description: A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5. - pattern: '^([0-9])$' - example: 1 - block: - type: string - description: The block code, without its padding zeros. - minLength: 1 - maxLength: 5 - example: 47 - lot: - type: string - description: The lot code, without its padding zeros. - minLength: 1 - maxLength: 4 - example: 7501 - address: - type: string - description: The street address. - example: 120 BROADWAY - landUseId: - type: string - description: The two character code to represent the land use. Possible values are 01-11. - minLength: 2 - maxLength: 2 - example: '05' - required: - - bbl - - boroughId - - block - - lot - - address - - landUseId - TaxLotGeoJson: - type: object - properties: - id: - type: string - description: The bbl of the tax lot. - minLength: 10 - maxLength: 10 - example: '1000477501' - type: - type: string - enum: - - Feature - geometry: - $ref: '#/components/schemas/MultiPolygon' - properties: - $ref: '#/components/schemas/TaxLot' - required: - - id - - type - - geometry - - properties - ZoningDistrict: - type: object - properties: - id: - type: string - description: An automatically generated uuid. - format: uuid - example: d1c09f3a-553b-4574-811e-abd59d19e01b - label: - type: string - description: The zoning codes that apply to the district. Multiple codes are concatenated with a slash. - example: M1-5/R7-3 - required: - - id - - label - ZoningDistrictClass: - type: object - properties: - id: - type: string - description: The code associated with the Zoning class. - pattern: ^[A-Z][0-9]+$ - example: M1 - category: - $ref: "#/components/schemas/ZoningDistrictClassCategory" - description: - type: string - description: Zoning class descriptions. - url: - type: string - description: Planning website page that explains the Zoning District - color: - type: string - description: Zoning classes from layer groups. - pattern: '^#([A-Fa-f0-9]{8})$' - example: '#f3b3ffff' - required: - - id - - category - - description - - url - - color - ZoningDistrictClassCategory: - type: string - enum: - - "Residential" - - "Commercial" - - "Manufacturing" - description: The type of zoning district. - ZoningDistrictClassCategoryColor: - type: object - properties: - category: - $ref: "#/components/schemas/ZoningDistrictClassCategory" - color: - type: string - description: The color for the zoning district class category. - pattern: '^#([A-Fa-f0-9]{8})$' - example: '#f3b3ffff' - required: - - category - - color - Position: - type: array - description: The fundamental spatial construct - minItems: 2 - maxItems: 3 - items: - type: number - example: [-74.010835, 40.708442] - MultiPoint: - type: object - description: A geojson implementation of a MultiPoint Simple Feature - properties: - type: - type: string - enum: - - "MultiPoint" - coordinates: - type: array - description: Array of position coordinate arrays. - items: - $ref: '#/components/schemas/Position' - required: - - type - - coordinates - MultiPolygon: - type: object - description: A geojson implementation of a MultiPolygon Simple Feature - properties: - type: - type: string - enum: - - "MultiPolygon" - coordinates: - type: array - description: Array of polygon coordinate arrays. - items: - type: array - items: - type: array - items: - $ref: '#/components/schemas/Position' - required: - - type - - coordinates - Error: - type: object - properties: - statusCode: - type: number - message: - type: string - error: - type: string - required: - - statusCode - - message - Page: - type: object - properties: - limit: - type: integer - description: The limit used for the response. Defaults to 20 when the request does not specify one. - minimum: 1 - maximum: 100 - example: 20 - offset: - type: integer - description: The offset used for the response. Defaults to 0 when the request does not specify one. - minimum: 0 - example: 0 - total: - type: integer - description: The number of rows returned in the response. If the total is less than the limit, the user is on the last page and no more results match the query. - minimum: 0 - example: 10 - order: - type: string - description: The criteria used to sort the results. Defaults to the primary key of the table, ascending - example: "bbl" - required: - - limit - - offset - - total - - order - TaxLotBasicPage: - allOf: - - $ref: "#/components/schemas/Page" - - type: object - properties: - taxLots: - type: array - items: - $ref: "#/components/schemas/TaxLotBasic" - required: - - taxLots - responses: - MVT: - description: A protobuf file formatted as Mapbox Vector Tile - content: - application/x-protobuf: - schema: - type: string - format: byte - BadRequest: - description: Invalid client request - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - InternalServerError: - description: Server side error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - NotFound: - description: Requested resource does not exist or is not available - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - + $ref: paths/zoning-district-classes_{id}.yaml diff --git a/openapi/paths/agencies.yaml b/openapi/paths/agencies.yaml new file mode 100644 index 0000000..858bd30 --- /dev/null +++ b/openapi/paths/agencies.yaml @@ -0,0 +1,23 @@ +get: + summary: Find agencies + operationId: findAgencies + tags: + - Agencies + responses: + '200': + description: An object containing all agencies. + content: + application/json: + schema: + type: object + properties: + agencies: + type: array + items: + $ref: ../components/schemas/Agency.yaml + required: + - agencies + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/boroughs.yaml b/openapi/paths/boroughs.yaml new file mode 100644 index 0000000..1ae71e5 --- /dev/null +++ b/openapi/paths/boroughs.yaml @@ -0,0 +1,23 @@ +get: + summary: List boroughs + operationId: findBoroughs + tags: + - Boroughs + responses: + '200': + description: An object containing all boroughs. + content: + application/json: + schema: + type: object + properties: + boroughs: + type: array + items: + $ref: ../components/schemas/Borough.yaml + required: + - boroughs + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/boroughs_{boroughId}_community-districts.yaml b/openapi/paths/boroughs_{boroughId}_community-districts.yaml new file mode 100644 index 0000000..426f816 --- /dev/null +++ b/openapi/paths/boroughs_{boroughId}_community-districts.yaml @@ -0,0 +1,32 @@ +get: + summary: Find community districts within a borough + operationId: findCommunityDistrictsByBoroughId + tags: + - Community Districts + parameters: + - $ref: ../components/parameters/boroughIdParam.yaml + responses: + '200': + description: An object of community district schemas for the borough + content: + application/json: + schema: + type: object + properties: + communityDistricts: + type: array + items: + $ref: ../components/schemas/CommunityDistrict.yaml + order: + type: string + description: Community district numbers are sorted in ascending order + example: id + required: + - communityDistricts + - order + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects.yaml b/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects.yaml new file mode 100644 index 0000000..fa1643a --- /dev/null +++ b/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects.yaml @@ -0,0 +1,25 @@ +get: + summary: Find paginated capital projects within a specified community district + operationId: findCapitalProjectsByBoroughIdCommunityDistrictId + tags: + - Capital Projects + parameters: + - $ref: ../components/parameters/boroughIdParam.yaml + - $ref: ../components/parameters/communityDistrictIdParam.yaml + - $ref: ../components/parameters/limitParam.yaml + - $ref: ../components/parameters/offsetParam.yaml + responses: + '200': + description: >- + An object containing pagination metadata and an array of capital + projects for the community district + content: + application/json: + schema: + $ref: ../components/schemas/CapitalProjectPage.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml b/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml new file mode 100644 index 0000000..1a4a702 --- /dev/null +++ b/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml @@ -0,0 +1,20 @@ +get: + summary: Mapbox Vector Tiles for capital projects intersecting a community district + operationId: findCapitalProjectTilesByBoroughIdCommunityDistrictId + tags: + - MVT + - Capital Projects + - Community Districts + parameters: + - $ref: ../components/parameters/boroughIdParam.yaml + - $ref: ../components/parameters/communityDistrictIdParam.yaml + - $ref: ../components/parameters/viewportZoomParam.yaml + - $ref: ../components/parameters/viewportXParam.yaml + - $ref: ../components/parameters/viewportYParam.yaml + responses: + '200': + $ref: ../components/responses/MVT.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_geojson.yaml b/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_geojson.yaml new file mode 100644 index 0000000..058ce60 --- /dev/null +++ b/openapi/paths/boroughs_{boroughId}_community-districts_{communityDistrictId}_geojson.yaml @@ -0,0 +1,22 @@ +get: + summary: Find GeoJson for a specific community district + operationId: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId + tags: + - Community Districts + - GeoJSON + parameters: + - $ref: ../components/parameters/boroughIdParam.yaml + - $ref: ../components/parameters/communityDistrictIdParam.yaml + responses: + '200': + description: a community district geojson object + content: + application/json: + schema: + $ref: ../components/schemas/CommunityDistrictGeoJson.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/capital-commitment-types.yaml b/openapi/paths/capital-commitment-types.yaml new file mode 100644 index 0000000..caa0321 --- /dev/null +++ b/openapi/paths/capital-commitment-types.yaml @@ -0,0 +1,23 @@ +get: + summary: Capital Commitment Types + operationId: findCapitalCommitmentTypes + tags: + - Capital Commitment Types + responses: + '200': + description: An object containing all capital commitment types. + content: + application/json: + schema: + type: object + properties: + capitalCommitmentTypes: + type: array + items: + $ref: ../components/schemas/CapitalCommitmentType.yaml + required: + - capitalCommitmentTypes + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}.yaml b/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}.yaml new file mode 100644 index 0000000..ef852dd --- /dev/null +++ b/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}.yaml @@ -0,0 +1,21 @@ +get: + summary: Find details about a specific capital project + operationId: findCapitalProjectByManagingCodeCapitalProjectId + tags: + - Capital Projects + parameters: + - $ref: ../components/parameters/managingCodeParam.yaml + - $ref: ../components/parameters/capitalProjectIdParam.yaml + responses: + '200': + description: An object of capital project details + content: + application/json: + schema: + $ref: ../components/schemas/CapitalProjectBudgeted.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}_capital-commitments.yaml b/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}_capital-commitments.yaml new file mode 100644 index 0000000..5e0e93d --- /dev/null +++ b/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}_capital-commitments.yaml @@ -0,0 +1,33 @@ +get: + summary: Find capital commitments associated with a specific capital project + operationId: findCapitalCommitmentsByManagingCodeCapitalProjectId + tags: + - Capital Commitments + parameters: + - $ref: ../components/parameters/managingCodeParam.yaml + - $ref: ../components/parameters/capitalProjectIdParam.yaml + responses: + '200': + description: an object of capital commitments for the capital project + content: + application/json: + schema: + type: object + properties: + capitalCommitments: + type: array + items: + $ref: ../components/schemas/CapitalCommitment.yaml + order: + type: string + description: Capital commitment dates are sorted in ascending order + example: plannedDate + required: + - capitalCommitments + - order + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}_geojson.yaml b/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}_geojson.yaml new file mode 100644 index 0000000..73bd2d2 --- /dev/null +++ b/openapi/paths/capital-projects_{managingCode}_{capitalProjectId}_geojson.yaml @@ -0,0 +1,22 @@ +get: + summary: Find a single capital project as a geojson feature + operationId: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId + tags: + - Capital Projects + - GeoJSON + parameters: + - $ref: ../components/parameters/managingCodeParam.yaml + - $ref: ../components/parameters/capitalProjectIdParam.yaml + responses: + '200': + description: A capital project geojson object + content: + application/json: + schema: + $ref: ../components/schemas/CapitalProjectBudgetedGeoJson.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/capital-projects_{z}_{x}_{y}.pbf.yaml b/openapi/paths/capital-projects_{z}_{x}_{y}.pbf.yaml new file mode 100644 index 0000000..f605d6a --- /dev/null +++ b/openapi/paths/capital-projects_{z}_{x}_{y}.pbf.yaml @@ -0,0 +1,17 @@ +get: + summary: Mapbox Vector Tiles for capital projects + operationId: findCapitalProjectTiles + tags: + - MVT + - Capital Projects + parameters: + - $ref: ../components/parameters/viewportZoomParam.yaml + - $ref: ../components/parameters/viewportXParam.yaml + - $ref: ../components/parameters/viewportYParam.yaml + responses: + '200': + $ref: ../components/responses/MVT.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/city-council-districts.yaml b/openapi/paths/city-council-districts.yaml new file mode 100644 index 0000000..f6b9462 --- /dev/null +++ b/openapi/paths/city-council-districts.yaml @@ -0,0 +1,30 @@ +get: + summary: Find city council districts + operationId: findCityCouncilDistricts + tags: + - City Council Districts + responses: + '200': + description: an object of city council districts + content: + application/json: + schema: + type: object + properties: + cityCouncilDistricts: + type: array + items: + $ref: ../components/schemas/CityCouncilDistrict.yaml + order: + type: string + description: >- + City council districts ids are sorted as if numbers in + ascending order + example: id + required: + - cityCouncilDistricts + - order + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/city-council-districts_{cityCouncilDistrictId}_capital-projects.yaml b/openapi/paths/city-council-districts_{cityCouncilDistrictId}_capital-projects.yaml new file mode 100644 index 0000000..8cc438d --- /dev/null +++ b/openapi/paths/city-council-districts_{cityCouncilDistrictId}_capital-projects.yaml @@ -0,0 +1,24 @@ +get: + summary: Find paginated capital projects within a specific city council district. + operationId: findCapitalProjectsByCityCouncilId + tags: + - Capital Projects + parameters: + - $ref: ../components/parameters/cityCouncilDistrictIdParam.yaml + - $ref: ../components/parameters/limitParam.yaml + - $ref: ../components/parameters/offsetParam.yaml + responses: + '200': + description: >- + An object containing pagination metadata and an array of capital + projects for the city council district + content: + application/json: + schema: + $ref: ../components/schemas/CapitalProjectPage.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/city-council-districts_{cityCouncilDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml b/openapi/paths/city-council-districts_{cityCouncilDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml new file mode 100644 index 0000000..cff1436 --- /dev/null +++ b/openapi/paths/city-council-districts_{cityCouncilDistrictId}_capital-projects_{z}_{x}_{y}.pbf.yaml @@ -0,0 +1,21 @@ +get: + summary: >- + Mapbox Vector Tiles for capital projects intersecting a city council + district + operationId: findCapitalProjectTilesByCityCouncilDistrictId + tags: + - MVT + - Capital Projects + - City Council Districts + parameters: + - $ref: ../components/parameters/cityCouncilDistrictIdParam.yaml + - $ref: ../components/parameters/viewportZoomParam.yaml + - $ref: ../components/parameters/viewportXParam.yaml + - $ref: ../components/parameters/viewportYParam.yaml + responses: + '200': + $ref: ../components/responses/MVT.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/city-council-districts_{cityCouncilDistrictId}_geojson.yaml b/openapi/paths/city-council-districts_{cityCouncilDistrictId}_geojson.yaml new file mode 100644 index 0000000..aaa50e2 --- /dev/null +++ b/openapi/paths/city-council-districts_{cityCouncilDistrictId}_geojson.yaml @@ -0,0 +1,21 @@ +get: + summary: Find GeoJson for a specific city council district + operationId: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId + tags: + - City Council Districts + - GeoJSON + parameters: + - $ref: ../components/parameters/cityCouncilDistrictIdParam.yaml + responses: + '200': + description: a city council district geojson object + content: + application/json: + schema: + $ref: ../components/schemas/CityCouncilDistrictGeoJson.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/city-council-districts_{z}_{x}_{y}.pbf.yaml b/openapi/paths/city-council-districts_{z}_{x}_{y}.pbf.yaml new file mode 100644 index 0000000..a2465d6 --- /dev/null +++ b/openapi/paths/city-council-districts_{z}_{x}_{y}.pbf.yaml @@ -0,0 +1,17 @@ +get: + summary: Mapbox Vector Tiles for city council districts + operationId: findCityCouncilDistrictTiles + tags: + - MVT + - City Council Districts + parameters: + - $ref: ../components/parameters/viewportZoomParam.yaml + - $ref: ../components/parameters/viewportXParam.yaml + - $ref: ../components/parameters/viewportYParam.yaml + responses: + '200': + $ref: ../components/responses/MVT.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/community-districts_{z}_{x}_{y}.pbf.yaml b/openapi/paths/community-districts_{z}_{x}_{y}.pbf.yaml new file mode 100644 index 0000000..d4a8a87 --- /dev/null +++ b/openapi/paths/community-districts_{z}_{x}_{y}.pbf.yaml @@ -0,0 +1,17 @@ +get: + summary: Mapbox Vector Tiles for community districts + operationId: findCommunityDistrictTiles + tags: + - MVT + - Community Districts + parameters: + - $ref: ../components/parameters/viewportZoomParam.yaml + - $ref: ../components/parameters/viewportXParam.yaml + - $ref: ../components/parameters/viewportYParam.yaml + responses: + '200': + $ref: ../components/responses/MVT.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/land-uses.yaml b/openapi/paths/land-uses.yaml new file mode 100644 index 0000000..fe94f01 --- /dev/null +++ b/openapi/paths/land-uses.yaml @@ -0,0 +1,23 @@ +get: + summary: List land uses + operationId: findLandUses + tags: + - Land Uses + responses: + '200': + description: An object containing all land uses. + content: + application/json: + schema: + type: object + properties: + landUses: + type: array + items: + $ref: ../components/schemas/LandUse.yaml + required: + - landUses + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/tax-lots.yaml b/openapi/paths/tax-lots.yaml new file mode 100644 index 0000000..afe6471 --- /dev/null +++ b/openapi/paths/tax-lots.yaml @@ -0,0 +1,27 @@ +get: + summary: Non-spatial details for tax lots + operationId: findTaxLots + tags: + - Tax Lots + parameters: + - $ref: ../components/parameters/limitParam.yaml + - $ref: ../components/parameters/offsetParam.yaml + - $ref: ../components/parameters/geometryParam.yaml + - $ref: ../components/parameters/lonsParam.yaml + - $ref: ../components/parameters/latsParam.yaml + - $ref: ../components/parameters/bufferParam.yaml + responses: + '200': + description: >- + An object containing a list of tax lots and pagination metadata. An + optional spatial filter will return all tax lots that intersect the + spatial feature and its optional buffer. When applying a spatial filter, + tax lots are ordered by their closeness to the spatial feature. + content: + application/json: + schema: + $ref: ../components/schemas/TaxLotBasicPage.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/tax-lots_{bbl}.yaml b/openapi/paths/tax-lots_{bbl}.yaml new file mode 100644 index 0000000..211e462 --- /dev/null +++ b/openapi/paths/tax-lots_{bbl}.yaml @@ -0,0 +1,20 @@ +get: + summary: Non-spatial details for a specific tax lot + operationId: findTaxLotByBbl + tags: + - Tax Lots + parameters: + - $ref: ../components/parameters/bblParam.yaml + responses: + '200': + description: A tax lot object + content: + application/json: + schema: + $ref: ../components/schemas/TaxLot.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/tax-lots_{bbl}_geojson.yaml b/openapi/paths/tax-lots_{bbl}_geojson.yaml new file mode 100644 index 0000000..00c7fd4 --- /dev/null +++ b/openapi/paths/tax-lots_{bbl}_geojson.yaml @@ -0,0 +1,21 @@ +get: + summary: GeoJSON for a specific tax lot + operationId: findTaxLotGeoJsonByBbl + tags: + - Tax Lots + - GeoJSON + parameters: + - $ref: ../components/parameters/bblParam.yaml + responses: + '200': + description: A tax lot geojson object + content: + application/json: + schema: + $ref: ../components/schemas/TaxLotGeoJson.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/tax-lots_{bbl}_zoning-districts.yaml b/openapi/paths/tax-lots_{bbl}_zoning-districts.yaml new file mode 100644 index 0000000..3f96ae6 --- /dev/null +++ b/openapi/paths/tax-lots_{bbl}_zoning-districts.yaml @@ -0,0 +1,28 @@ +get: + summary: Non-spatial details for zoning districts that spatially intersect a tax lot. + operationId: findZoningDistrictsByTaxLotBbl + tags: + - Tax Lots + - Zoning Districts + parameters: + - $ref: ../components/parameters/bblParam.yaml + responses: + '200': + description: An object containing zoning districts. + content: + application/json: + schema: + type: object + properties: + zoningDistricts: + type: array + items: + $ref: ../components/schemas/ZoningDistrict.yaml + required: + - zoningDistricts + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/tax-lots_{bbl}_zoning-districts_classes.yaml b/openapi/paths/tax-lots_{bbl}_zoning-districts_classes.yaml new file mode 100644 index 0000000..e05a8d1 --- /dev/null +++ b/openapi/paths/tax-lots_{bbl}_zoning-districts_classes.yaml @@ -0,0 +1,28 @@ +get: + summary: Class schemas for all zoning districts that spatially intersect the tax lot + operationId: findZoningDistrictClassesByTaxLotBbl + tags: + - Tax Lots + - Zoning Districts + parameters: + - $ref: ../components/parameters/bblParam.yaml + responses: + '200': + description: An object containing zoning district class schemas. + content: + application/json: + schema: + type: object + properties: + zoningDistrictClasses: + type: array + items: + $ref: ../components/schemas/ZoningDistrictClass.yaml + required: + - zoningDistrictClasses + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/zoning-district-classes.yaml b/openapi/paths/zoning-district-classes.yaml new file mode 100644 index 0000000..1fe402d --- /dev/null +++ b/openapi/paths/zoning-district-classes.yaml @@ -0,0 +1,23 @@ +get: + summary: Class schemas for all zoning districts + operationId: findZoningDistrictClasses + tags: + - Zoning Districts + responses: + '200': + description: An object containing all zoning district class schemas. + content: + application/json: + schema: + type: object + properties: + zoningDistrictClasses: + type: array + items: + $ref: ../components/schemas/ZoningDistrictClass.yaml + required: + - zoningDistrictClasses + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/zoning-district-classes_category-colors.yaml b/openapi/paths/zoning-district-classes_category-colors.yaml new file mode 100644 index 0000000..7f87e46 --- /dev/null +++ b/openapi/paths/zoning-district-classes_category-colors.yaml @@ -0,0 +1,23 @@ +get: + summary: List of color and class category + operationId: findZoningDistrictClassCategoryColors + tags: + - Zoning Districts + responses: + '200': + description: An object containing all zoning district category colors. + content: + application/json: + schema: + type: object + properties: + zoningDistrictClassCategoryColors: + type: array + items: + $ref: ../components/schemas/ZoningDistrictClassCategoryColor.yaml + required: + - zoningDistrictClassCategoryColors + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/zoning-district-classes_{id}.yaml b/openapi/paths/zoning-district-classes_{id}.yaml new file mode 100644 index 0000000..2fe43d6 --- /dev/null +++ b/openapi/paths/zoning-district-classes_{id}.yaml @@ -0,0 +1,25 @@ +get: + summary: Class schema for the specified class + operationId: findZoningDistrictClassByZoningDistrictClassId + tags: + - Zoning Districts + parameters: + - name: id + in: path + required: true + schema: + type: string + pattern: ^[A-z][0-9]+$ + responses: + '200': + description: A class schema for a zoning district + content: + application/json: + schema: + $ref: ../components/schemas/ZoningDistrictClass.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/zoning-districts_{id}.yaml b/openapi/paths/zoning-districts_{id}.yaml new file mode 100644 index 0000000..8c38955 --- /dev/null +++ b/openapi/paths/zoning-districts_{id}.yaml @@ -0,0 +1,25 @@ +get: + summary: Non-spatial details for a specific zoning district + operationId: findZoningDistrictByZoningDistrictId + tags: + - Zoning Districts + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: A zoning district object + content: + application/json: + schema: + $ref: ../components/schemas/ZoningDistrict.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/openapi/paths/zoning-districts_{id}_classes.yaml b/openapi/paths/zoning-districts_{id}_classes.yaml new file mode 100644 index 0000000..f3cbcc6 --- /dev/null +++ b/openapi/paths/zoning-districts_{id}_classes.yaml @@ -0,0 +1,32 @@ +get: + summary: Class schemas for the specified zoning district + operationId: findZoningDistrictClassesByZoningDistrictId + tags: + - Zoning Districts + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: An object of class schemas for the zoning district. + content: + application/json: + schema: + type: object + properties: + zoningDistrictClasses: + type: array + items: + $ref: ../components/schemas/ZoningDistrictClass.yaml + required: + - zoningDistrictClasses + '400': + $ref: ../components/responses/BadRequest.yaml + '404': + $ref: ../components/responses/NotFound.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/package.json b/package.json index e6cff0b..694931d 100644 --- a/package.json +++ b/package.json @@ -113,4 +113,4 @@ "npm run lint" ] } -} +} \ No newline at end of file