Skip to content

feat(openapi-typescript): support JSDoc examples from JSON schema examples array #2374

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

Conversation

cmlee-accelins
Copy link
Contributor

@cmlee-accelins cmlee-accelins commented Jul 11, 2025

Changes

Implements #2371

Add JSDoc support for the recommended examples array on JSON Schema objects. Previously, only examples in the singular example property were added to the JSDoc, and now all examples in the examples array are also added as separate examples.

How to Review

The code change was very minor, but since many of the example specs used examples already, the snapshots were updated in many places.

Checklist

  • Unit tests updated
  • [n/a] docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

@cmlee-accelins cmlee-accelins requested a review from a team as a code owner July 11, 2025 10:56
Copy link

netlify bot commented Jul 11, 2025

Deploy Preview for openapi-ts ready!

Name Link
🔨 Latest commit 247b337
🔍 Latest deploy log https://app.netlify.com/projects/openapi-ts/deploys/6870f2358d4bf00008f4cf0c
😎 Deploy Preview https://deploy-preview-2374--openapi-ts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

changeset-bot bot commented Jul 11, 2025

🦋 Changeset detected

Latest commit: 247b337

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

This PR includes changesets to release 2 packages
Name Type
openapi-typescript Minor
swr-openapi Major

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

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

Great addition, and great tests! Thank you! No notes 🙂

@drwpow drwpow merged commit c5ebbb8 into openapi-ts:main Aug 11, 2025
11 checks passed
@openapi-ts-bot openapi-ts-bot mentioned this pull request Aug 11, 2025
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.

2 participants