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

[PM-9361] Generate Swagger specs in CI for the SDK #4428

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

dani-garcia
Copy link
Member

@dani-garcia dani-garcia commented Jun 28, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-9361

📔 Objective

Update the CI build script to also generate the swagger specs for the internal API and the identity API, which are used to generate the bitwarden-api-* crates for the SDK.

While implementing this I noticed that the internal API specs were failing to generate with the following error:

Ambiguous HTTP method for action - Bit.Api.AdminConsole.Controllers.OrganizationAuthRequestsController.ValidateAdminRequest (Api). Actions require an explicit HttpMethod binding for Swagger/OpenAPI 3.0

I've marked ValidateAdminRequest as [NonAction] so the spec generator doesn't try to parse this function as an action. Marking it as private or protected would also work, but this function is also used in some tests.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@dani-garcia dani-garcia force-pushed the ps/sdk-swaggergen-ci branch 2 times, most recently from d19f83b to 2f66851 Compare June 28, 2024 11:52
Copy link
Contributor

github-actions bot commented Jun 28, 2024

Logo
Checkmarx One – Scan Summary & Details6ad7eeab-58ec-4356-bff5-6fe630f9de16

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Unpinned Actions Full Length Commit SHA /build.yml: 598 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build.yml: 515 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build.yml: 548 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.91%. Comparing base (8253de3) to head (f087ca8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4428   +/-   ##
=======================================
  Coverage   41.91%   41.91%           
=======================================
  Files        1288     1288           
  Lines       60921    60921           
  Branches     5597     5597           
=======================================
  Hits        25532    25532           
  Misses      34200    34200           
  Partials     1189     1189           

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

@dani-garcia dani-garcia changed the title Generate Swagger specs in CI for the SDK [PM-9361] Generate Swagger specs in CI for the SDK Jun 28, 2024
@dani-garcia dani-garcia marked this pull request as ready for review June 28, 2024 13:30
@dani-garcia dani-garcia requested review from a team as code owners June 28, 2024 13:30
Copy link
Member

@vincentsalucci vincentsalucci left a comment

Choose a reason for hiding this comment

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

AC owned file change makes sense - thanks @dani-garcia !

@dani-garcia dani-garcia merged commit 1a584b4 into main Aug 20, 2024
51 checks passed
@dani-garcia dani-garcia deleted the ps/sdk-swaggergen-ci branch August 20, 2024 13:34
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.

None yet

4 participants