Skip to content

Commit

Permalink
Merge branch 'staging' into fix/TM-848-Admin-UI-Upload-polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarLima1 authored Jun 10, 2024
2 parents 13fad19 + 3eb6485 commit 2bc02c6
Show file tree
Hide file tree
Showing 11 changed files with 405 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openapi-src/V2/definitions/DashboardPolygonResponse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: object
properties:
uuid:
type: string
4 changes: 4 additions & 0 deletions openapi-src/V2/definitions/FeatureCollection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: object
properties:
type:
type: string
6 changes: 6 additions & 0 deletions openapi-src/V2/definitions/_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ SitePolygonCreateResponse:
$ref: './SitePolygonCreateResponse.yml'
GeoJSONResponse:
$ref: './GeoJSONResponse.yml'
FeatureCollection:
$ref: './FeatureCollection.yml'
PolygonBboxResponse:
$ref: './SitePolygonsBboxResponse.yml'
DashboardPolygonResponse:
$ref: './DashboardPolygonResponse.yml'
DashboardJobsCreatedResponse:
$ref: './DashboardJobsCreatedResponse.yml'
DashboardJobsCreatedData:
Expand Down
16 changes: 16 additions & 0 deletions openapi-src/V2/paths/Terrafund/get-v2-geojson-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
summary: Get collection Feature as GeoJSON for a site
parameters:
- in: query
name: uuid
type: string
required: true
description: UUID of the aite.
responses:
'200':
description: Successful response
schema:
$ref: '../../definitions/_index.yml#/FeatureCollection'
'400':
description: Bad request
'500':
description: Internal server error
17 changes: 17 additions & 0 deletions openapi-src/V2/paths/Terrafund/post-v2-terrafund-polygon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
summary: Create a new polygon
operationId: post-v2-polygon
tags:
- V2 Terrafund
consumes:
- application/json
parameters:
- in: body
name: body
description: Polygon to create
schema:
$ref: '../../definitions/_index.yml#/GeometryString'
responses:
'200':
description: Created
schema:
$ref: '../../definitions/_index.yml#/DashboardPolygonResponse'
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
summary: Upload GeoJSON File
description: Uploads a GeoJSON file, converts it to GeoJSON, and inserts it into the database.
consumes:
- multipart/form-data
parameters:
- name: file
in: formData
description: The GeoJSON file to upload
required: true
type: file
- name: uuid
in: formData
description: The UUID of the site associated with the GeoJSON file
required: true
type: string
responses:
'200':
description: GeoJSON file processed and inserted successfully
schema:
type: object
properties:
message:
type: string
uuid:
type: string
'400':
description: Bad request
'500':
description: Internal server error
29 changes: 29 additions & 0 deletions openapi-src/V2/paths/Terrafund/post-v2-terrafund-upload-kml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
summary: Upload KML File
description: Uploads a KML file, converts it to GeoJSON, and inserts it into the database.
consumes:
- multipart/form-data
parameters:
- name: file
in: formData
description: The KML file to upload
required: true
type: file
- name: uuid
in: formData
description: The UUID of the site associated with the KML file
required: true
type: string
responses:
'200':
description: KML file processed and inserted successfully
schema:
type: object
properties:
message:
type: string
uuid:
type: string
'400':
description: Bad request
'500':
description: Internal server error
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
summary: Upload Shapefile
description: Uploads a shapefile, converts it to GeoJSON, and inserts it into the database.
consumes:
- multipart/form-data
parameters:
- name: file
in: formData
description: The shapefile to upload
required: true
type: file
- name: uuid
in: formData
description: The UUID of the site associated with the shapefile
required: true
type: string
responses:
'200':
description: Shapefile processed and inserted successfully
schema:
type: object
properties:
message:
type: string
uuid:
type: string
'400':
description: Bad request
'500':
description: Internal server error
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
summary: Update site polygon
parameters:
- in: path
name: uuid
required: true
type: string
description: The UUID of the site polygon
- in: body
name: body
required: true
schema:
$ref: '../../definitions/_index.yml#/SitePolygonResponse'
responses:
'200':
description: Successful response
schema:
$ref: '../../definitions/_index.yml#/SitePolygonResponse'
'400':
description: Bad request
'500':
description: Internal server error
18 changes: 18 additions & 0 deletions openapi-src/V2/paths/_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,24 @@
$ref: './Terrafund/put-v2-terrafund-polygon-uuid.yml'
delete:
$ref: './Terrafund/delete-v2-terrafund-polygon-uuid.yml'
/v2/terrafund/geojson/site:
get:
$ref: './Terrafund/get-v2-geojson-site.yml'
/v2/terrafund/polygon:
post:
$ref: './Terrafund/post-v2-terrafund-polygon.yml'
/v2/terrafund/upload-geojson:
post:
$ref: './Terrafund/post-v2-terrafund-upload-geojson.yml'
/v2/terrafund/upload-shapefile:
post:
$ref: './Terrafund/post-v2-terrafund-upload-shapefile.yml'
/v2/terrafund/upload-kml:
post:
$ref: './Terrafund/post-v2-terrafund-upload-kml.yml'
/v2/terrafund/site-polygon/{uuid}:
put:
$ref: './Terrafund/put-v2-terrafund-site-polygon-uuid.yml'
/v2/dashboard/jobs-created:
get:
$ref: './Dashboard/get-v2-dashboard-jobs-created.yml'
Expand Down
Loading

0 comments on commit 2bc02c6

Please sign in to comment.