Title: Exception when validating schema with required in oneOf · Issue #14 · python-openapi/openapi-schema-validator · GitHub
Open Graph Title: Exception when validating schema with required in oneOf · Issue #14 · python-openapi/openapi-schema-validator
X Title: Exception when validating schema with required in oneOf · Issue #14 · python-openapi/openapi-schema-validator
Description: Code: from openapi_schema_validator import validate instance = { 'n3IwfId': 'string', } schema = { "type": "object", "properties": { "n3IwfId": {"type": "string"}, "wagfId": {"type": "string"}, }, "oneOf": [ {"required": ["n3IwfId"]}, {"...
Open Graph Description: Code: from openapi_schema_validator import validate instance = { 'n3IwfId': 'string', } schema = { "type": "object", "properties": { "n3IwfId": {"type": "string"}, "wagfId": {"type": "string"}, }, ...
X Description: Code: from openapi_schema_validator import validate instance = { 'n3IwfId': 'string', } schema = { "type": "object", "properties": { "n3IwfId"...
Opengraph URL: https://github.com/python-openapi/openapi-schema-validator/issues/14
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception when validating schema with required in oneOf","articleBody":"\r\nCode:\r\n```python\r\nfrom openapi_schema_validator import validate\r\ninstance = {\r\n 'n3IwfId': 'string',\r\n}\r\nschema = {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"n3IwfId\": {\"type\": \"string\"},\r\n \"wagfId\": {\"type\": \"string\"},\r\n },\r\n \"oneOf\": [\r\n {\"required\": [\"n3IwfId\"]},\r\n {\"required\": [\"wagfId\"]},\r\n ],\r\n}\r\nvalidate(instance, schema)\r\n```\r\nException:\r\n File \"/usr/local/lib/python3.9/site-packages/jsonschema/validators.py\", line 328, in iter_errors\r\n for error in errors:\r\n File \"/usr/local/lib/python3.9/site-packages/openapi_schema_validator/_validators.py\", line 43, in required\r\n prop_schema = schema['properties'][property]\r\nKeyError: 'properties'","author":{"url":"https://github.com/DangoXJ","@type":"Person","name":"DangoXJ"},"datePublished":"2021-06-13T06:14:19Z","url":"https://github.com/python-openapi/openapi-schema-validator/issues/14"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:3a445887-27de-fe76-78d1-ae6e981d0483 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EBE:15E244:2245E6:2FD5BD:6AF9C848 |
| html-safe-nonce | 8a034c1742652e81c52578f21a678fc58646c45a87545db2b3f33e6a32d2a81f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUJFOjE1RTI0NDoyMjQ1RTY6MkZENUJEOjZBRjlDODQ4IiwidmlzaXRvcl9pZCI6Ijc1ODY1OTYxMDQ2MTE5NDMxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6c47b464b329e1257255da2c10ff6ee5e8ffb3ee8d3edb0c2a542492ef1412f3 |
| hovercard-subject-tag | issue:919727720 |
| 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/14/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a34bd1a917cff5b05d0379a368e0127e588a1e7db8b1c741beb018d3ab3fc7c7/python-openapi/openapi-schema-validator/issues/14 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a34bd1a917cff5b05d0379a368e0127e588a1e7db8b1c741beb018d3ab3fc7c7/python-openapi/openapi-schema-validator/issues/14 |
| og:image:alt | Code: from openapi_schema_validator import validate instance = { 'n3IwfId': 'string', } schema = { "type": "object", "properties": { "n3IwfId": {"type": "string"}, "wagfId": {"type": "string"}, }, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DangoXJ |
| hostname | github.com |
| expected-hostname | github.com |
| None | 612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7 |
| 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 | 072e34035c13c31543fba9f025cbbbda4210dae4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width