Skip to content

Conversation

dsuket
Copy link
Contributor

@dsuket dsuket commented Jun 11, 2025

Description

To use ResponseSamples not only for responses but also for requests, I’m renaming it to a more general, shared name.

Motivation and Context

To address Issue #1158, I need to organize the example-related parts.
This is the second step toward that goal.

Ref: #1161

How Has This Been Tested?

  • Pass npm run build
  • Pass npm run test
  • I went through the demo API and tests and confirmed that the examples are being displayed properly.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
    • Refactoring

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

Copy link

Visit the preview URL for this PR (updated for commit 4793355):

https://docusaurus-openapi-36b86--pr1162-3uqvkzkg.web.app

(expires Fri, 11 Jul 2025 22:03:39 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

Copy link
Member

@sserrata sserrata left a comment

Choose a reason for hiding this comment

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

LGTM

@sserrata sserrata self-assigned this Jun 26, 2025
@sserrata sserrata added the chore label Jun 26, 2025
@sserrata sserrata merged commit 02c5c11 into PaloAltoNetworks:main Jun 26, 2025
9 checks passed
@wkotlowski
Copy link

wkotlowski commented Jul 24, 2025

Hey @dsuket, @sserrata
I recently updated my docusarurus project to 3.8.1 and bumped the openapi-docs theme to 4.5.1. I cleaned up generated API docs using:

yarn docusaurus clean-api-docs all

and rebuilt them using:

yarn docusaurus gen-api-docs all

When I start up my server locally, I'm getting:

Module not found: Error: Can't resolve '@theme/ResponseSamples' in 'my-path-xxxx

I checked and the generated files still contain the import ResponseSamples from "@theme/ResponseSamples"; and use ResponseSamples instead of CodeSamples.

Do you have any tip that would help me to fix it?

@wkotlowski
Copy link

Ah, nevermind @dsuket @sserrata, I just noticed this in my dependencies:

"docusaurus-plugin-openapi-docs": "4.0.1",
"docusaurus-theme-openapi-docs": "4.5.1",

@dsuket dsuket deleted the refactor-ResponseSamples branch October 11, 2025 08:44
dsuket added a commit to dsuket/docusaurus-openapi-docs that referenced this pull request Oct 13, 2025
fix: change label

change tab label name of anyOf/oneOf

build

feat: refactor request and response example

fix: primitive

add build

fix: Added handling for when there is no schema.

feat: Add new endpoints for allOf with nested array items and properties in OpenAPI schema

[Enhancement] Add vendor extension support for positioning sidebar items (PaloAltoNetworks#1160)

* Add support for x-position vendor extension and sorting logic

* Add position and x-position types

chore: restrict workflows to main repo (PaloAltoNetworks#1169)

docs: fix typos and tables (PaloAltoNetworks#1170)

Change the tab label of anyOf/oneOf (PaloAltoNetworks#1167)

* feat: support null type

* fix: fix tab label

refactor: refactor request and response example (PaloAltoNetworks#1161)

* feat: refactor request and response example

* fix: primitive

refactor: change ResponseSamples to CodeSamples (PaloAltoNetworks#1162)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants