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

fix: Update OpenAPI type to Array from string #465

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

ajay-sentry
Copy link
Contributor

@ajay-sentry ajay-sentry commented Mar 20, 2024

Purpose/Motivation

Update openAPI type from string to array for better clarity on the docs here: https://docs.codecov.com/reference/repos_list

Links to relevant tickets

closes codecov/feedback#284

What does this PR do?

  • updates repo_list endpoint's names property on the OpenAPI schema from string to array
    • this should hopefully allow us to test names='A'&names='B' on the schema tester

Screenshots

Screenshot 2024-03-21 at 8 48 05 AM

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@extend_schema(
summary="Repository list",
parameters=[
OpenApiParameter(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inspiration from this thread: tfranzel/drf-spectacular#267

OpenApiParameter(
name="names",
type={"type": "array", "items": "string"},
explode=True,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added explode after reading about it here: https://swagger.io/docs/specification/describing-parameters/

@codecov-staging
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.05%. Comparing base (33fa79d) to head (24cd77e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #465   +/-   ##
=======================================
  Coverage   96.05%   96.05%           
=======================================
  Files         643      643           
  Lines       17127    17127           
=======================================
  Hits        16451    16451           
  Misses        676      676           
Flag Coverage Δ
unit 96.05% <100.00%> (ø)
unit-latest-uploader 96.05% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codecov-public-qa bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (33fa79d) 96.05% compared to head (24cd77e) 96.05%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #465   +/-   ##
=======================================
  Coverage   96.05%   96.05%           
=======================================
  Files         643      643           
  Lines       17127    17127           
=======================================
  Hits        16451    16451           
  Misses        676      676           
Flag Coverage Δ
unit 96.05% <100.00%> (ø)
unit-latest-uploader 96.05% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/public/v2/repo/views.py 100.00% <100.00%> (ø)

Impacted file tree graph

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.77%. Comparing base (af074c2) to head (30a5f7e).

❗ Current head 30a5f7e differs from pull request most recent head 80bfca0. Consider uploading reports for the commit 80bfca0 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #465     +/-   ##
=======================================
- Coverage   95.78   95.77   -0.01     
=======================================
  Files        765     765             
  Lines      17706   17694     -12     
=======================================
- Hits       16958   16946     -12     
  Misses       748     748             
Flag Coverage Δ
unit ?
unit-latest-uploader ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ajay-sentry ajay-sentry merged commit b4455e3 into main Mar 26, 2024
19 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/284-more-repo-names branch March 26, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specifying more than repo name via names doesn't appear to work
2 participants