Skip to content

feat(openapi-typescript): add jsdoc comments to response object #2248

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

backflip
Copy link
Contributor

@backflip backflip commented Apr 9, 2025

Changes

This PR adds JSDoc comments like @example to response objects. We are missing them in our generated types. They are already present on request objects and in many other places.

How to Review

See changes in examples/digital-ocean-api.ts below.

Checklist

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

@backflip backflip requested a review from a team as a code owner April 9, 2025 11:34
@backflip backflip requested a review from gzm0 April 9, 2025 11:34
Copy link

netlify bot commented Apr 9, 2025

👷 Deploy request for openapi-ts pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 9373151

Copy link

changeset-bot bot commented Apr 9, 2025

⚠️ No Changeset found

Latest commit: 9373151

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@gzm0 gzm0 left a comment

Choose a reason for hiding this comment

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

TY very much for the contribution.

Review note: I have verified that the added examples appear verbatim in the original OpenAPI (and are not generated). As such, I am not worried about code bloat or duplicated examples. It is up to the OpenAPI author to decide at which level to add examples (object or object field, etc.).

@gzm0 gzm0 merged commit 6d86670 into openapi-ts:main Apr 10, 2025
8 checks passed
gzm0 added a commit that referenced this pull request Apr 10, 2025
@gzm0
Copy link
Contributor

gzm0 commented Apr 10, 2025

Dang... We should have included a changeset here :(

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