-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.json
1 lines (1 loc) · 2.63 KB
/
docs.json
1
{"info":{"version":"0.1.0","title":"Library-Management-System API","description":"Library-Management-System API Information","contact":{"name":"Swarag","url":"https://github.com/Swarag-N"},"servers":["http://localhost:7894"],"consumes":["application/json"],"produces":["application/json"]},"tags":[{"name":"Books","description":"Everything about Books","externalDocs":{"description":"See Full Docs at","url":"/"}}],"swagger":"2.0","paths":{"/":{"get":{"description":"Get the available routes.","produces":["application/json"],"responses":{"200":{"description":"A successful response"}}}},"/api/books/":{"get":{"tags":["Books"],"description":"List of the Books","summary":"LIST","responses":{"200":{"description":"A successful response"}},"parameters":[{"in":"query","name":"page","type":"int","description":"page of query","summary":"page of query"},{"in":"query","name":"name","type":"string","description":"name of the book"},{"in":"query","name":"cbNum","type":"string","description":"name of the book"},{"in":"query","name":"genr","type":"string","description":"genre of the book"},{"in":"query","name":"sort","type":"string","description":"genre of the book","enum":["asc","desc"]},{"in":"query","name":"lte","type":"boolean","description":"on giving cupboard number(cbNum) results are (n>cbNum), if lte is passed results are (n<cbNum)"}]},"post":{"tags":["Books"],"description":"Add a new Book","summary":"CREATE","parameters":[{"in":"body","name":"Book","required":true,"schema":{"$ref":"#/definitions/Book"}}],"responses":{"201":{"description":"Successful response"},"406":{"description":"Empty Body"}}}},"/api/books/{id}":{"get":{"tags":["Books"],"description":"Read Book","summary":"READ","parameters":[{"in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Book Not Found"}}},"delete":{"tags":["Books"],"description":"Delete Books","summary":"DELETE","parameters":[{"in":"path","name":"id","required":true,"type":"string"}],"responses":{"204":{"description":"Successful response"},"400":{"description":"Empty Body"}}}},"/api/books/{id}/edit":{"put":{"tags":["Books"],"description":"Update Books","summary":"UPDATE","parameters":[{"in":"path","name":"id","required":true,"type":"string"}],"responses":{"202":{"description":"Book Updated"},"400":{"description":"Empty Body"}}}}},"definitions":{"Book":{"type":"object","properties":{"id":{"type":"string","format":"ObjectId"},"name":{"type":"string","format":"string"},"cupBoardNumber":{"type":"integer","format":"int"},"genre":{"type":"string","format":"string"}},"xml":{"name":"Order"}}},"responses":{},"parameters":{},"securityDefinitions":{}}