{ "swagger": "2.0", "info": { "title": "Andrew Leetham's CSE341 Project 2 API", "description": "Library API", "version": "1.0.0" }, "host": "cse341-project2-a22r.onrender.com", "basePath": "/", "schemes": [ "https" ], "paths": { "/login": { "get": { "description": "", "responses": { "default": { "description": "" } } } }, "/logout": { "get": { "description": "", "responses": { "default": { "description": "" } } } }, "/books/": { "get": { "tags": [ "Books" ], "description": "", "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" } } }, "post": { "tags": [ "Books" ], "description": "", "parameters": [ { "name": "body", "in": "body", "description": "Add a book", "schema": { "$ref": "#/definitions/book" } } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } } }, "/books/{id}": { "get": { "tags": [ "Books" ], "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" } } }, "put": { "tags": [ "Books" ], "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "description": "Add a book", "schema": { "$ref": "#/definitions/book" } } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } }, "delete": { "tags": [ "Books" ], "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } } }, "/films/": { "get": { "tags": [ "Films" ], "description": "", "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" } } }, "post": { "tags": [ "Films" ], "description": "", "parameters": [ { "name": "body", "in": "body", "description": "Add a book", "schema": { "$ref": "#/definitions/book" } } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } } }, "/films/{id}": { "get": { "tags": [ "Films" ], "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" } } }, "put": { "tags": [ "Films" ], "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "description": "Add a book", "schema": { "$ref": "#/definitions/book" } } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } }, "delete": { "tags": [ "Films" ], "description": "", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } } } }, "definitions": { "book": { "type": "object", "properties": { "title": { "type": "string", "example": "book title" }, "author": { "type": "string", "example": "author name" }, "publisher": { "type": "string", "example": "publisher name" }, "isbn": { "type": "string", "example": "978-0-544-27299-6" }, "genre": { "type": "string", "example": "genre" }, "pageCount": { "type": "number", "example": 123 }, "rating": { "type": "number", "example": 4.4 } } }, "film": { "type": "object", "properties": { "title": { "type": "string", "example": "film title" }, "length": { "type": "number", "example": 90 }, "genre": { "type": "string", "example": "genre" }, "rating": { "type": "number", "example": 3.67 } } } } }