Skip to content

Instantly share code, notes, and snippets.

@ironjan
Created March 18, 2016 18:15
Show Gist options
  • Save ironjan/3fe246c434208f9e8344 to your computer and use it in GitHub Desktop.
Save ironjan/3fe246c434208f9e8344 to your computer and use it in GitHub Desktop.
HiPCMS !17
{
"paths": {
"/api/users/{id}": {
"post": {
"tags": ["users"],
"summary": "Updates a single user",
"responses": {
"200": {
"description": "Success"
},
"400": {
"description": "Invalid or forbidden parameters"
},
"401": {
"description": "Unauthorized"
},
"409": {
"description": "Conflict"
},
"501": {
"description": "Not implemented yet"
}
},
"parameters": [{
"name": "id",
"type": "java.util.uuid",
"required": true,
"in": "path"
}]
}
},
"/api/users": {
"get": {
"tags": ["users"],
"summary": "Gets all users",
"description": "The user models also include a field \"uuid\" to identify the record.",
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/controllers.api.protocol.UsersResponse"
}
},
"400": {
"description": "Request contained forbidden parameters"
},
"401": {
"description": "Not Authorized"
},
"404": {
"description": "Not Found"
},
"501": {
"description": "Not implemented yet"
}
},
"parameters": [{
"name": "search",
"type": "string",
"required": false,
"in": "query"
}, {
"name": "role",
"type": "string",
"required": false,
"in": "query"
}]
}
}
},
"definitions": {
"controllers.api.protocol.UserResponseModel": {
"properties": {
"userID": {
"type": "java.util.uuid",
"required": true
},
"firstName": {
"type": "string",
"required": false
},
"lastName": {
"type": "string",
"required": false
},
"email": {
"type": "string",
"required": false
}
},
"required": ["userID"]
},
"controllers.api.protocol.UsersResponse": {
"properties": {
"users": {
"type": "array",
"required": true,
"items": {
"required": true,
"$ref": "#/definitions/controllers.api.protocol.UserResponseModel"
}
}
},
"required": ["users"]
}
},
"host": "localhost:9000",
"info": {
"title": "HiP API",
"description": "API of HiP-CMS",
"version": "0.0.1"
},
"schemes": ["http"],
"produces": ["application/json"],
"swagger": "2.0",
"consumes": ["application/json"],
"tags": [{
"name": "users"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment