Skip to content

Commit

Permalink
fix: resolve all example from externalValue
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVarchuk committed Oct 3, 2024
1 parent a3acd78 commit 7df5ba2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions packages/core/src/ref-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ export function isRef(node: any): node is OasRef {
return node && typeof node.$ref === 'string';
}

export function isRelativeReference(value: any): boolean {
return !value.startsWith('http');
}

export class Location {
constructor(public source: Source, public pointer: string) {}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export async function resolveDocument(opts: {
}

// handle externalValue with relative reference in examples object
if (node.externalValue && isRelativeReference(node.externalValue)) {
if (node.externalValue) {
node.value = {
$ref: node.externalValue,
};
Expand Down

0 comments on commit 7df5ba2

Please sign in to comment.