aboutsummaryrefslogtreecommitdiff
path: root/swagger.json
diff options
context:
space:
mode:
authorSun Howwrongbum <sun@adrenosapient.com>2017-02-12 03:45:29 +0530
committerSun Howwrongbum <sun@adrenosapient.com>2017-02-12 03:45:29 +0530
commit6e7a8b75d1e0a28ba51337bf2e8ae003c62eda20 (patch)
tree8e0baf543223a55a25ae597fbc852451be263c78 /swagger.json
parentdd40aaff0a93374bfd5a94bb2f14d333d3c4c883 (diff)
downloadtrackermap-server-6e7a8b75d1e0a28ba51337bf2e8ae003c62eda20.tar.gz
trackermap-server-6e7a8b75d1e0a28ba51337bf2e8ae003c62eda20.tar.bz2
trackermap-server-6e7a8b75d1e0a28ba51337bf2e8ae003c62eda20.zip
[swagger] Add /calendar and Calendar definitions
Diffstat (limited to 'swagger.json')
-rw-r--r--swagger.json92
1 files changed, 91 insertions, 1 deletions
diff --git a/swagger.json b/swagger.json
index 0f298f161..eacc589b3 100644
--- a/swagger.json
+++ b/swagger.json
@@ -1010,6 +1010,81 @@
}
}
}
+ },
+ "/calendars": {
+ "get": {
+ "summary": "Fetch a list of Calendars",
+ "description": "Without params, it returns a list of Calendars the user has access to",
+ "parameters": [
+ {
+ "$ref": "#/parameters/all"
+ },
+ {
+ "$ref": "#/parameters/userId"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Calendar"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "summary": "Create a Calendar",
+ "parameters": [
+ {
+ "$ref": "#/parameters/Calendar"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/Calendar"
+ }
+ }
+ }
+ }
+ },
+ "/calendars/{id}": {
+ "put": {
+ "summary": "Update a Calendar",
+ "parameters": [
+ {
+ "$ref": "#/parameters/entityId"
+ },
+ {
+ "$ref": "#/parameters/Calendar"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/Calendar"
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete a Calendar",
+ "parameters": [
+ {
+ "$ref": "#/parameters/entityId"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ }
+ }
+ }
}
},
"definitions": {
@@ -1490,6 +1565,21 @@
"description": "in meters"
}
}
+ },
+ "Calendar": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "data": {
+ "type": "string",
+ "description": "base64 encoded file in iCalendar format"
+ },
+ "atributes": {}
+ }
}
},
"parameters": {
@@ -1502,7 +1592,7 @@
"all": {
"name": "all",
"in": "query",
- "description": "Can only be used by admin users to fetch all entities",
+ "description": "Can only be used by admins or managers to fetch all entities",
"type": "boolean"
},
"userId": {