mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
POSTing a spot should use the request body not a URL param. #35
This commit is contained in:
@@ -263,7 +263,7 @@ paths:
|
||||
/status:
|
||||
get:
|
||||
tags:
|
||||
- status
|
||||
- general
|
||||
summary: Get server status
|
||||
description: Query information about the server for use in a diagnostics display.
|
||||
operationId: status
|
||||
@@ -340,7 +340,7 @@ paths:
|
||||
/options:
|
||||
get:
|
||||
tags:
|
||||
- spots
|
||||
- general
|
||||
summary: Get enumeration options
|
||||
description: Retrieves the list of options for various enumerated types, which can be found in the spots and also provided back to the API as query parameters. While these enumerated options are defined in this spec anyway, providing them in an API call allows us to define extra parameters, like the colours associated with bands, and also allows clients to set up their filters and features without having to have internal knowledge about, for example, what bands the server knows about.
|
||||
operationId: options
|
||||
@@ -398,14 +398,14 @@ paths:
|
||||
tags:
|
||||
- spots
|
||||
summary: Add a spot
|
||||
description: Supply a new spot object, which will be added to the system. Currently, this will not be reported up the chain to a cluster, POTA, SOTA etc. This will be introduced in a future version.
|
||||
description: "Supply a new spot object, which will be added to the system. Currently, this will not be reported up the chain to a cluster, POTA, SOTA etc. This will be introduced in a future version. cURL example: `curl --request POST --header \"Content-Type: application/json\" --data '{\"dx_call\":\"M0TRT\",\"time\":1760019539, \"freq\":14200000, \"comment\":\"Test spot please ignore\", \"de_call\":\"M0TRT\"}' https://spothole.app/api/spot`"
|
||||
operationId: spot
|
||||
parameters:
|
||||
- name: spot
|
||||
description: The spot data to post. The structure must contain at least "time" and "dx_call" to be accepted.
|
||||
required: true
|
||||
schema:
|
||||
type:
|
||||
requestBody:
|
||||
description: The JSON spot object
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Spot'
|
||||
responses:
|
||||
'200':
|
||||
@@ -415,6 +415,13 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
example: "OK"
|
||||
'415':
|
||||
description: Incorrect Content-Type
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
example: "Failed"
|
||||
'422':
|
||||
description: Validation error
|
||||
content:
|
||||
@@ -422,6 +429,13 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
example: "Failed"
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
example: "Failed"
|
||||
|
||||
|
||||
components:
|
||||
|
||||
Reference in New Issue
Block a user