Skip to content

Commit

Permalink
update: Resources API OpenAPI definition for charts (#1808)
Browse files Browse the repository at this point in the history
* Add put / post / delete chart definitions
* make chart identifier optional
* Add mapbox Style JSON definition
* Add s-57 definition
  • Loading branch information
panaaj authored Oct 28, 2024
1 parent 1081de8 commit 79ad26e
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions src/api/resources/openApi.json
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,14 @@
"type": {
"type": "string",
"description": "Source type of map data.",
"enum": ["tilejson", "wms", "wmts"],
"default": "wms",
"example": "wms"
"enum": ["tilejson", "WMS", "WMTS", "mapboxstyle", "S-57"],
"example": "WMTS"
}
}
},
"Chart": {
"description": "Signal K Chart resource",
"type": "object",
"required": ["identifier"],
"properties": {
"identifier": {
"type": "string",
Expand Down Expand Up @@ -1399,6 +1397,29 @@
}
}
}
},
"post": {
"tags": ["charts"],
"summary": "Add a new Chart source",
"requestBody": {
"description": "Chart resource entry",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Chart"
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/200ActionResponse"
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/resources/charts/{id}": {
Expand All @@ -1418,7 +1439,7 @@
],
"get": {
"tags": ["charts"],
"summary": "Retrieve chart with supplied id",
"summary": "Retrieve chart metadata for the supplied id",
"responses": {
"200": {
"$ref": "#/components/responses/ChartResponse"
Expand All @@ -1430,7 +1451,7 @@
},
"put": {
"tags": ["charts"],
"summary": "Add / update a new Chart with supplied id",
"summary": "Add / update a new Chart source with supplied id",
"requestBody": {
"description": "Chart resource entry",
"required": true,
Expand All @@ -1450,6 +1471,18 @@
"$ref": "#/components/responses/ErrorResponse"
}
}
},
"delete": {
"tags": ["charts"],
"summary": "Remove Chart source with supplied id",
"responses": {
"200": {
"$ref": "#/components/responses/200ActionResponse"
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
}
}
Expand Down

0 comments on commit 79ad26e

Please sign in to comment.