Skip to content

Conversation

js2me
Copy link
Member

@js2me js2me commented Jul 14, 2021

Features:

Fixes:

laktak and others added 4 commits June 18, 2021 11:37
#268)

* added --unwrap-response-data to unwrap the data item from the response

* add axios --unwrap-response-data

Co-authored-by: Christian Zangl <chris@keeman.world>
Co-authored-by: Tiago Kaneta <tiago.kaneta@robovision.eu>
…272)

This commit adds additional type information to the route's response
object that allows types to be created that express the combination
of status code, data and headers for each response.

This type information can be used to "narrow" a response type based on
an HTTP status code. This narrowing is useful since it can prevent type
mismatches where a status code is presumed to have one type but in actuality
it returns another.

Additionally, response headers are now associated with data types and status
codes rather than being free form.

A caveat right now is that only there are no response codes like 3XX or
5XX, every code must be explicitly listed.
@js2me js2me merged commit 7df956c into master Jul 14, 2021
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.

4 participants