--- swagger: "2.0" info: description: GSU Classrooms Database version: 1.0.0 title: GSU Classrooms host: localhost:5000 basePath: /classroom schemes: - http paths: /buildings/: get: summary: Get a list of buildings description: Get a list of all buildings in the database parameters: [] responses: "200": description: A list of buildings schema: $ref: '#/definitions/inline_response_200' post: summary: Add a new building description: Add a new building into the database parameters: - in: body name: building description: bcode and bname provided required: false schema: $ref: '#/definitions/BuildingType' responses: "201": description: Building added successfully schema: $ref: '#/definitions/BuildingResponseType' /rooms/{bcode}/: get: summary: Get rooms in building description: Get rooms given building code parameters: - name: bcode in: path description: building code required: true type: string responses: "200": description: room numbers in given building schema: $ref: '#/definitions/inline_response_200_1' /rooms/{bcode}/{rnumber}/: get: summary: Get room details description: Get room details given building code and room number parameters: - name: bcode in: path description: building code required: true type: string - name: rnumber in: path description: room number required: true type: string responses: "200": description: room details schema: $ref: '#/definitions/RoomType' post: summary: Add new room description: Add a new room to the database given bcode and rnumber parameters: - name: bcode in: path description: building code required: true type: string - name: rnumber in: path description: room number required: true type: string - in: body name: room description: bcode and bname provided required: false schema: $ref: '#/definitions/RoomRequestType' responses: "201": description: Room added successfully schema: $ref: '#/definitions/RoomResponseType' put: summary: Update room cap description: Update room cap in the database parameters: - name: bcode in: path description: building code required: true type: string - name: rnumber in: path description: room number required: true type: string - in: body name: roomcap description: new capacity required: false schema: $ref: '#/definitions/RoomCapRequestType' responses: "201": description: Room cap updated successfully schema: $ref: '#/definitions/RoomResponseType' delete: summary: Delete a room description: Delete a particular room in the database parameters: - name: bcode in: path description: building code required: true type: string - name: rnumber in: path description: room number required: true type: string responses: "201": description: Room deleted successfully schema: $ref: '#/definitions/RoomResponseType' /rooms/{bcode}/{rnumber}/media/: get: summary: Get room media description: Get room media given building code and room number parameters: - name: bcode in: path description: building code required: true type: string - name: rnumber in: path description: room number required: true type: string responses: "200": description: room media list schema: $ref: '#/definitions/inline_response_200_2' definitions: BuildingType: type: object properties: bcode: type: string description: building code bname: type: string description: building name description: Building description BuildingResponseType: type: object properties: ok: type: boolean description: status true or false bcode: type: string description: building code bname: type: string description: building name description: Building description RoomNumberType: type: object properties: rnumber: type: string description: room number description: Room number RoomType: type: object properties: building: type: string description: building code rnumber: type: integer cap: type: integer dept: type: string layout: type: string type: type: string description: Room details RoomRequestType: type: object properties: cap: type: integer dept: type: string layout: type: string type: type: string media: type: array items: $ref: '#/definitions/RoomMediaType' description: Room details RoomCapRequestType: type: object properties: cap: type: integer description: Room new cap RoomResponseType: type: object properties: ok: type: boolean description: status true or false bcode: type: string description: building code rnumber: type: string description: room number description: Room response details RoomMediaType: type: object properties: mcode: type: string description: media code mdescription: type: string description: media description description: Room media inline_response_200: type: object required: - buildings properties: buildings: type: array items: $ref: '#/definitions/BuildingType' inline_response_200_1: type: object required: - rooms properties: rooms: type: array items: $ref: '#/definitions/RoomNumberType' inline_response_200_2: type: object required: - media properties: media: type: array items: $ref: '#/definitions/RoomMediaType'