Commit 4eac10f
committed
fix(oas3.1): correctly validate paths using $ref
Schemathesis uses static version of the current published version
of the OpenApi 3.1 spec metaschema
(https://spec.openapis.org/oas/3.1/schema/2022-10-07)
to validate openapi 3.1 spec documents. Unfortunately, the published
version has at least one known bug in which the schema for `paths`
references the definition of a concrete `path-item` instead of
`path-item-or-reference`, which might still be technically incorrect
when it comes handling the case of ref and sibling fields, but is
correct according to the documented definition of a pathItemObject.
This oversight has been noticed multiple times
OAI/OpenAPI-Specification#3298
OAI/OpenAPI-Specification#2635 (comment)
OAI/OpenAPI-Specification#2635 (comment)
OAI/OpenAPI-Specification#3513
OAI/OpenAPI-Specification#2657 (comment)
And finally fixed in Feb 2024
OAI/OpenAPI-Specification#3355
with a slightly bigger rework of the pathItem schema.
Sadly, due to confusion about how to release fixes in schemas
OAI/OpenAPI-Specification#151 (comment)
this change has not been published anywhere except schema.yaml in the
git repo, not even in schema.json, which appearantly only gets refreshed
once per release of the metaschema
OAI/OpenAPI-Specification#3355 (comment)
This commit updates the stored schema from the most up-to-date 3.1.0
schema.yaml from 0035208 to close the bug and make spec-valid openapi
spec files that use $ref under path finally validate correctly in
schemathesis. It also adds a corresponding regression test1 parent 51289c0 commit 4eac10f
File tree
3 files changed
+26
-11
lines changed- docs
- src/schemathesis/specs/openapi
- test/experimental
3 files changed
+26
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1330 | 1330 | | |
1331 | 1331 | | |
1332 | 1332 | | |
| 1333 | + | |
| 1334 | + | |
1333 | 1335 | | |
1334 | 1336 | | |
1335 | 1337 | | |
| |||
1345 | 1347 | | |
1346 | 1348 | | |
1347 | 1349 | | |
1348 | | - | |
| 1350 | + | |
1349 | 1351 | | |
1350 | 1352 | | |
1351 | 1353 | | |
| |||
1400 | 1402 | | |
1401 | 1403 | | |
1402 | 1404 | | |
1403 | | - | |
| 1405 | + | |
1404 | 1406 | | |
1405 | 1407 | | |
1406 | 1408 | | |
| |||
1439 | 1441 | | |
1440 | 1442 | | |
1441 | 1443 | | |
1442 | | - | |
| 1444 | + | |
1443 | 1445 | | |
1444 | 1446 | | |
1445 | 1447 | | |
| |||
1461 | 1463 | | |
1462 | 1464 | | |
1463 | 1465 | | |
| 1466 | + | |
1464 | 1467 | | |
1465 | 1468 | | |
1466 | 1469 | | |
| |||
1477 | 1480 | | |
1478 | 1481 | | |
1479 | 1482 | | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | 1483 | | |
1486 | 1484 | | |
1487 | 1485 | | |
| |||
1542 | 1540 | | |
1543 | 1541 | | |
1544 | 1542 | | |
1545 | | - | |
1546 | 1543 | | |
1547 | 1544 | | |
1548 | 1545 | | |
| |||
1662 | 1659 | | |
1663 | 1660 | | |
1664 | 1661 | | |
1665 | | - | |
| 1662 | + | |
1666 | 1663 | | |
1667 | 1664 | | |
1668 | 1665 | | |
| |||
1755 | 1752 | | |
1756 | 1753 | | |
1757 | 1754 | | |
1758 | | - | |
1759 | 1755 | | |
1760 | 1756 | | |
1761 | 1757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
0 commit comments