Skip to content

Commit

Permalink
update the swagger document #2
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Apr 26, 2017
1 parent 528569c commit 6ef46ce
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
6 changes: 5 additions & 1 deletion docs/2.0/api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
layout: swagger
data: ausdigital-tap_2-0_swagger
---
---

Click [here](agilo.html){:target="_blank"} to see this specification in Agilo format with complete set of examples/models.

Click [here](swagger.json){:target="_blank"} to download the original swagger document.
25 changes: 18 additions & 7 deletions docs/2.0/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
"description":"Any TAP URL.",
"required":true,
"type":"string",
"default":""
},
"message":{
"name":"message",
"in":"formData",
"description":"The message file. Must be a valid json document. <span class=\"show-swagger-parameters-example\">Example</span>. Shema - https://github.com/ausdigital/ausdigital-tap/blob/master/docs/2.0/schema.json",
"description":"The message file. Must be a valid json document. Shema - https://github.com/ausdigital/ausdigital-tap/blob/master/docs/2.0/schema.json",
"required":true,
"type":"file"
},
Expand Down Expand Up @@ -60,24 +59,36 @@
"description":"The origin server did not find a current representation of the target resource or is not willing to disclose that one exists.",
"schema":{
"$ref":"#/definitions/errors"
},
"examples":{
"application/json":"{\n \"errors\": [{\n \"code\": \"TAP-0001\",\n \"name\": \"Resource Not Found.\",\n \"userMessage\": \"The origin server did not find a current representation of the target resource or is not willing to disclose that one exists.\"\n }\n ]\n}"
}
},
"415":{
"description":"Unsupported media type.",
"schema":{
"$ref":"#/definitions/errors"
},
"examples":{
"application/json":"{\n \"errors\": [{\n \"code\": \"TAP-0002\",\n \"name\": \"Unsupported media type.\",\n \"userMessage\": \"The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.\"\n }\n ]\n}"
}
},
"500":{
"description":"Internal server error; no action required; may help to retry request later or contact support.",
"schema":{
"$ref":"#/definitions/errors"
},
"examples":{
"application/json":"{\n \"errors\": [{\n \"code\": \"TAP-0003\",\n \"name\": \"Internal server error.\",\n \"userMessage\": \"The server encountered an unexpected condition that prevented it from fulfilling the request.\"\n }\n ]\n}"
}
},
"400-nofile":{
"description":"The server cannot or will not process the request due to something that is perceived to be a client error.",
"schema":{
"$ref":"#/definitions/errors"
},
"examples":{
"application/json":"{\n \"errors\": [{\n \"code\": \"TAP-0004\",\n \"name\": \"Bad Request.\",\n \"userMessage\": \"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).\"\n }\n ]\n}"
}
}
},
Expand Down Expand Up @@ -152,7 +163,7 @@
},
"definitions":{
"TAPMessageData":{
"description":"TODO",
"description":"The response to post a TAP message request.",
"properties":{
"data":{
"$ref":"#/definitions/TAPMessage"
Expand Down Expand Up @@ -200,15 +211,15 @@
},
"docId":{
"type":"string",
"description":"The"
"description":"The Document Identifier"
},
"isRead":{
"type":"boolean",
"description":"TODO"
"description":"The flag to indicate if a message is read."
},
"metadata":{
"type":"object",
"description":"TODO"
"description":"The additional metadata."
}
}
}
Expand All @@ -226,7 +237,7 @@
}
},
"error":{
"description":"standard error response srtucture",
"description":"The standard error response definition.",
"properties":{
"code":{
"type":"string",
Expand Down

0 comments on commit 6ef46ce

Please sign in to comment.