Remove Reference type from Callbacks definition#92
Merged
jdesrosiers merged 3 commits intohyperjump-io:mainfrom Jan 4, 2026
Merged
Remove Reference type from Callbacks definition#92jdesrosiers merged 3 commits intohyperjump-io:mainfrom
jdesrosiers merged 3 commits intohyperjump-io:mainfrom
Conversation
jdesrosiers
reviewed
Dec 30, 2025
openapi-3-2/index.d.ts
Outdated
| }; | ||
|
|
||
| type Callbacks = Record<string, PathItem | Reference>; | ||
| type Callbacks = Record<string, PathItem>; |
Collaborator
There was a problem hiding this comment.
Callbacks is supposed to be the type for the "callbacks" field Components and Operations. I think what's actually needed is this,
Suggested change
| type Callbacks = Record<string, PathItem>; | |
| type Callback = Record<string, PathItem>; | |
| type Callbacks = Record<string, Callback | Reference>; |
Collaborator
There was a problem hiding this comment.
On second look, I think you're right. I got confused because of the naming like you said. So, ignore my suggestion and let's stick with the change you suggested including renaming Callbacks to Callback.
jdesrosiers
approved these changes
Jan 4, 2026
jdesrosiers
added a commit
that referenced
this pull request
Jan 19, 2026
* Remove Reference type from Callbacks definition * Rename Callbacks to Callback * Make the same Callback fix for OpenAPI 3.1 --------- Co-authored-by: Jason Desrosiers <jdesrosi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to https://spec.openapis.org/oas/v3.2.0.html#callback-object the type is
Path Item ObjectAlso I noticed that all names of types correspond to names from the spec without
Objectsuffix, butCallbacksis plural while in the spec it is calledCallback, so maybe change that to for consistency?I am actually surprised that specs does not allow
Referece Objectinside a callback map, but it is what it is, maybe they will allow it in the next version.