Skip to content

Commit

Permalink
[API Part2] Bug fixes in OpenAPI control examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrobin committed Jun 20, 2024
1 parent 01e1931 commit 5639507
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 30 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "Garage Video Camera 001 - PTZ Control",
"inputName": "ptz",
"async": false,
"schema": {
"commandFormat": "application/json",
"parametersSchema": {
"type": "DataRecord",
"fields": [
{
"name": "pan",
"type": "Quantity",
"definition": "http://sensorml.com/ont/swe/property/PanAngle",
"label": "Pan Angle",
"description": "Rotation of the camera around its vertical axis (i.e. causing the image to translate along its horizontal axis)",
"uom": {
"code": "deg"
}
},
{
"name": "tilt",
"type": "Quantity",
"definition": "http://sensorml.com/ont/swe/property/PanAngle",
"label": "Pan Angle",
"description": "Rotation of the camera around its horizontal axis (i.e. causing the image to translate along its vertical axis)",
"uom": {
"code": "deg"
}
},
{
"name": "zoom",
"type": "Quantity",
"definition": "http://sensorml.com/ont/swe/property/ZoomFactor",
"label": "Zoom Factor",
"description": "Amount of zoom, 0 being the highest FOV and 100 being the lowest",
"uom": {
"code": "%"
}
}
]
}
}
}
4 changes: 2 additions & 2 deletions api/part2/openapi/examples/datastreams/datastream-simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"live": true,
"links": [
{
"rel" : "self",
"href" : "https://data.example.org/api/datastreams/958tf25kjm2f6",
"rel" : "observations",
"href" : "https://data.example.org/api/datastreams/958tf25kjm2f6/observations",
"type" : "application/json"
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commandFormat": "application/json",
"paramsSchema": {
"parametersSchema": {
"type": "DataRecord",
"fields": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{ "$ref": "https://raw.githubusercontent.com/opengeospatial/ogcapi-connected-systems/master/api/part2/openapi/schemas/json/command_view.json" },
{
"properties": {
"params": {
"parameters": {
"type": "object",
"properties": {
"pan": {
Expand Down
4 changes: 2 additions & 2 deletions api/part2/openapi/requests/commandSchema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ content:
schema:
$ref: ../schemas/json/commandSchema.json
examples:
ptz-cmdjson:
ptz-json:
summary: PTZ Control - Command JSON
value:
$ref: ../examples/schemas/commandSchema-ptz-cmdjson.json
$ref: ../examples/schemas/commandSchema-ptz-json.json
ptz-swejson:
summary: PTZ Control - SWE JSON
value:
Expand Down
7 changes: 6 additions & 1 deletion api/part2/openapi/requests/controlStream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ description: A single `ControlStream` resource
content:
application/json:
schema:
$ref: ../schemas/json/controlStream.json
$ref: ../schemas/json/controlStream.json
examples:
simple:
summary: PTZ Control
value:
$ref: ../examples/controlstreams/controlstream-ptz-create.json
7 changes: 6 additions & 1 deletion api/part2/openapi/requests/dataStream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ description: A single `DataStream` resource
content:
application/json:
schema:
$ref: ../schemas/json/dataStream.json
$ref: ../schemas/json/dataStream.json
examples:
simple:
summary: Simple Datastream (1 observed property)
value:
$ref: ../examples/datastreams/datastream-simple-create.json
4 changes: 2 additions & 2 deletions api/part2/openapi/responses/commandSchema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ content:
schema:
$ref: ../schemas/json/commandSchema.json
examples:
ptz-cmdjson:
ptz-json:
summary: PTZ Control - JSON
value:
$ref: ../examples/schemas/commandSchema-ptz-cmdjson.json
$ref: ../examples/schemas/commandSchema-ptz-json.json
ptz-swejson:
summary: PTZ Control - SWE JSON
value:
Expand Down
7 changes: 6 additions & 1 deletion api/part2/openapi/responses/controlStream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ description: OK. Successful request
content:
application/json:
schema:
$ref: ../schemas/json/controlStream.json
$ref: ../schemas/json/controlStream.json
examples:
simple:
summary: PTZ Control
value:
$ref: ../examples/controlstreams/controlstream-ptz.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ This is a simple control stream for a camera accepting PTZ commands in JSON form
[source%autofit,json]
----
include::../openapi/examples/controlstreams/controlStream-ptz.json[]
include::../openapi/examples/controlstreams/controlstream-ptz.json[]
----
=================

Expand Down

0 comments on commit 5639507

Please sign in to comment.