Skip to content

chore: enforce explicit API visibility decisions - #887

Open
Aniruddha-Shriwant wants to merge 5 commits into
mainfrom
chore/enforce-operation-visibility-marker
Open

chore: enforce explicit API visibility decisions#887
Aniruddha-Shriwant wants to merge 5 commits into
mainfrom
chore/enforce-operation-visibility-marker

Conversation

@Aniruddha-Shriwant

@Aniruddha-Shriwant Aniruddha-Shriwant commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a native Redocly configurable rule requiring every OpenAPI Operation Object to explicitly set x-internal to the boolean value true or false.

The Redocly configuration declares all 11 role roots, so local hooks, manual validation, and CI use one command with no custom JavaScript plugin, changed-file wrapper, or repository-owned rule test harness:

npx --yes @redocly/cli@2.51.2 lint --config redocly.visibility.yaml

The tracked dev/githooks/pre-commit hook runs this command when a commit contains staged OpenAPI YAML changes. Developers enable the repository hooks once with:

git config core.hooksPath dev/githooks

Validation

  • All 11 configured API roots pass the native Redocly visibility rule
  • A real local commit with a staged missing marker was blocked by the pre-commit hook with the exact source location
  • A controlled CI probe failed visibility-lint with the same missing-marker error and exit code 1
  • The temporary probe commits were removed; the PR branch was restored to its clean validated head
  • Missing markers and non-boolean values are rejected by the JSON Schema assertion
  • Shell syntax and diff whitespace validation pass
  • Net diff against main is limited to the Redocly config, CI workflow, tracked Git hook, and README

Repository follow-up

After this workflow lands and produces its first status on main, add the visibility-lint job to the required status checks.

Clickup

app.clickup.com

@github-actions github-actions Bot added the size/M Medium PR label Sep 4, 2026
@Aniruddha-Shriwant
Aniruddha-Shriwant force-pushed the chore/enforce-operation-visibility-marker branch from 065b874 to f9aa197 Compare September 9, 2026 12:40
@github-actions github-actions Bot added size/L Large PR and removed size/M Medium PR labels Sep 9, 2026
@Aniruddha-Shriwant
Aniruddha-Shriwant changed the base branch from main to chore/backfill-operation-visibility September 9, 2026 12:40
@github-actions github-actions Bot added size/M Medium PR and removed size/L Large PR labels Sep 9, 2026
@Aniruddha-Shriwant
Aniruddha-Shriwant force-pushed the chore/enforce-operation-visibility-marker branch from f2d2baa to fe5502d Compare September 10, 2026 04:26
@github-actions github-actions Bot added size/L Large PR and removed size/M Medium PR labels Sep 10, 2026
@Aniruddha-Shriwant
Aniruddha-Shriwant changed the base branch from chore/backfill-operation-visibility to main September 10, 2026 04:30
@github-actions github-actions Bot added size/M Medium PR and removed size/L Large PR labels Sep 10, 2026
@Aniruddha-Shriwant
Aniruddha-Shriwant force-pushed the chore/enforce-operation-visibility-marker branch from 1289826 to fe5502d Compare September 10, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR

Development

Successfully merging this pull request may close these issues.

1 participant