Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: '2.0'
- info:
- description: |
- This is where you can find all the User Stories we created
- [Google Sheet](https://docs.google.com/spreadsheets/d/1qIuBUrLQgBTlntmr3HLEKPQhXrZkuE8ijw9zai3r7zg/edit?usp=sharing)
- version: 1.0.0
- title: Prisoners at School
- termsOfService: https://www.unitn.it/en/ateneo/51110/legal-information
- contact:
- name: Issues page
- url: https://github.com/MattiaCarolo/SE2_Project/issues
- email: vittoria.chierzi@studenti.unitn.it
- license:
- name: Node JS
- url: https://github.com/nodejs/node/blob/master/LICENSE
- tags:
- - name: Teacher
- description: Tools to manage courses
- consumes:
- - application/json
- produces:
- - application/json
- paths:
- /course/calendar:
- post:
- tags:
- - Teacher
- summary: Add all calendars to the course
- operationId: createAllCalendar
- consumes:
- - application/json
- produces:
- - application/json
- parameters:
- - in: body
- name: name
- description: Calendar object that needs to be added
- required: true
- schema:
- type:
- properties:
- name:
- type: string
- lunedi:
- type: string
- martedi:
- type: string
- mercoledi:
- type: string
- giovedi:
- type: string
- venerdi:
- type: string
- responses:
- 200:
- description: successful operation
- schema:
- $ref: '#/definitions/Calendars'
- 405:
- description: Invalid input
- /course/calendar/{id}:
- get:
- tags:
- - Teacher
- summary: Return calendar based on course
- operationId: getCalendarByCourse
- produces:
- - application/json
- parameters:
- - name: id
- in: query
- description: Course id that need to be retrived
- required: true
- type: string
- responses:
- 200:
- description: successful operation
- schema:
- $ref: '#/definitions/Calendars2'
- 400:
- description: Invalid status value
- post:
- tags:
- - Teacher
- summary: Add all calendars to the course
- operationId: createAllCalendar
- consumes:
- - application/json
- produces:
- - application/json
- parameters:
- - in: body
- name: body
- description: Calendar object that needs to be added
- required: true
- schema:
- $ref: '#/definitions/Calendars2'
- responses:
- 200:
- description: successful operation
- schema:
- $ref: '#/definitions/Calendars'
- 405:
- description: Invalid input
- schema:
- $ref: '#/definitions/Calendars'
- /course/calendar/{id}/{name}:
- put:
- tags:
- - Teacher
- summary: Update an existing calendar
- operationId: modifyCalendarByName
- consumes:
- - application/json
- produces:
- - application/json
- parameters:
- - name: id
- in: body
- description: id of the course
- required: true
- schema:
- type: object
- properties:
- name:
- type: string
- lunedi:
- type: string
- martedi:
- type: string
- mercoledi:
- type: string
- giovedi:
- type: string
- venerdi:
- type: string
- - name: name
- in: body
- description: name of the course
- required: true
- schema:
- type: object
- properties:
- name:
- type: string
- lunedi:
- type: string
- martedi:
- type: string
- mercoledi:
- type: string
- giovedi:
- type: string
- venerdi:
- type: string
- responses:
- 200:
- description: successful operation
- schema:
- $ref: '#/definitions/Calendars2'
- 400:
- description: Invalid ID supplied
- 404:
- description: calendar not found
- 405:
- description: Validation exception
- delete:
- tags:
- - Teacher
- summary: Deletes a single calendar
- operationId: deleteCalendarByName
- produces:
- - application/json
- parameters:
- - in: body
- name: id
- description: id of the course
- required: true
- schema:
- $ref: '#/definitions/Calendars2'
- - in: body
- name: name
- description: id of the course
- required: true
- schema:
- $ref: '#/definitions/Calendars2'
- responses:
- 200:
- description: successful operation
- schema:
- $ref: '#/definitions/Calendars2'
- 400:
- description: Invalid ID supplied
- 404:
- description: calendar not found
- definitions:
- Calendars:
- allOf:
- - $ref: '#/definitions/Calendars2'
- - required:
- - idcourse
- - Calendars2
- properties:
- idcourse:
- type: integer
- Calendars2:
- type: object
- Calendars2:
- allOf:
- - required:
- - name
- - lunedi
- - martedi
- - mercoledi
- - giovedi
- - venerdi
- properties:
- name:
- type: string
- lunedi:
- type: string
- martedi:
- type: string
- mercoledi:
- type: string
- giovedi:
- type: string
- venerdi:
- type: string
- externalDocs:
- description: Find out more about Swagger
- url: http://swagger.io
- # Added by API Auto Mocking Plugin
- host: virtserver.swaggerhub.com
- basePath: /VittoriaChierzi/try/1.0.0
- schemes:
- - https
- - http
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement