Skip to content

Conversation

MarBert
Copy link
Collaborator

@MarBert MarBert commented Sep 3, 2025

List of Changes

Add rapidoc as the api viewer

Motivation and Context

How Has This Been Tested?

on localhost

Screenshots (if appropriate):

image image

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@MarBert MarBert self-assigned this Sep 3, 2025
Copy link

changeset-bot bot commented Sep 3, 2025

🦋 Changeset detected

Latest commit: 121af18

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

This PR includes changesets to release 1 package
Name Type
nextjs-website 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

overflow: 'hidden',
}}
>
<rapi-doc
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you should remove the blue line at the top of the component
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i tried to add custom css like here: https://rapidocweb.com/api.html but it doesn't seem to work. The border is an inline style option, so there is some part in the rapidoc parser that sets it.
image

Copy link
Contributor

github-actions bot commented Sep 4, 2025

Branch is not up to date with base branch

@MarBert it seems this Pull Request is not updated with base branch.
Please proceed with a merge or rebase to solve this.

Copy link
Contributor

@Copilot 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 replaces the Stoplight Elements API viewer with RapiDoc for displaying API documentation. The change updates the API viewer component to use RapiDoc's custom web component instead of the previous Stoplight implementation.

  • Replace Stoplight Elements with RapiDoc library
  • Update component props by removing product dependency
  • Configure RapiDoc with theme-aware styling

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

File Description
package.json Adds RapiDoc dependency
ApiRestSection.tsx Removes product prop from ApiViewer component
ApiViewer.tsx Complete rewrite to use RapiDoc instead of Stoplight Elements
thick-spoons-double.md Changeset documenting the API viewer replacement

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

type ApiViewerProps = {
specURL: string;
product: Product;
hideTryIt?: boolean;
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

The hideTryIt prop is still defined in ApiViewerProps but is no longer used in the component. This creates an inconsistent API where the prop is accepted but ignored.

Suggested change
hideTryIt?: boolean;

Copilot uses AI. Check for mistakes.

const ApiViewer: FC<ApiViewerProps> = ({ specURL }) => {
const { palette } = useTheme();

// function that return current API component type
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

This comment is unclear and doesn't accurately describe what the function does. It should be updated to describe that the function renders a RapiDoc API viewer component.

Suggested change
// function that return current API component type
// Renders a RapiDoc API viewer component for the provided OpenAPI spec URL

Copilot uses AI. Check for mistakes.

show-method-in-nav-bar='as-plain-text'
spec-url={specURL}
text-color={palette.text.primary}
theme='light'
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

The theme is hardcoded to 'light' but the component uses theme-aware colors from Material-UI. Consider making this dynamic based on the current theme mode (light/dark).

Suggested change
theme='light'
theme={palette.mode}

Copilot uses AI. Check for mistakes.

Copy link
Contributor

github-actions bot commented Oct 8, 2025

This pull request is stale because it has been open for 14 days with no activity. If the pull request is still valid, please update it within 21 days to keep it open or merge it, otherwise it will be closed automatically.

@github-actions github-actions bot added the stale label Oct 8, 2025
# Conflicts:
#	apps/nextjs-website/src/components/molecules/ApiRestSection/ApiRestSection.tsx
Copy link
Contributor

github-actions bot commented Oct 8, 2025

Jira Pull Request Link

This Pull Request refers to the following Jira issue DEV-2699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants