moving the link scenario to the correct rule while resolving it

- fixing the expected file
- fixing the root file
This commit is contained in:
Erik Mendoza
2022-06-13 14:57:18 -05:00
parent b05958d308
commit f74efe1dcd
3 changed files with 7 additions and 4 deletions

View File

@@ -73,8 +73,8 @@ module.exports = {
if (REQUEST_BODY_CONTAINER.includes(item)) { if (REQUEST_BODY_CONTAINER.includes(item)) {
item = 'requestBodies'; item = 'requestBodies';
} }
if (LINKS_CONTAINER.includes(item)) { if (LINKS_CONTAINER.includes(trace[index + 2])) {
item = 'links'; trace[index + 1] = 'links';
} }
if (PROPERTY_DEFINITION.includes(trace[index + 2])) { if (PROPERTY_DEFINITION.includes(trace[index + 2])) {
trace[index + 1] = 'schemas'; trace[index + 1] = 'schemas';

View File

@@ -30,12 +30,14 @@
} }
}, },
"links": { "links": {
"theLinkId": {
"$ref": "#/components/links/_link.yaml" "$ref": "#/components/links/_link.yaml"
} }
} }
} }
} }
} }
}
}, },
"components": { "components": {
"schemas": { "schemas": {

View File

@@ -25,6 +25,7 @@ paths:
items: items:
$ref: "#/components/schemas/Pet" $ref: "#/components/schemas/Pet"
links: links:
theLinkId:
$ref: "./link.yaml" $ref: "./link.yaml"
components: components:
schemas: schemas: