Skip to content

Commit

Permalink
fix(resolver): remove LinkElement hook main dereference
Browse files Browse the repository at this point in the history
LinkElement visit hook works on top of ApiDOM only,
and has no effect when serialized into POJO.
This commit disables this visit hook.

LinkElement is a runtime things, we're not making
the LinkElement.operationRef absolute as during the runtime
relative references might resolve against different
URIs then in parsing/dereference phase.

Refs #2793
  • Loading branch information
char0n committed Jan 26, 2023
1 parent 0450a6d commit ef9d20d
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 416 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,14 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = OpenApi3_1DereferenceVisitor.c
// transclude referencing element with merged referenced element
return mergedSchemaElement;
},
async LinkElement() {
/**
* OpenApi3_1DereferenceVisitor is doing lookup of Operation Objects
* and assigns them to Link Object metadata. This is not needed in
* swagger-client context, so we're disabling it here.
*/
return undefined;
},
},
});

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ef9d20d

Please sign in to comment.