Closed
Description
Hi there,
If a header is specified as a reference (i.e. as part of a response) the header isn't included in the produced objects.
An example response schema is:
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Result_Ok_GetGroups"
}
}
},
"description": "OK",
"headers": {
"ETag": {
"$ref": "#/components/headers/ETag"
}
}
}
That would produce a type with:
200: {
headers: {};
content: {
"application/json": components["schemas"]["Result_Ok_GetGroups"];
};
}
The reason is because of the check:
v.schema
won't be defined because the header is included by reference.
Properly handling the headers relies on resolving the reference (even if it is external).
Since the majority of my PR has not been merged that deals with resolving references, I'm going to just link to the commit that fixes this problem:
Please feel free to cherry pick.
Rusty
Metadata
Metadata
Assignees
Labels
No labels