René's URL Explorer Experiment


Title: Failure to correctly validate required in allOf · Issue #15 · python-openapi/openapi-schema-validator · GitHub

Open Graph Title: Failure to correctly validate required in allOf · Issue #15 · python-openapi/openapi-schema-validator

X Title: Failure to correctly validate required in allOf · Issue #15 · python-openapi/openapi-schema-validator

Description: Having one spec with optional properties and creating a derived spec using allOf that makes a property required fails. This should be supported according to json schema itself (e.g. here) To reproduce (with 0.1.5): from openapi_schema_va...

Open Graph Description: Having one spec with optional properties and creating a derived spec using allOf that makes a property required fails. This should be supported according to json schema itself (e.g. here) To reprod...

X Description: Having one spec with optional properties and creating a derived spec using allOf that makes a property required fails. This should be supported according to json schema itself (e.g. here) To reprod...

Opengraph URL: https://github.com/python-openapi/openapi-schema-validator/issues/15

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Failure to correctly validate required in allOf","articleBody":"Having one spec with optional properties and creating a derived spec using `allOf` that makes a property required fails. This should be supported according to json schema itself (e.g. [here](https://github.com/OAI/OpenAPI-Specification/issues/1870#issuecomment-478653692))\r\n\r\nTo reproduce (with 0.1.5):\r\n\r\n```python\r\nfrom openapi_schema_validator import validate\r\n\r\n\r\nschema = {\r\n    \"allOf\": [\r\n        {\"type\": \"object\", \"properties\": {\"some_prop\": {\"type\": \"string\"}}},\r\n        {\"type\": \"object\", \"required\": [\"some_prop\"]},\r\n    ]\r\n}\r\n\r\nvalidate({\"another_prop\": \"bla\"}, schema)\r\n```\r\n\r\nExpected behaviour: an error that the required property `some_prop` is missing. The code actually correctly figures that out, but when it tries to check whether it is ok to have that property missing because it is e.g. a `readOnly` missing in a write operation a \"runtime\" error is produced instead of a validation exception:\r\n\r\n```python\r\n~/venvs/py39/lib/python3.9/site-packages/openapi_schema_validator/_validators.py in required(validator, required, instance, schema)\r\n     41     for property in required:\r\n     42         if property not in instance:\r\n---> 43             prop_schema = schema['properties'][property]\r\n     44             read_only = prop_schema.get('readOnly', False)\r\n     45             write_only = prop_schema.get('writeOnly', False)\r\n\r\nKeyError: 'properties'\r\n```\r\n\r\nThe problem is that here `schema` is only the second schema with the `required` - but the property can come from any schema in the `allOf`.","author":{"url":"https://github.com/sebastianmika","@type":"Person","name":"sebastianmika"},"datePublished":"2021-06-24T16:39:06Z","url":"https://github.com/python-openapi/openapi-schema-validator/issues/15"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:23e2f03b-08bc-a7ff-cdc9-15b7e09ba9bd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id97A4:387B0D:6B0DF7:952140:6AF9C60C
html-safe-nonce7f89bc4b7a5ff834d53fd88bdb06ffcf3e9a4b254b7f8e7cd18b521b491320e5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0E0OjM4N0IwRDo2QjBERjc6OTUyMTQwOjZBRjlDNjBDIiwidmlzaXRvcl9pZCI6Ijg4NzI5NjY1ODYzNDQ1MjMyNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacdb9a72aec9c190b8cd8a00da035eb9b472b10378243c6c6a2da11d52e0b807ba
hovercard-subject-tagissue:929416948
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openapi/openapi-schema-validator/15/issue_layout
twitter:imagehttps://opengraph.githubassets.com/04b140246a84b9ee1faffdbba24b4e63559de255ede1fcef92487633efe25df1/python-openapi/openapi-schema-validator/issues/15
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/04b140246a84b9ee1faffdbba24b4e63559de255ede1fcef92487633efe25df1/python-openapi/openapi-schema-validator/issues/15
og:image:altHaving one spec with optional properties and creating a derived spec using allOf that makes a property required fails. This should be supported according to json schema itself (e.g. here) To reprod...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesebastianmika
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/python-openapi/openapi-schema-validator git https://github.com/python-openapi/openapi-schema-validator.git
octolytics-dimension-user_id126442889
octolytics-dimension-user_loginpython-openapi
octolytics-dimension-repository_id245119225
octolytics-dimension-repository_nwopython-openapi/openapi-schema-validator
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id245119225
octolytics-dimension-repository_network_root_nwopython-openapi/openapi-schema-validator
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-openapi/openapi-schema-validator/issues/15#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openapi%2Fopenapi-schema-validator%2Fissues%2F15
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openapi%2Fopenapi-schema-validator%2Fissues%2F15
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-openapi%2Fopenapi-schema-validator
Reloadhttps://github.com/python-openapi/openapi-schema-validator/issues/15
Reloadhttps://github.com/python-openapi/openapi-schema-validator/issues/15
Reloadhttps://github.com/python-openapi/openapi-schema-validator/issues/15
python-openapihttps://github.com/python-openapi
openapi-schema-validatorhttps://github.com/python-openapi/openapi-schema-validator
Codehttps://github.com/python-openapi/openapi-schema-validator
Issues1 (1)https://github.com/python-openapi/openapi-schema-validator/issues
Pull requests17 (17)https://github.com/python-openapi/openapi-schema-validator/pulls
Discussionshttps://github.com/python-openapi/openapi-schema-validator/discussions
Actionshttps://github.com/python-openapi/openapi-schema-validator/actions
Projectshttps://github.com/python-openapi/openapi-schema-validator/projects
Security and qualityhttps://github.com/python-openapi/openapi-schema-validator/security
Insightshttps://github.com/python-openapi/openapi-schema-validator/pulse
https://github.com/python-openapi/openapi-schema-validator
New issuehttps://github.com/login?return_to=https://github.com/python-openapi/openapi-schema-validator/issues/15
New issuehttps://github.com/login?return_to=https://github.com/python-openapi/openapi-schema-validator/issues/15
Failure to correctly validate required in allOfhttps://github.com/python-openapi/openapi-schema-validator/issues/15#top
https://github.com/sebastianmika
sebastianmikahttps://github.com/sebastianmika
on Jun 24, 2021https://github.com/python-openapi/openapi-schema-validator/issues/15#issue-929416948
herehttps://github.com/OAI/OpenAPI-Specification/issues/1870#issuecomment-478653692
https://github.com/sebastianmika
sebastianmikahttps://github.com/sebastianmika
on Jun 24, 2021https://github.com/python-openapi/openapi-schema-validator/issues/15#issuecomment-867790886
#14https://github.com/python-openapi/openapi-schema-validator/issues/14
https://github.com/p1c2u
p1c2uhttps://github.com/p1c2u
on Dec 28, 2021https://github.com/python-openapi/openapi-schema-validator/issues/15#issuecomment-1002007924
p1c2uhttps://github.com/p1c2u
completedhttps://github.com/python-openapi/openapi-schema-validator/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 28, 2021https://github.com/python-openapi/openapi-schema-validator/issues/15#event-5820839744
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-openapi/openapi-schema-validator/issues/15
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-openapi/openapi-schema-validator/issues/15
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.