Skip to content

Tag grouping #269

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/controllers/astra.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var astraCollection *mongo.Collection = configs.GetCollection("astra")

// @Id AstraEvents
// @Router /astra/{date} [get]
// @Tags Events
// @Description "Returns AstraEvent based on the input date"
// @Produce json
// @Param date path string true "date (ISO format) to retrieve astra events"
Expand Down
1 change: 1 addition & 0 deletions api/controllers/autocomplete.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var DAGCollection *mongo.Collection = configs.GetCollection("DAG")

// @Id autocompleteDAG
// @Router /autocomplete/dag [get]
// @Tags Other
// @Description "Returns an aggregation of courses for use in generating autocomplete DAGs"
// @Produce json
// @Success 200 {object} schema.APIResponse[[]schema.Autocomplete] "An aggregation of courses for use in generating autocomplete DAGs"
Expand Down
6 changes: 6 additions & 0 deletions api/controllers/course.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var courseCollection *mongo.Collection = configs.GetCollection("courses")

// @Id courseSearch
// @Router /course [get]
// @Tags Courses
// @Description "Returns paginated list of courses matching the query's string-typed key-value pairs. See offset for more details on pagination."
// @Produce json
// @Param offset query number false "The starting position of the current page of courses (e.g. For starting at the 17th course, offset=16)."
Expand Down Expand Up @@ -79,6 +80,7 @@ func CourseSearch(c *gin.Context) {

// @Id courseById
// @Router /course/{id} [get]
// @Tags Courses
// @Description "Returns the course with given ID"
// @Produce json
// @Param id path string true "ID of the course to get"
Expand Down Expand Up @@ -109,6 +111,7 @@ func CourseById(c *gin.Context) {

// @Id courseAll
// @Router /course/all [get]
// @Tags Courses
// @Description "Returns all courses"
// @Produce json
// @Success 200 {object} schema.APIResponse[[]schema.Course] "All courses"
Expand Down Expand Up @@ -139,6 +142,7 @@ func CourseAll(c *gin.Context) {

// @Id courseSectionSearch
// @Router /course/sections [get]
// @Tags Courses
// @Description "Returns paginated list of sections of all the courses matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details."
// @Produce json
// @Param former_offset query number false "The starting position of the current page of courses (e.g. For starting at the 17th course, former_offset=16)."
Expand Down Expand Up @@ -166,6 +170,7 @@ func CourseSectionSearch() gin.HandlerFunc {

// @Id courseSectionById
// @Router /course/{id}/sections [get]
// @Tags Courses
// @Description "Returns the all of the sections of the course with given ID"
// @Produce json
// @Param id path string true "ID of the course to get"
Expand Down Expand Up @@ -270,6 +275,7 @@ func courseSection(flag string, c *gin.Context) {

// @Id trendsCourseSectionSearch
// @Router /course/sections/trends [get]
// @Tags Courses
// @Description "Returns all of the given course's sections. Specialized high-speed convenience endpoint for UTD Trends internal use; limited query flexibility."
// @Produce json
// @Param course_number query string true "The course's official number"
Expand Down
2 changes: 2 additions & 0 deletions api/controllers/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var eventsCollection *mongo.Collection = configs.GetCollection("events")

// @Id events
// @Router /events/{date} [get]
// @Tags Events
// @Description "Returns all sections with meetings on the specified date"
// @Produce json
// @Param date path string true "ISO date of the set of events to get"
Expand All @@ -45,6 +46,7 @@ func Events(c *gin.Context) {

// @Id eventsByBuilding
// @Router /events/{date}/{building} [get]
// @Tags Events
// @Description "Returns all sections with meetings on the specified date in the specified building"
// @Produce json
// @Param date path string true "ISO date of the set of events to get"
Expand Down
6 changes: 6 additions & 0 deletions api/controllers/grades.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import (

// @Id gradeAggregationBySemester
// @Router /grades/semester [get]
// @Tags Grades
// @Description "Returns grade distributions aggregated by semester"
// @Produce json
// @Param prefix query string false "The course's subject prefix"
Expand All @@ -71,6 +72,7 @@ func GradeAggregationSemester() gin.HandlerFunc {

// @Id gradeAggregationSectionType
// @Router /grades/semester/sectionType [get]
// @Tags Grades
// @Description "Returns the grade distributions aggregated by semester and broken down into section type"
// @Produce json
// @Param prefix query string false "The course's subject prefix"
Expand All @@ -89,6 +91,7 @@ func GradesAggregationSectionType() gin.HandlerFunc {

// @Id gradeAggregationOverall
// @Router /grades/overall [get]
// @Tags Grades
// @Description "Returns the overall grade distribution"
// @Produce json
// @Param prefix query string false "The course's subject prefix"
Expand All @@ -107,6 +110,7 @@ func GradesAggregationOverall() gin.HandlerFunc {

// @Id GradesByCourseID
// @Router /course/{id}/grades [get]
// @Tags Courses
// @Description "Returns the overall grade distribution for a course"
// @Produce json
// @Param id path string true "ID of course to get grades for"
Expand All @@ -121,6 +125,7 @@ func GradesByCourseID() gin.HandlerFunc {

// @Id GradesBySectionID
// @Router /section/{id}/grades [get]
// @Tags Sections
// @Description "Returns the overall grade distribution for a section"
// @Produce json
// @Param id path string true "ID of section to get grades for"
Expand All @@ -135,6 +140,7 @@ func GradesBySectionID() gin.HandlerFunc {

// @Id GradesByProfessorID
// @Router /professor/{id}/grades [get]
// @Tags Professors
// @Description "Returns the overall grade distribution for a professor"
// @Produce json
// @Param id path string true "ID of professor to get grades for"
Expand Down
1 change: 1 addition & 0 deletions api/controllers/mazevo.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var mazevoCollection *mongo.Collection = configs.GetCollection("mazevo")

// @Id MazevoEvents
// @Router /mazevo/{date} [get]
// @Tags Events
// @Description "Returns MazevoEvent based on the input date"
// @Produce json
// @Param date path string true "date (ISO format) to retrieve mazevo events"
Expand Down
8 changes: 8 additions & 0 deletions api/controllers/professor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var professorCollection *mongo.Collection = configs.GetCollection("professors")

// @Id professorSearch
// @Router /professor [get]
// @Tags Professors
// @Description "Returns paginated list of professors matching the query's string-typed key-value pairs. See offset for more details on pagination."
// @Produce json
// @Param offset query number false "The starting position of the current page of professors (e.g. For starting at the 17th professor, offset=16)."
Expand Down Expand Up @@ -87,6 +88,7 @@ func ProfessorSearch(c *gin.Context) {

// @Id professorById
// @Router /professor/{id} [get]
// @Tags Professors
// @Description "Returns the professor with given ID"
// @Produce json
// @Param id path string true "ID of the professor to get"
Expand Down Expand Up @@ -119,6 +121,7 @@ func ProfessorById(c *gin.Context) {

// @Id professorAll
// @Router /professor/all [get]
// @Tags Professors
// @Description "Returns all professors"
// @Produce json
// @Success 200 {object} schema.APIResponse[[]schema.Professor] "All professors"
Expand Down Expand Up @@ -149,6 +152,7 @@ func ProfessorAll(c *gin.Context) {

// @Id professorCourseSearch
// @Router /professor/courses [get]
// @Tags Professors
// @Description "Returns paginated list of the courses of all the professors matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details."
// @Produce json
// @Param former_offset query number false "The starting position of the current page of professors (e.g. For starting at the 17th professor, former_offset=16)."
Expand Down Expand Up @@ -184,6 +188,7 @@ func ProfessorCourseSearch() gin.HandlerFunc {

// @Id professorCourseById
// @Router /professor/{id}/courses [get]
// @Tags Professors
// @Description "Returns all the courses taught by the professor with given ID"
// @Produce json
// @Param id path string true "ID of the professor to get"
Expand Down Expand Up @@ -282,6 +287,7 @@ func professorCourse(flag string, c *gin.Context) {

// @Id professorSectionSearch
// @Router /professor/sections [get]
// @Tags Professors
// @Description "Returns paginated list of the sections of all the professors matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details."
// @Produce json
// @Param former_offset query number false "The starting position of the current page of professors (e.g. For starting at the 17th professor, former_offset=16)."
Expand Down Expand Up @@ -316,6 +322,7 @@ func ProfessorSectionSearch() gin.HandlerFunc {

// @Id professorSectionById
// @Router /professor/{id}/sections [get]
// @Tags Professors
// @Description "Returns all the sections taught by the professor with given ID"
// @Produce json
// @Param id path string true "ID of the professor to get"
Expand Down Expand Up @@ -433,6 +440,7 @@ func getProfessorQuery(flag string, c *gin.Context) (bson.M, error) {

// @Id trendsProfessorSectionSearch
// @Router /professor/sections/trends [get]
// @Tags Professors
// @Description "Returns all of the given professor's sections. Specialized high-speed convenience endpoint for UTD Trends internal use; limited query flexibility."
// @Produce json
// @Param first_name query string true "The professor's first name"
Expand Down
1 change: 1 addition & 0 deletions api/controllers/rooms.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var buildingCollection *mongo.Collection = configs.GetCollection("rooms")

// @Id rooms
// @Router /rooms [get]
// @Tags Events
// @Description "Returns all schedulable rooms being used in the current and futures semesters from CourseBook, Astra, and Mazevo"
// @Produce json
// @Success 200 {object} schema.APIResponse[[]schema.BuildingRooms] "All schedulable rooms being used in the current and futures semesters from CourseBook, Astra, and Mazevo"
Expand Down
2 changes: 2 additions & 0 deletions api/controllers/section.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var sectionCollection *mongo.Collection = configs.GetCollection("sections")

// @Id sectionSearch
// @Router /section [get]
// @Tags Sections
// @Description "Returns paginated list of sections matching the query's string-typed key-value pairs. See offset for more details on pagination."
// @Produce json
// @Param offset query number false "The starting position of the current page of sections (e.g. For starting at the 17th professor, offset=16)."
Expand Down Expand Up @@ -88,6 +89,7 @@ func SectionSearch(c *gin.Context) {

// @Id sectionById
// @Router /section/{id} [get]
// @Tags Sections
// @Description "Returns the section with given ID"
// @Produce json
// @Param id path string true "ID of the section to get"
Expand Down
5 changes: 5 additions & 0 deletions api/controllers/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func getOrCreateBucket(client *storage.Client, bucket string) (*storage.BucketHa

// @Id bucketInfo
// @Router /storage/{bucket} [get]
// @Tags Internal
// @Description "Get info on a bucket. This route is restricted to only Nebula Labs internal Projects."
// @Param bucket path string true "Name of the bucket"
// @Param x-storage-key header string true "The internal storage key"
Expand Down Expand Up @@ -92,6 +93,7 @@ func BucketInfo(c *gin.Context) {

// @Id deleteBucket
// @Router /storage/{bucket} [delete]
// @Tags Internal
// @Description "Delete a bucket. This route is restricted to only Nebula Labs internal Projects."
// @Param bucket path string true "Name of the bucket"
// @Param x-storage-key header string true "The internal storage key"
Expand Down Expand Up @@ -138,6 +140,7 @@ func DeleteBucket(c *gin.Context) {

// @Id objectInfo
// @Router /storage/{bucket}/{objectID} [get]
// @Tags Internal
// @Description "Get info on an object in a bucket. This route is restricted to only Nebula Labs internal Projects."
// @Param bucket path string true "Name of the bucket"
// @Param objectID path string true "ID of the object"
Expand Down Expand Up @@ -175,6 +178,7 @@ func ObjectInfo(c *gin.Context) {

// @Id postObject
// @Router /storage/{bucket}/{objectID} [post]
// @Tags Internal
// @Description "Upload an object to a bucket. This route is restricted to only Nebula Labs internal Projects."
// @Param bucket path string true "Name of the bucket"
// @Param objectID path string true "ID of the object"
Expand Down Expand Up @@ -239,6 +243,7 @@ func PostObject(c *gin.Context) {

// @Id deleteObject
// @Router /storage/{bucket}/{objectID} [delete]
// @Tags Internal
// @Description "Delete an object from a bucket. This route is restricted to only Nebula Labs internal Projects."
// @Param bucket path string true "Name of the bucket"
// @Param objectID path string true "ID of the object"
Expand Down
Loading