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

@bielubielu 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 ownerJuly 5, 2026 11:00
@coderabbitai

coderabbitaiBot 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 nameStatusExplanation
Title check✅ PassedThe title clearly summarizes the main change: correcting the name requirement validation rule.
Description check✅ PassedThe description covers the bug and changelog, but it omits the template's Related Issues section.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck 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.

@bielubielu changed the title correct rules for name requirementfix: correct rules for name requirementJul 5, 2026

@VisualBeanVisualBean 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
ContributorAuthor

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
bieluforce-pushed the fix/validation-rules-adjustment branch from e40f9dc to 69bfb75CompareJuly 5, 2026 22:20
@bielu

bielu commented Jul 5, 2026

Copy link
Copy Markdown
ContributorAuthor

@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:vnextJul 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
ContributorAuthor

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

@bielu

bielu commented Aug 2, 2026

Copy link
Copy Markdown
ContributorAuthor

@VisualBean is there any chance to release stable 3.0.1? as preparing my library to stable release as would prefer to be dependant on stable version at this stage :)

@VisualBean

Copy link
Copy Markdown
Contributor

@VisualBean is there any chance to release stable 3.0.1? as preparing my library to stable release as would prefer to be dependant on stable version at this stage :)

Yeah no problem, I think enough time has passed on the beta release for this one.

@bielu

bielu commented Aug 2, 2026

Copy link
Copy Markdown
ContributorAuthor

Thanks!

Sign up for freeto 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

@bielu@VisualBean