Repository navigation
chore: add no-sub-resources lint rule - #33
Merged
Merged
Conversation
Flag path keys with three or more slashes, following https://redocly.com/blog/no-subresources. Protocol-defined paths under /oauth2/ and /.well-known/ are excluded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
AI Review: 🟢 Completed
Note
Low Risk
Introduces a lint rule in redocly.yaml without altering published documentation content or runtime behavior. Blast radius is strictly limited to Redocly linting workflows.
Overview
Adds the rule/no-sub-resources assertion to redocly.yaml to flag OpenAPI paths containing three or more slashes, encouraging top-level resource design. Specific RFC-standardized path prefixes (/oauth2/ and /.well-known/) are excluded to accommodate fixed path patterns.
Changed pages
⚙️ Configuration or theme changed
AlbinaBlazhko17
approved these changes
Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
rule/no-sub-resourcestoredocly.yaml, based on Avoid sub-resources.How it differs from the blog snippet
/oauth2/and/.well-known/are excluded: their paths are fixed by RFC 7592 and RFC 8414. Without this,/oauth2/register/{clientId}fails lint.Verification (Redocly CLI 2.81.0)
/customers/{customerId}/subscriptions,/a/b/c/d,/x/oauth2/y/subscriptions/{subscriptionId},/oauth2/register/{clientId},/.well-known/oauth-authorization-server/tenant, a callback key with 3 slashes, a webhook nameda/b/c/dredocly linton the Cafe API passes.