Skip to content

Commit

Permalink
Fix/schema location (#2717)
Browse files Browse the repository at this point in the history
  • Loading branch information
niclim authored Feb 6, 2024
1 parent 7c3db65 commit 70fbe05
Show file tree
Hide file tree
Showing 13 changed files with 844 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "openapi-workspaces",
"license": "MIT",
"private": true,
"version": "0.54.2",
"version": "0.54.3",
"workspaces": [
"projects/json-pointer-helpers",
"projects/openapi-io",
Expand Down
2 changes: 1 addition & 1 deletion projects/fastify-capture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@useoptic/fastify-capture",
"license": "MIT",
"packageManager": "[email protected]",
"version": "0.54.2",
"version": "0.54.3",
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion projects/json-pointer-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@useoptic/json-pointer-helpers",
"license": "MIT",
"packageManager": "[email protected]",
"version": "0.54.2",
"version": "0.54.3",
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion projects/openapi-io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@useoptic/openapi-io",
"license": "MIT",
"packageManager": "[email protected]",
"version": "0.54.2",
"version": "0.54.3",
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion projects/openapi-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@useoptic/openapi-utilities",
"license": "MIT",
"packageManager": "[email protected]",
"version": "0.54.2",
"version": "0.54.3",
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ exports[`can extract facts from specs 1`] = `
"post",
"multipart/form-data",
],
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/requestBody/content/multipart~1form-data",
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/requestBody/content/multipart~1form-data/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -862,7 +862,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/responses/200/content/application~1json",
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -1200,7 +1200,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1store~1inventory/get/responses/200/content/application~1json",
"jsonPath": "/paths/~1store~1inventory/get/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -1317,7 +1317,7 @@ exports[`can extract facts from specs 1`] = `
"post",
"*/*",
],
"jsonPath": "/paths/~1store~1order/post/requestBody/content/*~1*",
"jsonPath": "/paths/~1store~1order/post/requestBody/content/*~1*/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -1828,7 +1828,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/xml",
],
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1xml",
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1xml/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -2357,7 +2357,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1json",
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -2992,7 +2992,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/xml",
],
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1xml",
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1xml/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -3521,7 +3521,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1json",
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -4250,7 +4250,7 @@ exports[`can extract facts from specs 1`] = `
"post",
"*/*",
],
"jsonPath": "/paths/~1user/post/requestBody/content/*~1*",
"jsonPath": "/paths/~1user/post/requestBody/content/*~1*/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -4925,7 +4925,7 @@ exports[`can extract facts from specs 1`] = `
"post",
"*/*",
],
"jsonPath": "/paths/~1user~1createWithArray/post/requestBody/content/*~1*",
"jsonPath": "/paths/~1user~1createWithArray/post/requestBody/content/*~1*/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -5662,7 +5662,7 @@ exports[`can extract facts from specs 1`] = `
"post",
"*/*",
],
"jsonPath": "/paths/~1user~1createWithList/post/requestBody/content/*~1*",
"jsonPath": "/paths/~1user~1createWithList/post/requestBody/content/*~1*/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -6523,7 +6523,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/xml",
],
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1xml",
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1xml/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -6586,7 +6586,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1json",
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -6799,7 +6799,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/xml",
],
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1xml",
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1xml/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -7458,7 +7458,7 @@ exports[`can extract facts from specs 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1json",
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -8242,7 +8242,7 @@ exports[`can extract facts from specs 1`] = `
"put",
"*/*",
],
"jsonPath": "/paths/~1user~1{username}/put/requestBody/content/*~1*",
"jsonPath": "/paths/~1user~1{username}/put/requestBody/content/*~1*/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -9061,7 +9061,7 @@ exports[`handles example schemas as strings 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1example/patch/responses/200/content/application~1json",
"jsonPath": "/paths/~1example/patch/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -9227,7 +9227,7 @@ exports[`will extract facts for oneOf, allOf or anyOf schemas 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json",
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -10453,7 +10453,7 @@ exports[`will work with 3.1 schemas 1`] = `
"200",
"application/json",
],
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json",
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ export class OpenAPITraverser implements Traverse<OpenAPIV3.Document> {
)}, found ${schema}`
);
} else if (isNotReferenceObject(schema)) {
yield this.onSchema(schema, jsonPath, conceptualPath, {
yield this.onSchema(schema, nextJsonPath, conceptualPath, {
...location,
jsonSchemaTrail: [],
context: {
Expand Down
2 changes: 1 addition & 1 deletion projects/optic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@useoptic/optic",
"license": "MIT",
"packageManager": "[email protected]",
"version": "0.54.2",
"version": "0.54.3",
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion projects/rulesets-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@useoptic/rulesets-base",
"license": "MIT",
"packageManager": "[email protected]",
"version": "0.54.2",
"version": "0.54.3",
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ exports[`RequestRule schema assertions added failing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -1449,7 +1449,7 @@ exports[`RequestRule schema assertions added passing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -1547,7 +1547,7 @@ exports[`RequestRule schema assertions addedOrChanged failing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -1645,7 +1645,7 @@ exports[`RequestRule schema assertions addedOrChanged passing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -1759,7 +1759,7 @@ exports[`RequestRule schema assertions changed failing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
},
Expand Down Expand Up @@ -1881,7 +1881,7 @@ exports[`RequestRule schema assertions changed passing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
},
Expand Down Expand Up @@ -2102,7 +2102,7 @@ exports[`RequestRule schema assertions requirement failing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down Expand Up @@ -2198,7 +2198,7 @@ exports[`RequestRule schema assertions requirement passing assertion 1`] = `
"get",
"application/json",
],
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
"kind": "schema",
},
"value": {
Expand Down
Loading

0 comments on commit 70fbe05

Please sign in to comment.