{"swagger":"2.0","info":{"description":"Mock API that GETS, POSTS, UPDATES and DELTES posts.\nCode Fellows 401 Lab 07 assignment.\n","version":"1.0.0","title":"07-API-Server","termsOfService":"http://swagger.io/terms/","contact":{"email":"liana.niehrah@gmail.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"posts","description":"Article records"}],"paths":{"/api/v1/posts/":{"post":{"tags":["posts"],"summary":"Add a new post","operationId":"addPost","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"Post content to include name, author, title, and article","required":true,"schema":{"$ref":"#/definitions/posts"}}],"responses":{"405":{"description":"Invalid input"}}},"get":{"tags":["posts"],"summary":"Returns categories","description":"Returns categories.","operationId":"getInventory","produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/posts"}}}}},"/api/v1/posts/:id":{"put":{"tags":["posts"],"summary":"Update a post by ID","description":"Updates a single category. Use whole integers >= 1.","operationId":"updatePOst","produces":["application/json","application/xml"],"parameters":[{"name":"id","in":"query","description":"ID of post that needs to be updated","required":true,"type":"integer","maximum":10.0,"minimum":1.0,"format":"int64"}],"responses":{"200":{"description":"successful operation"},"400":{"description":"Invalid ID supplied"},"404":{"description":"Post not found"}}},"delete":{"tags":["posts"],"summary":"Deletes a post by ID.","operationId":"deletePost","produces":["application/json","application/xml"],"parameters":[{"name":"id","in":"path","description":"ID of the post that needs to be deleted","required":true,"type":"integer","minimum":1.0,"format":"int64"}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"ID not found"}}}}},"definitions":{"posts":{"type":"object","required":["name","author","title","article"],"properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string","example":"Media Article"},"author":{"type":"string","example":"Author"},"title":{"type":"string","example":"Article Title"},"article":{"type":"string","example":"Article Content"}},"xml":{"name":"posts"}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"},"host":"virtserver.swaggerhub.com","basePath":"/xenalara/07-api-server/1.0.0","schemes":["https","http"]}