Skip to content

Commit 70fbe05

Browse files
authored
Fix/schema location (#2717)
1 parent 7c3db65 commit 70fbe05

File tree

13 files changed

+844
-49
lines changed

13 files changed

+844
-49
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "openapi-workspaces",
33
"license": "MIT",
44
"private": true,
5-
"version": "0.54.2",
5+
"version": "0.54.3",
66
"workspaces": [
77
"projects/json-pointer-helpers",
88
"projects/openapi-io",

projects/fastify-capture/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@useoptic/fastify-capture",
33
"license": "MIT",
44
"packageManager": "[email protected]",
5-
"version": "0.54.2",
5+
"version": "0.54.3",
66
"main": "build/index.js",
77
"types": "build/index.d.ts",
88
"files": [

projects/json-pointer-helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@useoptic/json-pointer-helpers",
33
"license": "MIT",
44
"packageManager": "[email protected]",
5-
"version": "0.54.2",
5+
"version": "0.54.3",
66
"main": "build/index.js",
77
"types": "build/index.d.ts",
88
"files": [

projects/openapi-io/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@useoptic/openapi-io",
33
"license": "MIT",
44
"packageManager": "[email protected]",
5-
"version": "0.54.2",
5+
"version": "0.54.3",
66
"main": "build/index.js",
77
"types": "build/index.d.ts",
88
"files": [

projects/openapi-utilities/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@useoptic/openapi-utilities",
33
"license": "MIT",
44
"packageManager": "[email protected]",
5-
"version": "0.54.2",
5+
"version": "0.54.3",
66
"main": "build/index.js",
77
"types": "build/index.d.ts",
88
"files": [

projects/openapi-utilities/src/openapi3/implementations/openapi3/__tests__/__snapshots__/openapi-traverser.test.ts.snap

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ exports[`can extract facts from specs 1`] = `
788788
"post",
789789
"multipart/form-data",
790790
],
791-
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/requestBody/content/multipart~1form-data",
791+
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/requestBody/content/multipart~1form-data/schema",
792792
"kind": "schema",
793793
},
794794
"value": {
@@ -862,7 +862,7 @@ exports[`can extract facts from specs 1`] = `
862862
"200",
863863
"application/json",
864864
],
865-
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/responses/200/content/application~1json",
865+
"jsonPath": "/paths/~1pet~1{petId}~1uploadImage/post/responses/200/content/application~1json/schema",
866866
"kind": "schema",
867867
},
868868
"value": {
@@ -1200,7 +1200,7 @@ exports[`can extract facts from specs 1`] = `
12001200
"200",
12011201
"application/json",
12021202
],
1203-
"jsonPath": "/paths/~1store~1inventory/get/responses/200/content/application~1json",
1203+
"jsonPath": "/paths/~1store~1inventory/get/responses/200/content/application~1json/schema",
12041204
"kind": "schema",
12051205
},
12061206
"value": {
@@ -1317,7 +1317,7 @@ exports[`can extract facts from specs 1`] = `
13171317
"post",
13181318
"*/*",
13191319
],
1320-
"jsonPath": "/paths/~1store~1order/post/requestBody/content/*~1*",
1320+
"jsonPath": "/paths/~1store~1order/post/requestBody/content/*~1*/schema",
13211321
"kind": "schema",
13221322
},
13231323
"value": {
@@ -1828,7 +1828,7 @@ exports[`can extract facts from specs 1`] = `
18281828
"200",
18291829
"application/xml",
18301830
],
1831-
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1xml",
1831+
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1xml/schema",
18321832
"kind": "schema",
18331833
},
18341834
"value": {
@@ -2357,7 +2357,7 @@ exports[`can extract facts from specs 1`] = `
23572357
"200",
23582358
"application/json",
23592359
],
2360-
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1json",
2360+
"jsonPath": "/paths/~1store~1order/post/responses/200/content/application~1json/schema",
23612361
"kind": "schema",
23622362
},
23632363
"value": {
@@ -2992,7 +2992,7 @@ exports[`can extract facts from specs 1`] = `
29922992
"200",
29932993
"application/xml",
29942994
],
2995-
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1xml",
2995+
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1xml/schema",
29962996
"kind": "schema",
29972997
},
29982998
"value": {
@@ -3521,7 +3521,7 @@ exports[`can extract facts from specs 1`] = `
35213521
"200",
35223522
"application/json",
35233523
],
3524-
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1json",
3524+
"jsonPath": "/paths/~1store~1order~1{orderId}/get/responses/200/content/application~1json/schema",
35253525
"kind": "schema",
35263526
},
35273527
"value": {
@@ -4250,7 +4250,7 @@ exports[`can extract facts from specs 1`] = `
42504250
"post",
42514251
"*/*",
42524252
],
4253-
"jsonPath": "/paths/~1user/post/requestBody/content/*~1*",
4253+
"jsonPath": "/paths/~1user/post/requestBody/content/*~1*/schema",
42544254
"kind": "schema",
42554255
},
42564256
"value": {
@@ -4925,7 +4925,7 @@ exports[`can extract facts from specs 1`] = `
49254925
"post",
49264926
"*/*",
49274927
],
4928-
"jsonPath": "/paths/~1user~1createWithArray/post/requestBody/content/*~1*",
4928+
"jsonPath": "/paths/~1user~1createWithArray/post/requestBody/content/*~1*/schema",
49294929
"kind": "schema",
49304930
},
49314931
"value": {
@@ -5662,7 +5662,7 @@ exports[`can extract facts from specs 1`] = `
56625662
"post",
56635663
"*/*",
56645664
],
5665-
"jsonPath": "/paths/~1user~1createWithList/post/requestBody/content/*~1*",
5665+
"jsonPath": "/paths/~1user~1createWithList/post/requestBody/content/*~1*/schema",
56665666
"kind": "schema",
56675667
},
56685668
"value": {
@@ -6523,7 +6523,7 @@ exports[`can extract facts from specs 1`] = `
65236523
"200",
65246524
"application/xml",
65256525
],
6526-
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1xml",
6526+
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1xml/schema",
65276527
"kind": "schema",
65286528
},
65296529
"value": {
@@ -6586,7 +6586,7 @@ exports[`can extract facts from specs 1`] = `
65866586
"200",
65876587
"application/json",
65886588
],
6589-
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1json",
6589+
"jsonPath": "/paths/~1user~1login/get/responses/200/content/application~1json/schema",
65906590
"kind": "schema",
65916591
},
65926592
"value": {
@@ -6799,7 +6799,7 @@ exports[`can extract facts from specs 1`] = `
67996799
"200",
68006800
"application/xml",
68016801
],
6802-
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1xml",
6802+
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1xml/schema",
68036803
"kind": "schema",
68046804
},
68056805
"value": {
@@ -7458,7 +7458,7 @@ exports[`can extract facts from specs 1`] = `
74587458
"200",
74597459
"application/json",
74607460
],
7461-
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1json",
7461+
"jsonPath": "/paths/~1user~1{username}/get/responses/200/content/application~1json/schema",
74627462
"kind": "schema",
74637463
},
74647464
"value": {
@@ -8242,7 +8242,7 @@ exports[`can extract facts from specs 1`] = `
82428242
"put",
82438243
"*/*",
82448244
],
8245-
"jsonPath": "/paths/~1user~1{username}/put/requestBody/content/*~1*",
8245+
"jsonPath": "/paths/~1user~1{username}/put/requestBody/content/*~1*/schema",
82468246
"kind": "schema",
82478247
},
82488248
"value": {
@@ -9061,7 +9061,7 @@ exports[`handles example schemas as strings 1`] = `
90619061
"200",
90629062
"application/json",
90639063
],
9064-
"jsonPath": "/paths/~1example/patch/responses/200/content/application~1json",
9064+
"jsonPath": "/paths/~1example/patch/responses/200/content/application~1json/schema",
90659065
"kind": "schema",
90669066
},
90679067
"value": {
@@ -9227,7 +9227,7 @@ exports[`will extract facts for oneOf, allOf or anyOf schemas 1`] = `
92279227
"200",
92289228
"application/json",
92299229
],
9230-
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json",
9230+
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json/schema",
92319231
"kind": "schema",
92329232
},
92339233
"value": {
@@ -10453,7 +10453,7 @@ exports[`will work with 3.1 schemas 1`] = `
1045310453
"200",
1045410454
"application/json",
1045510455
],
10456-
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json",
10456+
"jsonPath": "/paths/~1example/get/responses/200/content/application~1json/schema",
1045710457
"kind": "schema",
1045810458
},
1045910459
"value": {

projects/openapi-utilities/src/openapi3/implementations/openapi3/openapi-traverser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ export class OpenAPITraverser implements Traverse<OpenAPIV3.Document> {
473473
)}, found ${schema}`
474474
);
475475
} else if (isNotReferenceObject(schema)) {
476-
yield this.onSchema(schema, jsonPath, conceptualPath, {
476+
yield this.onSchema(schema, nextJsonPath, conceptualPath, {
477477
...location,
478478
jsonSchemaTrail: [],
479479
context: {

projects/optic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@useoptic/optic",
33
"license": "MIT",
44
"packageManager": "[email protected]",
5-
"version": "0.54.2",
5+
"version": "0.54.3",
66
"main": "build/index.js",
77
"types": "build/index.d.ts",
88
"files": [

projects/rulesets-base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@useoptic/rulesets-base",
33
"license": "MIT",
44
"packageManager": "[email protected]",
5-
"version": "0.54.2",
5+
"version": "0.54.3",
66
"main": "build/index.js",
77
"types": "build/index.d.ts",
88
"files": [

projects/rulesets-base/src/__tests__/__snapshots__/request-rules.test.ts.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ exports[`RequestRule schema assertions added failing assertion 1`] = `
13531353
"get",
13541354
"application/json",
13551355
],
1356-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
1356+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
13571357
"kind": "schema",
13581358
},
13591359
"value": {
@@ -1449,7 +1449,7 @@ exports[`RequestRule schema assertions added passing assertion 1`] = `
14491449
"get",
14501450
"application/json",
14511451
],
1452-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
1452+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
14531453
"kind": "schema",
14541454
},
14551455
"value": {
@@ -1547,7 +1547,7 @@ exports[`RequestRule schema assertions addedOrChanged failing assertion 1`] = `
15471547
"get",
15481548
"application/json",
15491549
],
1550-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
1550+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
15511551
"kind": "schema",
15521552
},
15531553
"value": {
@@ -1645,7 +1645,7 @@ exports[`RequestRule schema assertions addedOrChanged passing assertion 1`] = `
16451645
"get",
16461646
"application/json",
16471647
],
1648-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
1648+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
16491649
"kind": "schema",
16501650
},
16511651
"value": {
@@ -1759,7 +1759,7 @@ exports[`RequestRule schema assertions changed failing assertion 1`] = `
17591759
"get",
17601760
"application/json",
17611761
],
1762-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
1762+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
17631763
"kind": "schema",
17641764
},
17651765
},
@@ -1881,7 +1881,7 @@ exports[`RequestRule schema assertions changed passing assertion 1`] = `
18811881
"get",
18821882
"application/json",
18831883
],
1884-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
1884+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
18851885
"kind": "schema",
18861886
},
18871887
},
@@ -2102,7 +2102,7 @@ exports[`RequestRule schema assertions requirement failing assertion 1`] = `
21022102
"get",
21032103
"application/json",
21042104
],
2105-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
2105+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
21062106
"kind": "schema",
21072107
},
21082108
"value": {
@@ -2198,7 +2198,7 @@ exports[`RequestRule schema assertions requirement passing assertion 1`] = `
21982198
"get",
21992199
"application/json",
22002200
],
2201-
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
2201+
"jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema",
22022202
"kind": "schema",
22032203
},
22042204
"value": {

0 commit comments

Comments
 (0)