-
Notifications
You must be signed in to change notification settings - Fork 4
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
docs(websoc): add openapi specifications to schema #87
base: main
Are you sure you want to change the base?
Conversation
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.
Great progress! There are some inaccuracies that need addressing, but clean those up and these are great additions.
Thanks for the suggestions, I apologize you had to leave a lot of suggestions on the PR that was bad of me I added your suggested fixes, and added more clarification by including 'WebSoc' in the descriptions as |
Please also ensure you resolve the merge conflict, mark previous comments you've fixed as resolved, and modify the PR title pursuant to the conventional commits standard. Your PR will be squashed and rebased onto |
@vinnyho looks like a lot of good progress so far! One small nitpick, could you rename the PR title to follow conventional commits Something like |
The merge conflict conflict seems to be happening as I add the description and example for quarter and year, I don't think I can resolve it without just removing what I added. |
A correct merge conflict resolution is an actual merge commit with the tip of your PR branch as first parent and |
I believe I fixed the issue, but I don't know for sure. This is my first time dealing with merging conflicts as I didn't come across it with other PRs. Please let me know if I did anything wrong thank you |
ge: z | ||
.enum(geCategories) | ||
.optional() | ||
.openapi({ description: "The general education category of the course", example: "GE-1A" }) |
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.
Comment about singular course and notion of query search parameter vis-a-vis response subfield stands throughout this review.
sectionCodes: z | ||
.string() | ||
.optional() | ||
.openapi({ | ||
description: "The section code of the course", | ||
example: "35530", |
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.
The example should be expanded accordingly.
.transform((x) => (x === "ANY" ? undefined : x)), | ||
sectionType: z | ||
.union([z.enum(anyArray), z.enum(websocSectionTypes)]) | ||
.optional() | ||
.openapi({ | ||
description: "Filter courses by section type", |
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.
Expanding on the comment extending throughout this review: A section type describes a section; a course as a whole is not a lecture or recitation. In fact, a course can have sections of only one type or of multiple. Then it doesn't make sense to claim you can "filter courses by section type". Reword accordingly.
}), | ||
units: z.optional(z.literal("VAR").or(z.string())).openapi({ | ||
description: | ||
"Filter courses by unit count. 'VAR' filters for courses with variable unit ranges (e.g., '1-4')", |
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.
That is not all of the functionality of this parameter.
excludeRestrictionCodes: z | ||
.string() | ||
.optional() | ||
.openapi({ | ||
description: | ||
"Exclude courses by comma-separated restriction codes, see [Registrar's list](https://www.reg.uci.edu/enrollment/restrict_codes.html)", |
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.
Earlier comment about a different display name for this link stands. You also need to clearly indicate in text that this is a link; look at your local copy of the REST reference to see why the current description is problematic.
Description
websoc.ts
based off oflarc.ts
Related Issue
Closes #79
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: