Skip to content

Commit

Permalink
Merge pull request #11 from agiliq/update_json
Browse files Browse the repository at this point in the history
Adding user and vote apis to json
  • Loading branch information
shabda committed Mar 8, 2018
2 parents f977474 + d91f842 commit 8dcdaac
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions code/django_pollsapi/pollsapi_swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,62 @@
"200": {"description":"Poll created successfully"}
}
}
},
"/user": {
"get": {
"tags": ["user"],
"summary": "Get user details",
"description": "",
"operationId": "user",
"consumes": ["application/json","application/xml"],
"produces": ["application/xml","application/json"],
"parameters": [{
"in": "query",
"name": "body",
"description": "Get the user.",
"required": false,
"schema":{"$ref":"#/pollsapi/User"}
}],
"responses": {"200":{"description":"Successfull operation"}},
},
"post":{
"tags": ["user"],
"summary": "Create a new user",
"description": "Creates a new user.",
"operationId": "createUser",
"consumes":["application/json","application/xml"],
"produces":["application/xml","application/json"],
"parameters":[{
"in":"query",
"name":"body",
"description": "User object that needs to be added.",
"required": true,
"schema": {"$ref":"#/pollsapi/User"}
}],
"responses": {
"200": {"description":"User created successfully"}
}
}
},
"/vote": {
"post":{
"tags": ["vote"],
"summary": "Create a new vote",
"description": "Creates a new vote.",
"operationId": "createVote",
"consumes":["application/json","application/xml"],
"produces":["application/xml","application/json"],
"parameters":[{
"in":"query",
"name":"body",
"description": "Vote object that needs to be added.",
"required": true,
"schema": {"$ref":"#/pollsapi/Vote"}
}],
"responses": {
"200": {"description":"Vote created successfully"}
}
}
}
}
}

0 comments on commit 8dcdaac

Please sign in to comment.