Skip to content

fix: correct rules for name requirement#36

Merged
VisualBean merged 1 commit into
ByteBardOrg:vnextfrom
bielu:fix/validation-rules-adjustment
Jul 6, 2026
Merged

fix: correct rules for name requirement#36
VisualBean merged 1 commit into
ByteBardOrg:vnextfrom
bielu:fix/validation-rules-adjustment

Conversation

@bielu

@bielu bielu commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

About the PR

@VisualBean i found small bug when working on signalr client for scalar. the validation require name on Api not Http Api key, which is wrong against the async api schema

Changelog

  • breaking: adjusted validation rule for http api key / api key

Summary by CodeRabbit

  • Bug Fixes
    • Corrected security scheme validation so the name field is enforced for the appropriate scheme type (now applies to HTTP API key).
    • Kept all other security scheme validation rules unchanged.

@bielu bielu requested a review from VisualBean as a code owner July 5, 2026 11:00
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e6f56b4f-2d27-4248-9214-e63b1822de24

📥 Commits

Reviewing files that changed from the base of the PR and between 331fbae and 69bfb75.

📒 Files selected for processing (1)
  • src/ByteBard.AsyncAPI/Validation/Rules/AsyncApiSecuritySchemaRules.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/ByteBard.AsyncAPI/Validation/Rules/AsyncApiSecuritySchemaRules.cs

📝 Walkthrough

Walkthrough

The validation mapping in AsyncApiSecuritySchemaRules that determines which security scheme type requires the name field was updated to target SecuritySchemeType.HttpApiKey instead of SecuritySchemeType.ApiKey.

Changes

Security scheme validation fix

Layer / File(s) Summary
Required field mapping correction
src/ByteBard.AsyncAPI/Validation/Rules/AsyncApiSecuritySchemaRules.cs
The name field requirement in RequiredFieldsByType now applies to SecuritySchemeType.HttpApiKey instead of SecuritySchemeType.ApiKey.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: correcting the name requirement validation rule.
Description check ✅ Passed The description covers the bug and changelog, but it omits the template's Related Issues section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bielu bielu changed the title correct rules for name requirement fix: correct rules for name requirement Jul 5, 2026

@VisualBean VisualBean left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great find! Thanks for pushing the fix

@VisualBean

Copy link
Copy Markdown
Contributor

@bielu dont forget to sign your commits 😅

@bielu

bielu commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

I guess it is new requirement in this repo? as I didnt sign my commit in past prs 🤔, but will look into getting this commit sign now.

signed commit

Signed-off-by: Arkadiusz biel <bielu@bielu.com.pl>
@bielu bielu force-pushed the fix/validation-rules-adjustment branch from e40f9dc to 69bfb75 Compare July 5, 2026 22:20
@bielu

bielu commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

@VisualBean signed now :)

@VisualBean

VisualBean commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

I guess it is new requirement in this repo? as I didnt sign my commit in past prs 🤔, but will look into getting this commit sign now.

No, I just bypassed rules the other times 😅.
Thank you for signing them!

@VisualBean VisualBean merged commit f525a15 into ByteBardOrg:vnext Jul 6, 2026
8 checks passed
VisualBean pushed a commit that referenced this pull request Jul 6, 2026
@VisualBean

Copy link
Copy Markdown
Contributor

Released as ByteBard.AsyncAPI.NET.3.0.1-beta.17

@bielu

bielu commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

confirmed all works as expected, happy to use it for now as beta, until we have more fixes :)

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.

2 participants