Skip to content

feat: enable schema-related rules for AsyncAPI and Arazzo#2183

Merged
tatomyr merged 10 commits intomainfrom
feat/enable-sheme-rules-for-asyncapi-and-arazzo
Jul 21, 2025
Merged

feat: enable schema-related rules for AsyncAPI and Arazzo#2183
tatomyr merged 10 commits intomainfrom
feat/enable-sheme-rules-for-asyncapi-and-arazzo

Conversation

@tatomyr
Copy link
Collaborator

@tatomyr tatomyr commented Jul 17, 2025

What/Why/How?

enabled the no-required-schema-properties-undefined, no-enum-type-mismatch, and no-schema-type-mismatch rules for AsyncAPI and Arazzo (since they also utilize JSON Schema), and adjusted the severities in our recommended and minimal rulesets. Please refer to the table for a comparison.

Screenshot 2025-07-18 at 16 45 20

Reference

Resolves #2128

Internal conversation: https://redoc-ly.slack.com/archives/C02UHE7EL3E/p1752846829965679

Testing

Screenshots (optional)

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2025

🦋 Changeset detected

Latest commit: 88af5be

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/openapi-core Minor
@redocly/cli Minor
@redocly/respect-core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 17, 2025

Command Mean [ms] Min [ms] Max [ms] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 918.5 ± 9.6 905.2 931.7 1.00
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1241.1 ± 18.1 1218.7 1281.3 1.35 ± 0.02

@tatomyr tatomyr force-pushed the feat/enable-sheme-rules-for-asyncapi-and-arazzo branch 2 times, most recently from 555b031 to ff6779d Compare July 18, 2025 16:02
@tatomyr tatomyr marked this pull request as ready for review July 18, 2025 16:40
@tatomyr tatomyr requested review from a team as code owners July 18, 2025 16:40
@tatomyr tatomyr force-pushed the feat/enable-sheme-rules-for-asyncapi-and-arazzo branch 2 times, most recently from c7f77ab to 426bb84 Compare July 21, 2025 14:36
import type { UserContext } from '../../walk.js';

export const NoSchemaTypeMismatch: Oas3Rule | Oas2Rule = () => {
export const NoSchemaTypeMismatch: Oas3Rule | Oas2Rule | Async3Rule | Async2Rule = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be Arazzo1 as well?
It seems you are using the cast anyway.
'no-schema-type-mismatch': NoSchemaTypeMismatch as Arazzo1Rule,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right. Thanks!

@tatomyr tatomyr force-pushed the feat/enable-sheme-rules-for-asyncapi-and-arazzo branch from 426bb84 to 5f67f54 Compare July 21, 2025 15:56
@tatomyr tatomyr force-pushed the feat/enable-sheme-rules-for-asyncapi-and-arazzo branch from 5f67f54 to 88af5be Compare July 21, 2025 16:01
@tatomyr tatomyr merged commit 6381911 into main Jul 21, 2025
37 checks passed
@tatomyr tatomyr deleted the feat/enable-sheme-rules-for-asyncapi-and-arazzo branch July 21, 2025 16:09
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.

Enable no-required-schema-properties-undefined rule for AsyncApi

3 participants