Skip to content

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

Merged
gzm0 merged 1 commit intoopenapi-ts:mainfrom
backflip:main
Apr 10, 2025
Merged

feat(openapi-typescript): add jsdoc comments to response object#2248
gzm0 merged 1 commit intoopenapi-ts:mainfrom
backflip:main

Conversation

@backflip
Copy link
Copy Markdown
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
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 9, 2025

👷 Deploy request for openapi-ts accepted.

Name Link
🔨 Latest commit 9373151
🔍 Latest deploy log https://app.netlify.com/projects/openapi-ts/deploys/67f65b3fdd5fd7000826db75

@changeset-bot
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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