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

Adding Tunable SuccessStatusCode either 200 or 201 for Example Prepator #57

Closed
wants to merge 1 commit into from

Conversation

Wilkins
Copy link
Contributor

@Wilkins Wilkins commented Feb 7, 2024

Examples from the doc always expect status code 200.

We now check the 200 and 201 success codes from the possibles responses, and check against the success code defined in the openapi file.

Example :
the /student-applications/{studentApplicationId}/submit returns a 201.

But it was failing because api-tester was expecting a 200 on success

Fixes :

examples - oc_api_student_application_post - properties
examples - oc_api_disqualify_student_application_post - properties
examples - oc_api_churn_student_application_post - properties
examples - oc_api_admit_student_application_post - properties
examples - oc_api_submit_student_application_post - properties

JIRA

@Wilkins Wilkins requested review from sidux and DotnDev February 7, 2024 10:24
@Wilkins Wilkins self-assigned this Feb 7, 2024
@Wilkins Wilkins force-pushed the success_201_for_example branch from 5ad88ad to 4f1c783 Compare February 7, 2024 13:03
Copy link

github-actions bot commented Feb 7, 2024

Issued by Coverage Checker:

Coverage

❌ Your code coverage has been degraded 😭

Measure Main branch refs/pull/57/merge
Coverage 43.856% 43.783%
Total lines 3003 3008
Covered lines 1317 1317

∆ -0.073

@Wilkins Wilkins force-pushed the success_201_for_example branch 2 times, most recently from 269c7be to dfb5a85 Compare February 7, 2024 13:09
@Wilkins Wilkins force-pushed the success_201_for_example branch from dfb5a85 to 3bd4f9f Compare February 7, 2024 13:12
@sidux sidux closed this Feb 19, 2024
@sidux
Copy link
Collaborator

sidux commented Feb 19, 2024

code duplicated and merged from the other branch (faker update)

@sidux
Copy link
Collaborator

sidux commented Feb 19, 2024

@Wilkins examples don't always expect 200, they expect 200 if the response example fails to load because of missing a required property example, but this code still fixes the issue in that case, meanwhile I also merged an other branch that auto generates missing examples so that loading example never fails

@sidux sidux deleted the success_201_for_example branch February 19, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants