Title: Need of recursive properties check in validation · Issue #372 · python-openapi/openapi-spec-validator · GitHub
Open Graph Title: Need of recursive properties check in validation · Issue #372 · python-openapi/openapi-spec-validator
X Title: Need of recursive properties check in validation · Issue #372 · python-openapi/openapi-spec-validator
Description: Some APIs contain nested schemas, and the current version of 0.7.1 openapi-spec-validator is unable catch the recursive properties. Below is an example of what can be achieved with a little tweak in the class SchemaValidator validation/k...
Open Graph Description: Some APIs contain nested schemas, and the current version of 0.7.1 openapi-spec-validator is unable catch the recursive properties. Below is an example of what can be achieved with a little tweak i...
X Description: Some APIs contain nested schemas, and the current version of 0.7.1 openapi-spec-validator is unable catch the recursive properties. Below is an example of what can be achieved with a little tweak i...
Opengraph URL: https://github.com/python-openapi/openapi-spec-validator/issues/372
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Need of recursive properties check in validation","articleBody":"Some APIs contain nested schemas, and the current version of 0.7.1 openapi-spec-validator is unable catch the recursive properties. Below is an example of what can be achieved with a little tweak in the class SchemaValidator validation/keywords.py. \u003cbr\u003e\r\n```python\r\n nested_properties = []\r\n if \"allOf\" in schema:\r\n all_of = schema / \"allOf\"\r\n while True:\r\n for inner_schema in all_of:\r\n yield from self(\r\n inner_schema,\r\n require_properties=False,\r\n )\r\n if \"properties\" not in inner_schema:\r\n continue\r\n inner_schema_props = inner_schema / \"properties\"\r\n inner_schema_props_keys = inner_schema_props.keys()\r\n nested_properties += list(inner_schema_props_keys)\r\n if \"allOf\" not in inner_schema:\r\n break\r\n all_of = inner_schema / \"allOf\"\r\n```\r\n","author":{"url":"https://github.com/Jay-Gohil","@type":"Person","name":"Jay-Gohil"},"datePublished":"2024-08-08T17:32:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/372/openapi-spec-validator/issues/372"}
| 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:7feed641-929b-e3df-5b53-3fd2daf9b95c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D7FE:1E388B:6092CC7:83811FD:69784936 |
| html-safe-nonce | 8958f87fd757ca458514f66330443e5d9f06026189b148d53e0e672f1c74df86 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0ZFOjFFMzg4Qjo2MDkyQ0M3OjgzODExRkQ6Njk3ODQ5MzYiLCJ2aXNpdG9yX2lkIjoiNTI3MzU4MTQzNzMxODYxMzMwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 828f9197afbb519e7e64b858db89fcf61eb0f1d3a085428b2301c4fe0622c089 |
| hovercard-subject-tag | issue:2456302352 |
| 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-spec-validator/372/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a9ee821f9e3234c682f944d8628348c6f228b5c2bd9f36e124482e4e92359e82/python-openapi/openapi-spec-validator/issues/372 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a9ee821f9e3234c682f944d8628348c6f228b5c2bd9f36e124482e4e92359e82/python-openapi/openapi-spec-validator/issues/372 |
| og:image:alt | Some APIs contain nested schemas, and the current version of 0.7.1 openapi-spec-validator is unable catch the recursive properties. Below is an example of what can be achieved with a little tweak i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Jay-Gohil |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openapi/openapi-spec-validator git https://github.com/python-openapi/openapi-spec-validator.git |
| octolytics-dimension-user_id | 126442889 |
| octolytics-dimension-user_login | python-openapi |
| octolytics-dimension-repository_id | 102581313 |
| octolytics-dimension-repository_nwo | python-openapi/openapi-spec-validator |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 102581313 |
| octolytics-dimension-repository_network_root_nwo | python-openapi/openapi-spec-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 | 520b65a872113b919c1bbdb03834a50af15859fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width