{"swagger":"2.0","info":{"description":"# blog API documentation\n\n这篇文档描述了的blog(article)的api接口\n","version":"1.0.0","title":"a202032-danieldong-blog"},"host":"erx0jei3yd.execute-api.us-east-1.amazonaws.com","basePath":"/dev","schemes":["https"],"paths":{"/":{"get":{"summary":"Service root","description":"列出所有api的描述信息.","operationId":"root","consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"Success"}}}},"/articles":{"get":{"summary":"list all articles","operationId":"list_all_articles","consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"Annotation successfully created","schema":{"$ref":"#/definitions/ArticleList"}},"400":{"description":"Could not create article from your request","schema":{"$ref":"#/definitions/Error"}}}},"post":{"summary":"Create a new Article","operationId":"createArticle","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"NewArticle","description":"article to be created","required":true,"schema":{"$ref":"#/definitions/NewArticle"}}],"responses":{"200":{"description":"article successfully created","schema":{"$ref":"#/definitions/Article"}},"400":{"description":"Could not create article from your request","schema":{"$ref":"#/definitions/Error"}}}}},"/articles/{id}":{"get":{"summary":"Fetch an Article","operationId":"fetchArticle","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"ID of article to return","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Article"}},"404":{"description":"article not found or no permission to view","schema":{"$ref":"#/definitions/Error"}}}},"delete":{"summary":"Delete an Article","operationId":"deleteArticle","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"ID of article to return","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/MODELd3fa83"}},"404":{"description":"article not found or no permission to delete","schema":{"$ref":"#/definitions/Error"}}}},"patch":{"summary":"Update an Article","description":"This endpoint is available under both the `PATCH` and `PUT`\nrequest methods. Both endpoints have PATCH-characteristics\nas defined in [RFC5789](https://tools.ietf.org/html/rfc5789#section-1),\nmeaning the request body does not have to include the whole Article\nobject.\n\nNew implementations should use the `PATCH` request method, and existing\nimplementations continue to work under `PUT` but should switch to `PATCH`.\n","operationId":"updateArticle","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"ID of article to return","required":true,"type":"string"},{"in":"body","name":"NewArticle","description":"Updated article body","required":true,"schema":{"$ref":"#/definitions/NewArticle"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Article"}},"400":{"description":"Could not create article from your request","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"article not found or no permission to update","schema":{"$ref":"#/definitions/Error"}}}}}},"definitions":{"MODELd3fa83":{"type":"object","required":["deleted","id"],"properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}}},"Article":{"allOf":[{"$ref":"#/definitions/NewArticle"},{"required":["id"],"properties":{"id":{"type":"string"}}}]},"Error":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["failure"]},"reason":{"type":"string","description":"A human-readable description of the reason(s) for failure."}}},"NewArticle":{"type":"object","properties":{"userid":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}},"ArticleList":{"type":"object","required":["rows","total"],"properties":{"rows":{"type":"array","items":{"$ref":"#/definitions/Article"}},"total":{"type":"integer","description":"Total number of results matching query."}}}}}