Skip to content

feat: Support schema property examples - #1165

Closed
dsuket wants to merge 15 commits into
PaloAltoNetworks:mainfrom
dsuket:support-schema-property-examples
Closed

dsuket wants to merge 15 commits into
PaloAltoNetworks:mainfrom
dsuket:support-schema-property-examples

Conversation

@dsuket

@dsuket dsuket commented Jun 12, 2025 •

Copy link
Copy Markdown
Contributor

Description

Support examples of schema property

Motivation and Context

To address Issue #1158, I need to organize the example-related parts.
This is the 4th(final) step toward that goal.

Please see below first.

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)

example in request parameters schema

example in request parameters schema

examples in request parameters schema

examples in request parameters schema

example of properties in requestBody schema

example of properties in requestBody schema

examples of properties in requestBody schema

examples of properties in requestBody schema

example of schema properties in response

example of schema properties in response

examples of schema properties in response

examples of schema properties in response

Types of changes

  • New feature (non-breaking change which adds functionality)

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.

@dsuket
dsuket marked this pull request as ready for review June 13, 2025 00:50
@dsuket dsuket changed the title Support schema property examples feat: Support schema property examples Jun 13, 2025
@sserrata

Copy link
Copy Markdown
Member

Hi @dsuket, can you rebase and resolve conflicts?

@sserrata sserrata self-assigned this Jun 27, 2025
@sserrata sserrata added the reviewing 👀 Undergoing manual audit to determine if issue should still be active label Jun 27, 2025
@dsuket

dsuket commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

@sserrata Sorry for the late reply. I've updated the branch and confirmed that it's working as expected. Thank you.

@github-actions

github-actions Bot commented Jul 2, 2025

Copy link
Copy Markdown

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

https://docusaurus-openapi-36b86--pr1165-1l5b7pz6.web.app

(expires Fri, 01 Aug 2025 02:44:59 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@github-actions

github-actions Bot commented Jul 2, 2025

Copy link
Copy Markdown

Visual Diff Summary

View Logs

Total: 77, Matches: 58, Diffs: 19, Skipped: 0

Page Status
/tests/all-of-inherits-parent-required diff
/tests/all-of-with-nested-all-of diff
/tests/allof-variations-api diff
/tests/anyof-variations-api diff
/tests/get-document-with-header-parameter diff
/tests/get-entities-by-multiple-status diff
/tests/get-entities-by-status diff
/tests/get-item-by-id-label-style diff
/tests/get-product-by-code-matrix-style diff
/tests/get-user-by-id diff
/tests/get-user-preferences-with-cookie-parameter diff
/tests/get-with-cookie-parameters diff
/tests/get-with-header-parameters diff
/tests/object-with-boolean-additional-properties diff
/tests/object-with-schema-defined-additional-properties diff
/tests/object-with-typed-additional-properties diff
/tests/object-without-any-additional-properties diff
/tests/oneof-variations-api diff
/tests/search-with-various-query-parameter-styles diff

@sserrata

sserrata commented Jul 2, 2025

Copy link
Copy Markdown
Member

Hi @dsuket, similar to #1164, both the autogenerated and static example/examples are already rendered in the API Explorer component (for requests). I'm not sure we necessarily want to duplicate that in the main doc panel. That aside, I do think we should merge the enhancements made to property examples. Since we're not yet decided would it be too much to create a separate PR for the property example/examples support?

@dsuket

dsuket commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

@sserrata Thank you for your feedback. As I mentioned here, schema examples are not displayed in the API Explorer, so I think it makes sense to display them in main doc panel.

Also, I'll try to see if I can handle the property examples in a separate PR.
Thank you.

@dsuket

dsuket commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

I submitted a PR for the extracted property examples in #1198. I'll close this one.

@dsuket dsuket closed this Jul 7, 2025
@dsuket
dsuket deleted the support-schema-property-examples branch July 27, 2025 12:14

This branch had an error being deployed

1 failed deployment
default — ef5580aa Deployed Jul 7, 2025 by dsuket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewing 👀 Undergoing manual audit to determine if issue should still be active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants