Closed LeandroPereiraDaCruz closed 1 year ago
hmm, when I'm working with values that can be string | null
for example, I usually create an union between t.Null() and t.String()
t.Union([t.Null(), t.String()])
but having a helper package to do it would be very helpful
This merge request addresses an issue that was wrongly opened in the elysia repository: https://github.com/elysiajs/elysia/issues/124
Using responses types like
t.Void()
,t.Undefined()
ort.Null()
means that in fact there will be no content in the response. It could happen in a scenario of status code 204, when no respose is expected.But current behaviour is breaking the view, since it generates a response with a content that is not acceptable by swagger:
An example: Code:
Screen with current behavior: Screen with desirable behaviour: