@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api JSON storage
@base https://extendsclass.com/api/json-storage
@version 0.1
@endpoints 5
@toc bin(5)

@endpoint GET /bin/{id}
@desc Return a json bin
@returns(200) Bin data
@errors {404: Bin not found, 422: Id must be specified}

@endpoint PUT /bin/{id}
@desc Update a json bin
@returns(200) {status: int, data: map} # Bin data updated
@errors {401: Wrong security key, 404: Bin not found, 413: JSON data too large, 422: Id must be specified}

@endpoint PATCH /bin/{id}
@desc Partially update a json bin with JSON Merge Patch
@returns(200) {status: int, data: map} # Bin data updated
@errors {401: Wrong security key, 404: Bin not found, 413: JSON data too large, 422: Id must be specified}

@endpoint DELETE /bin/{id}
@desc Delete a json bin
@returns(200) {status: int} # Status of the deletion
@errors {401: Wrong security key, 404: Bin not found, 422: Id must be specified}

@endpoint POST /bin
@desc Create a json bin
@returns(200) {status: int, uri: str, id: str} # Bin information (id and URL)
@errors {413: 'JSON data too large' or 'Security key is too large', 422: Security key is required for private bin}

@end
