Skip to content

Commit

Permalink
comment resolve top level ref
Browse files Browse the repository at this point in the history
  • Loading branch information
cdimascio committed Jun 9, 2020
1 parent 6f20edb commit 89ee600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewares/openapi.response.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class ResponseValidator {
for (const [name, resp] of <any[]>Object.entries(responses)) {
let tmpResponse = resp;
if (tmpResponse.$ref) {
// resolve response
// resolve top level response $ref
const id = tmpResponse.$ref.replace(/^.+\//i, '');
tmpResponse = this.spec.components?.responses?.[id];
}
Expand Down

0 comments on commit 89ee600

Please sign in to comment.