-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation to several schedule endpoints #836
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,16 @@ public SchedulesController(IScheduleService scheduleService) | |
/// <remarks> | ||
/// Creates new EventOccurence instance and related ScheduledEvents | ||
/// Information on input format could be found here: https://docs.microsoft.com/en-us/graph/outlook-schedule-recurring-events | ||
/// Pattern | ||
/// type: 0 - daily, 1 - weekly, 2 - absolute monthly, 3 - relative monthly; | ||
/// days of week: 0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday; | ||
/// month index: 0 - Undefined, 1 - First, 2 - Second, 3 - Third, 4 - Fourth, 5 - Last; | ||
/// dates: 1-31; | ||
/// Range | ||
/// range: stardDate and finishDate in DateTime type; | ||
/// </remarks> | ||
/// | ||
/// | ||
/// <response code="200">Successful add of schedule</response> | ||
/// <response code="HTTP: 400, API: 0">Can not create schedule due to wrong request data</response> | ||
/// <response code="HTTP: 404, API: 3">Can not create schedule due to missing request data</response> | ||
|
@@ -55,6 +64,17 @@ public async Task<ActionResult<EventOccurrenceDTO>> PostSchedule([FromBody] Crea | |
/// <summary> | ||
/// Get schedule by id | ||
/// </summary> | ||
/// <remarks> | ||
/// Schedules | ||
/// id: eventOccurrenceID; | ||
/// studentGroupID: student group id to wich is schedule attached to; | ||
/// pattern(type): 0 - daily, 1 - weekly, 2 - absolute monthly, 3 - relative monthly; | ||
/// Events - events wich are contained in schedules. | ||
/// id: EventID | ||
/// studentGroupID: student group id to wich is event occurrences attached to; | ||
/// themID, mentorID: them and mentor ids | ||
/// </remarks> | ||
/// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty space |
||
/// <response code="200">Successful return of schedule</response> | ||
/// <response code="HTTP: 404, API: 3">No such event occurence</response> | ||
[SwaggerResponse(200, type: typeof(EventOccurrenceDTO))] | ||
|
@@ -70,6 +90,15 @@ public async Task<ActionResult<EventOccurrenceDTO>> GetEventOccurenceById(long i | |
/// <summary> | ||
/// Get detailed schedule by id | ||
/// </summary> | ||
/// <remarks> | ||
/// Pattern | ||
/// type: 0 - daily, 1 - weekly, 2 - absolute monthly, 3 - relative monthly; | ||
/// days of week: 0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday; | ||
/// month index: 0 - Undefined, 1 - First, 2 - Second, 3 - Third, 4 - Fourth, 5 - Last; | ||
/// dates: 1-31; | ||
/// Range | ||
/// range: stardDate and finishDate in DateTime type; | ||
/// </remarks> | ||
/// <response code="200">Successful return of detailed schedule</response> | ||
/// <response code="HTTP: 404, API: 3">No such event occurence</response> | ||
[SwaggerResponse(200, type: typeof(DetailedEventOccurrenceDTO))] | ||
|
@@ -85,6 +114,15 @@ public async Task<ActionResult<DetailedEventOccurrenceDTO>> GetDetailedEventOccu | |
/// <summary> | ||
/// Returns the list of events depending on the filtering rules set | ||
/// </summary> | ||
/// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty space |
||
/// <remarks> | ||
/// Return result by filtering data with parameters | ||
/// </remarks> | ||
/// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty space |
||
/// <param name="request"> | ||
/// Mention courseID, mentorID, groupID, themeID, etc to filter all schedules | ||
/// All params are optional | ||
/// </param> | ||
/// <response code="200">Successful return event list</response> | ||
[SwaggerResponse(200, type: typeof(IList<ScheduledEventDTO>))] | ||
[Authorize(Roles = "Secretary, Admin, Mentor, Student")] | ||
|
@@ -102,6 +140,7 @@ public async Task<ActionResult<IList<ScheduledEventDTO>>> GetEventsFiltered(Sche | |
/// <remarks> | ||
/// Event date could not changed via this method. | ||
/// Event start and Finish could only be used to change event start and finish time. | ||
/// Choose range of events in "filter" block and change in request | ||
/// </remarks> | ||
/// <response code="200">Successful update of schedule</response> | ||
/// <response code="HTTP: 404, API: 3">Error, update data is missing</response> | ||
|
@@ -127,6 +166,13 @@ public async Task<ActionResult<IList<ScheduledEventDTO>>> UpdateEventRange([From | |
/// Old instance of event occurrence is replaced with the new one (id is the same). | ||
/// Scheduled events are recreated accordingly. | ||
/// Any events with lessons attached are not removed | ||
/// Pattern | ||
/// type: 0 - daily, 1 - weekly, 2 - absolute monthly, 3 - relative monthly; | ||
/// days of week: 0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday; | ||
/// month index: 0 - Undefined, 1 - First, 2 - Second, 3 - Third, 4 - Fourth, 5 - Last; | ||
/// dates: 1-31; | ||
/// Range | ||
/// range: stardDate and finishDate in DateTime type; | ||
/// </remarks> | ||
/// <response code="200">Successful update of schedule</response> | ||
/// <response code="HTTP: 404, API: 3">Error, update data is missing</response> | ||
|
@@ -148,6 +194,11 @@ public async Task<ActionResult<EventOccurrenceDTO>> UpdateEventOccurrenceById(lo | |
/// <summary> | ||
/// Gets all schedules | ||
/// </summary> | ||
/// <remarks> | ||
/// id: eventOccurrenceID; | ||
/// studentGroupID: student group id to wich is event occurrences attached to; | ||
/// pattern(type): 0 - daily, 1 - weekly, 2 - absolute monthly, 3 - relative monthly; | ||
/// </remarks> | ||
/// <response code="200">Successfully returned a collection of event occurrences.</response> | ||
[SwaggerResponse(200, type: typeof(IList<EventOccurrenceDTO>))] | ||
[Authorize(Roles = "Secretary, Admin")] | ||
|
@@ -167,6 +218,7 @@ public async Task<ActionResult<IList<EventOccurrenceDTO>>> GetAllEventOccurrence | |
/// If no events are left, event occurrence is deleted completely | ||
/// Start and finish dates input is optional. Leave blanc to remove all related events | ||
/// Events with lessons attached are not deleted | ||
/// id: eventOccurrenceID; | ||
/// </remarks> | ||
/// <response code = "200" > Successful delete of schedule</response> | ||
/// <response code="HTTP: 404, API: 3">Error, given schedule not found</response> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty space