Skip to content

Conversation

@nolannbiron
Copy link
Member

@nolannbiron nolannbiron commented Nov 12, 2025

Only show endpoint scopes in Required scopes. For OAuth2, add Available scopes back to the Authorization section if no endpoint scopes are present.

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2025

🦋 Changeset detected

Latest commit: c87eda1

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

This PR includes changesets to release 2 packages
Name Type
@gitbook/react-openapi Patch
gitbook Patch

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reorganizes how OAuth2 scopes are displayed in the OpenAPI documentation interface by introducing a new "available scopes" section that shows all scopes defined in OAuth2 flows when no specific scopes are required for a security scheme.

Key Changes:

  • Added "available_scopes" translation key across all supported languages
  • Modified OpenAPISchemaScopes to support both required and available scopes display modes
  • Updated OAuth2 security display logic to show available scopes when no specific scopes are required

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

File Description
packages/react-openapi/src/OpenAPIRequiredScopes.tsx Made OpenAPISchemaScopes component public and added support for OAuth2 available scopes display mode
packages/react-openapi/src/OpenAPISecurities.tsx Added logic to display available scopes from OAuth2 flows when no specific scopes are required
packages/react-openapi/src/translations/*.ts Added "available_scopes" translation key for 8 languages (en, de, es, fr, ja, nl, no, pt-br, zh)
.changeset/calm-shirts-tie.md Added changeset documenting the OAuth2 scopes reorganization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@argos-ci
Copy link

argos-ci bot commented Nov 12, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) 👍 Changes approved 28 changed Nov 12, 2025, 6:31 PM
v2-cloudflare (Inspect) 👍 Changes approved 3 changed Nov 12, 2025, 6:35 PM
v2-vercel (Inspect) 👍 Changes approved 3 changed Nov 12, 2025, 6:34 PM

@nolannbiron nolannbiron merged commit a512c90 into main Nov 12, 2025
16 checks passed
@nolannbiron nolannbiron deleted the nolann/fix-oauth2-scopes branch November 12, 2025 18:40
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.

3 participants