Commit bd1abad
authored
[python] fix uniqueItems validation tests (OpenAPITools#24092)
Pydantic 2 removed conlist(unique_items=True). The migration in
04fa53b kept OpenAPI arrays as lists because sets would lose ordering
and complicate JSON serialization, but left the old validation tests in
the synchronous and lazy-import samples.
Those tests do not require an exception, so they normally pass after
making a Petstore request and fail only when that request produces an
unrelated response validation error. Remove them from the Pydantic 2
samples.
Pydantic 1 still enforces uniqueItems. Make its test require the expected
validation error so a regression cannot silently pass.1 parent 4a5f3a7 commit bd1abad
3 files changed
Lines changed: 3 additions & 15 deletions
File tree
- samples/openapi3/client/petstore
- python-lazyImports/tests
- python-pydantic-v1/tests
- python/tests
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 43 | | |
50 | 44 | | |
51 | 45 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 43 | | |
50 | 44 | | |
51 | 45 | | |
| |||
0 commit comments