Title: Unexpected validation error with nullable allOf · Issue #220 · python-openapi/openapi-schema-validator · GitHub
Open Graph Title: Unexpected validation error with nullable allOf · Issue #220 · python-openapi/openapi-schema-validator
X Title: Unexpected validation error with nullable allOf · Issue #220 · python-openapi/openapi-schema-validator
Description: How to reproduce: from openapi_schema_validator import validate, OAS30Validator, OAS31Validator schema = { "allOf": [ {"type": "string"}, ], "nullable": True, } validate(None, schema, cls=OAS30Validator) # --> None for not nullable valid...
Open Graph Description: How to reproduce: from openapi_schema_validator import validate, OAS30Validator, OAS31Validator schema = { "allOf": [ {"type": "string"}, ], "nullable": True, } validate(None, schema, cls=OAS30Vali...
X Description: How to reproduce: from openapi_schema_validator import validate, OAS30Validator, OAS31Validator schema = { "allOf": [ {"type": "string"}, ], "nullable": True...
Opengraph URL: https://github.com/python-openapi/openapi-schema-validator/issues/220
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected validation error with nullable allOf","articleBody":"How to reproduce:\n\n```python\nfrom openapi_schema_validator import validate, OAS30Validator, OAS31Validator\n\nschema = {\n \"allOf\": [\n {\"type\": \"string\"},\n ],\n \"nullable\": True,\n}\n\nvalidate(None, schema, cls=OAS30Validator)\n# --\u003e None for not nullable\n\nvalidate(None, schema, cls=0AS31Validator)\n# --\u003e None is not of type 'string'\n```\n\nSeems related to #20","author":{"url":"https://github.com/linkdd","@type":"Person","name":"linkdd"},"datePublished":"2025-03-16T04:55:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/220/openapi-schema-validator/issues/220"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3d17e772-5d74-00d2-d8cb-bba5365cdf82 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9724:25A502:1A5F94E:249F4C6:6977848A |
| html-safe-nonce | 5229d1e50e24a17f523516c9751bffb0680da785a4289f4b5dae4a730e4c2ac6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzI0OjI1QTUwMjoxQTVGOTRFOjI0OUY0QzY6Njk3Nzg0OEEiLCJ2aXNpdG9yX2lkIjoiNjMxNDY0MjcyMjAxOTMxMjc3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 659ad63fb81224899e2362ad44bb35822c685b4caa53b5813a7ae2aca663c01b |
| hovercard-subject-tag | issue:2922771522 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openapi/openapi-schema-validator/220/issue_layout |
| twitter:image | https://opengraph.githubassets.com/928a071465d88491d8496b84ffe2100e1df38f97343709f1cbd7215a483b993a/python-openapi/openapi-schema-validator/issues/220 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/928a071465d88491d8496b84ffe2100e1df38f97343709f1cbd7215a483b993a/python-openapi/openapi-schema-validator/issues/220 |
| og:image:alt | How to reproduce: from openapi_schema_validator import validate, OAS30Validator, OAS31Validator schema = { "allOf": [ {"type": "string"}, ], "nullable": True, } validate(None, schema, cls=OAS30Vali... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | linkdd |
| hostname | github.com |
| expected-hostname | github.com |
| None | fd37f8e74ecc49b700617ea694fa6d7b395b6c9a4b79c59b3014da220462ac69 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openapi/openapi-schema-validator git https://github.com/python-openapi/openapi-schema-validator.git |
| octolytics-dimension-user_id | 126442889 |
| octolytics-dimension-user_login | python-openapi |
| octolytics-dimension-repository_id | 245119225 |
| octolytics-dimension-repository_nwo | python-openapi/openapi-schema-validator |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 245119225 |
| octolytics-dimension-repository_network_root_nwo | python-openapi/openapi-schema-validator |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 523f6485bbeeb9958ec03260b225e9183734585d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width