Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: allow following examples array #1219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
entropitor wants to merge 2 commits into PaloAltoNetworks:main
base: main
Choose a base branch
Loading
from entropitor:entropitor/zxzplzkvtnox

Conversation

@entropitor
Copy link

@entropitor entropitor commented Aug 25, 2025

Description

examples is the official openapi standard so it makes sense to support that as well

Copy link

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

https://docusaurus-openapi-36b86--pr1219-c98t0w0f.web.app

(expires 2025年9月24日 14:10:48 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

Copy link
Member

Hi @entropitor,

Supporting schema examples is a nice addition, but the implementation needs to guard against empty arrays so we don’t drop back to undefined examples.

If a schema or property sets examples: [], the new checks return examples[0] (undefined) instead of falling back to the generator. JSON Schema allows an empty array, so request/response examples (and property values) that previously rendered will now disappear.

Copy link
Author

Thanks for the review. Good catch, I've fixed it 👍

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /