fix: remove all potentially undefined parameter types#555
Merged
Conversation
This doesn't affect the parameters themselves
Member
Author
|
Here is an example from "repos/list-for-org": {
parameters: {
query?: {
/** @description Specifies the types of repositories you want returned. */
type?: "all" | "public" | "private" | "forks" | "sources" | "member";
/** @description The property to sort the results by. */
sort?: "created" | "updated" | "pushed" | "full_name";
/** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */
direction?: "asc" | "desc";
per_page?: components["parameters"]["per-page"];
page?: components["parameters"]["page"];
};
path: {
org: components["parameters"]["org"];
};
};With the change, the type will simply remove the potential of it being undefined, and the parameters are returned like they should. This doesn't affect the individual parameters. If they are set as optional, they are still returned as optional |
gr2m
approved these changes
Jun 10, 2023
Contributor
gr2m
left a comment
There was a problem hiding this comment.
Great work figuring that out 👏🏼
Contributor
|
🎉 This PR is included in version 9.3.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Contributor
|
🎉 This PR is included in version 10.0.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
This doesn't affect the parameters themselves
Resolves #554
Behavior
Before the change?
neverAfter the change?
neverOther information
Additional info
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
Type: Breaking changelabel)If
Yes, what's the impact:Pull request type
Please add the corresponding label for change this PR introduces:
Type: Bug