Skip to content
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

GET /v1/courses/sections does not conform to OpenAPI schema #211

Open
DonIsaac opened this issue Apr 26, 2021 · 5 comments
Open

GET /v1/courses/sections does not conform to OpenAPI schema #211

DonIsaac opened this issue Apr 26, 2021 · 5 comments
Assignees

Comments

@DonIsaac
Copy link
Member

DonIsaac commented Apr 26, 2021

Description

Describe the bug

GET /v1/courses/sections returns an array of an array of courses instead of an array of courses

Provide the Endpoint

GET /v1/courses/sections

Expected Behavior

It returns an array of course objects

Actual Behavior

It returns an array of an array of course objects

Reproduction and Context

Literally just go to the endpoint

@Josiassejod1
Copy link
Contributor

i threw the response from the endpoint in the json formatted and it seems to be okay and match the output of that of the Open Schema https://jsonformatter.curiousconcept.com/#

@tybug
Copy link
Contributor

tybug commented Jun 21, 2021

as above the response from the endpoint does seem valid to me, @DonIsaac can you double check / clarify your concerns?

image

@DonIsaac DonIsaac self-assigned this Jun 21, 2021
@DonIsaac
Copy link
Member Author

as above the response from the endpoint does seem valid to me, @DonIsaac can you double check / clarify your concerns?

# openapi.yaml, line 979
semester:
  type: number
  example: 201501
  description: Numeric representation of the semester, in format YYYYMM

The semester number returned by the endpoint is a string.

Also, a good deal of these should be integers, not strings.

@tybug
Copy link
Contributor

tybug commented Jun 21, 2021

If we change the types of those params now it will be a breaking change to applications, so I think it's in our best interest to leave it for a v2 instead.

fwiw, the typing of some of these attributes has already been noted in #215.

@DonIsaac
Copy link
Member Author

In that case, lets update the OpenAPI schema to reflect what is actually being returned. There's a pending test associated with this, someone should open a PR, fix this, and remove the pending status from the related test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants