Skip to content

Commit

Permalink
[#328] update oas spec
Browse files Browse the repository at this point in the history
  • Loading branch information
SonnyBA committed Aug 2, 2024
1 parent 3ba6860 commit ddf3d80
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions src/objects/api/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,53 @@ paths:
responses:
'204':
description: No response body
/objects/{uuid}/{index}:
get:
operationId: object_history_detail
description: Retrieve the specified OBJECT given an UUID and INDEX.
parameters:
- in: header
name: Accept-Crs
schema:
type: string
enum:
- EPSG:4326
description: 'The desired ''Coordinate Reference System'' (CRS) of the response
data. According to the GeoJSON spec, WGS84 is the default (EPSG: 4326 is
the same as WGS84).'
- in: path
name: index
schema:
type: string
pattern: ^\d+$
required: true
- in: path
name: uuid
schema:
type: string
format: uuid
description: Unique identifier (UUID4)
required: true
tags:
- objects
security:
- tokenAuth: []
responses:
'200':
headers:
Content-Crs:
schema:
type: string
enum:
- EPSG:4326
description: 'The ''Coordinate Reference System'' (CRS) of the request
data. According to the GeoJSON spec, WGS84 is the default (EPSG: 4326
is the same as WGS84).'
content:
application/json:
schema:
$ref: '#/components/schemas/HistoryRecord'
description: OK
/objects/{uuid}/history:
get:
operationId: object_history
Expand Down
2 changes: 1 addition & 1 deletion src/objects/api/v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def history(self, request, uuid=None):
detail=True,
methods=["get"],
url_path=r"(?P<index>\d+)",
serializer_class=HistoryRecordSerializer
serializer_class=HistoryRecordSerializer,
)
def history_detail(self, request, uuid=None, index=None):
"""Retrieve a RECORD of an OBJECT."""
Expand Down

0 comments on commit ddf3d80

Please sign in to comment.