Skip to content

Commit

Permalink
[TM-1461] fix distinct responses
Browse files Browse the repository at this point in the history
  • Loading branch information
egrojMonroy committed Nov 19, 2024
1 parent f70e777 commit ae9a1d5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/V2/Entities/EntityTypeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private function getSitePolygonsWithFiltersAndSorts($sitePolygonsQuery, Request
}
}

return $sitePolygonsQuery;
return $sitePolygonsQuery->get();
}

}
13 changes: 9 additions & 4 deletions openapi-src/V2/paths/Entity/get-v2-entity-polygon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ responses:
'200':
description: Successful response
schema:
type: object
properties:
count:
type: number
$ref: '../../definitions/_index.yml#/EntityPolygonResponse'
'400':
description: Bad request, UUID parameter is missing
'500':
description: Internal server error
schema:
type: object
properties:
error:
type: string
description: Error message
2 changes: 1 addition & 1 deletion openapi-src/V2/paths/Entity/get-v2-type-entity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ responses:
'200':
description: Successful response
schema:
$ref: '../../definitions/_index.yml#/EntityPolygonResponse'
$ref: '../../definitions/_index.yml#/EntityTypeResponse'
'400':
description: Bad request, UUID parameter is missing
'500':
Expand Down
2 changes: 1 addition & 1 deletion openapi-src/V2/paths/_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2752,7 +2752,7 @@
$ref: './Entity/get-v2-entity-count.yml'
/v2/entity/polygons:
get:
$ref: './Entity/get-v2-type-entity.yml'
$ref: './Entity/get-v2-entity-polygon.yml'
/v2/{ENTITY}/{UUID}/status:
put:
$ref: './Entity/put-v2-entity-uuid-status.yml'
Expand Down
7 changes: 6 additions & 1 deletion resources/docs/swagger-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98166,6 +98166,11 @@ paths:
type: boolean
version_name:
type: string
bbox:
type: array
items:
type: number
description: Bounding box of the entity
'400':
description: 'Bad request, UUID parameter is missing'
'500':
Expand Down Expand Up @@ -98236,7 +98241,7 @@ paths:
- in: query
name: sort
required: false
description: 'Sort criteria in the format `sort[field]=direction`, e.g. `sort[poly_name]=asc or sort[status]=desc`'
description: 'Sort criteria in the format `sort[poly_name]=asc or sort[status]=desc`'
type: string
responses:
'200':
Expand Down

0 comments on commit ae9a1d5

Please sign in to comment.