Skip to content
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

api(bump): 'id' attribute is always present in both previews & versions responses #61

Merged
merged 2 commits into from
Jun 18, 2021

Conversation

paulRbr
Copy link
Member

@paulRbr paulRbr commented Jun 18, 2021

This change tells the TS compiler that the Bump API will always answer with an id field in the responses for both POST /versions & POST /previews.

It doesn't change anything feature wise but will avoid useless JS guards when using those fields.

There no need to define an optional ID in the /versions API response
because if the HTTP status is ok we guarantee that its there. This
avoid adding extra defensive code in the CLI which will never be reached.
@paulRbr
Copy link
Member Author

paulRbr commented Jun 18, 2021

Thanks for the review 🙇!

@paulRbr paulRbr merged commit 96ac6bd into bump-sh:main Jun 18, 2021
@paulRbr paulRbr deleted the api-models branch June 18, 2021 11:38
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