Skip to content

Commit

Permalink
Add put / post chart definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Oct 10, 2024
1 parent df59acf commit 07b9d7e
Showing 1 changed file with 111 additions and 1 deletion.
112 changes: 111 additions & 1 deletion src/api/resources/openApi.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
}
],
"tags": [
{
"name": "providers",
"description": "Resource Providers"
},
{
"name": "resources",
"description": "Signal K resources"
Expand Down Expand Up @@ -210,6 +214,12 @@
}
}
},
"Providers": {
"type": "array",
"items": {
"type": "string"
}
},
"Route": {
"type": "object",
"description": "Signal K Route resource",
Expand Down Expand Up @@ -475,7 +485,7 @@
"type": {
"type": "string",
"description": "Source type of map data.",
"enum": ["tilejson", "wms", "wmts"],
"enum": ["tilejson", "wms", "wmts", "s-57"],
"default": "wms",
"example": "wms"
}
Expand Down Expand Up @@ -1399,6 +1409,29 @@
}
}
}
},
"post": {
"tags": ["charts"],
"summary": "New Chart",
"requestBody": {
"description": "Chart resource entry",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Chart"
}
}
}
},
"responses": {
"201": {
"$ref": "#/components/responses/201ActionResponse"
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/resources/charts/{id}": {
Expand Down Expand Up @@ -1451,6 +1484,83 @@
}
}
}
},
"/resources/providers": {
"get": {
"tags": ["providers"],
"summary": "List of registered resource providers",
"responses": {
"default": {
"description": "An object containing registered resource providers, keyed by resource types.",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"allOf": [
{
"$ref": "#/components/schemas/Providers"
}
]
}
}
}
}
}
}
}
},
"/resources/providers/default/{resourceType}": {
"post": {
"tags": ["providers"],
"summary": "Set the default provider for a resource type.",
"requestBody": {
"description": "Set the default provider to handle PUT / POST requests for a resource type.",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["value"],
"properties": {
"value": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "PUT, DELETE OK response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": ["COMPLETED"]
},
"statusCode": {
"type": "number",
"enum": [200]
},
"message": {
"type": "string"
}
},
"required": ["statusCode", "state"]
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
}
}
}

0 comments on commit 07b9d7e

Please sign in to comment.