You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if a response header is required, the random() function should fill it in when missing
if a response header is not required, a response that's constructed without that header should type check (in OpenAPI 2, assume all headers are optional, as there's no way to mark it required)
The text was updated successfully, but these errors were encountered:
In order to make the type check work, the generated code passed as a type argument to ResponseBuilderFactory is going to have a have a requiredHeaders type.
When all of the required headers and content types are exhausted, but there remain some optional headers, the return type will have to add a dummy property like "allHeadersAreOptional". So that { allHeadersAreOptional: string } is a valid return type.
If you're reading this and it makes no sense, don't worry. It makes sense to me. At least today it does. Hopefully I'll finish before it stops making sense. One day I'll document properly how this crazy type system works.
The text was updated successfully, but these errors were encountered: