René's URL Explorer Experiment


Title: UnmarshallerError if specifying `format` with `type: [foo, 'null']` · Issue #483 · python-openapi/openapi-core · GitHub

Open Graph Title: UnmarshallerError if specifying `format` with `type: [foo, 'null']` · Issue #483 · python-openapi/openapi-core

X Title: UnmarshallerError if specifying `format` with `type: [foo, 'null']` · Issue #483 · python-openapi/openapi-core

Description: I'm still working on minimal reproducer to prove this out so apologies for the lack of a one in advance. I've got a schema like this: openapi: '3.1.0' # ... components: schemas: PatchList: type: 'object' properties: # ... pull_url: title...

Open Graph Description: I'm still working on minimal reproducer to prove this out so apologies for the lack of a one in advance. I've got a schema like this: openapi: '3.1.0' # ... components: schemas: PatchList: type: 'o...

X Description: I'm still working on minimal reproducer to prove this out so apologies for the lack of a one in advance. I've got a schema like this: openapi: '3.1.0' # ... components: schemas: Pat...

Opengraph URL: https://github.com/python-openapi/openapi-core/issues/483

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UnmarshallerError if specifying `format` with `type: [foo, 'null']`","articleBody":"I'm still working on minimal reproducer to prove this out so apologies for the lack of a one in advance.\r\n\r\nI've got a schema like this:\r\n\r\n```yaml\r\nopenapi: '3.1.0'\r\n# ...\r\ncomponents:\r\n  schemas:\r\n    PatchList:\r\n      type: 'object'\r\n      properties:\r\n        # ...\r\n        pull_url:\r\n          title: 'Pull URL'\r\n          type:\r\n            - 'string'\r\n            - 'null'\r\n          format: 'uri'\r\n          maxLength: 255\r\n        # ...\r\n```\r\n\r\nIf my server returns a response with `pull_url` set to `null`, then the call to `openapi_core.validation.response.validators.ResponseValidator.validate` fails with the following traceback:\r\n\r\n```python\r\nTraceback (most recent call last):\r\n  File \"/dev/patchwork/patchwork/tests/api/test_relation.py\", line 267, in test_remove_one_patch_from_relation_good\r\n    resp = self.client.patch(\r\n  File \"/dev/patchwork/patchwork/tests/api/utils.py\", line 241, in patch\r\n    validator.validate_data(\r\n  File \"/dev/patchwork/patchwork/tests/api/validator.py\", line 141, in validate_data\r\n    result.raise_for_errors()\r\n  File \"/dev/openapi-core/openapi_core/validation/datatypes.py\", line 12, in raise_for_errors\r\n    raise error\r\n  File \"/dev/openapi-core/openapi_core/validation/response/validators.py\", line 245, in validate\r\n    data = self._get_data(response, operation_response)\r\n  File \"/dev/openapi-core/openapi_core/validation/response/validators.py\", line 88, in _get_data\r\n    data = self._unmarshal(schema, casted)\r\n  File \"/dev/openapi-core/openapi_core/validation/validators.py\", line 76, in _unmarshal\r\n    return unmarshaller(value)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 91, in __call__\r\n    return self.unmarshal(value)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 434, in unmarshal\r\n    return unmarshaller.unmarshal(value)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 316, in unmarshal\r\n    properties = self.format(value)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 325, in format\r\n    return self._unmarshal_properties(formatted, schema_only=schema_only)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 354, in _unmarshal_properties\r\n    all_of_properties = self._clone(all_of_schema).format(\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 325, in format\r\n    return self._unmarshal_properties(formatted, schema_only=schema_only)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 373, in _unmarshal_properties\r\n    properties[prop_name] = self.unmarshallers_factory.create(\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 91, in __call__\r\n    return self.unmarshal(value)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 433, in unmarshal\r\n    unmarshaller = self._get_best_unmarshaller(value)\r\n  File \"/dev/openapi-core/openapi_core/unmarshalling/schemas/unmarshallers.py\", line 430, in _get_best_unmarshaller\r\n    raise UnmarshallerError(\"Unmarshaller not found for type(s)\")\r\nopenapi_core.unmarshalling.schemas.exceptions.UnmarshallerError: Unmarshaller not found for type(s)\r\n```\r\n\r\nIf I comment out `format`, things work as expected. I suspect it's attempting to apply a formatter for the null values. As far as I can tell, this should work though.","author":{"url":"https://github.com/stephenfin","@type":"Person","name":"stephenfin"},"datePublished":"2023-01-24T16:44:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/483/openapi-core/issues/483"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:989a3ffe-55b3-8de9-b26b-4f8c3f86cea2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEC14:206EAE:87D6AB:B371D4:697835E5
html-safe-nonce082a9b7879bce66382836d47f8df395135a769f4eec6342c8305e563d6103158
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzE0OjIwNkVBRTo4N0Q2QUI6QjM3MUQ0OjY5NzgzNUU1IiwidmlzaXRvcl9pZCI6IjY3MzM2MzYwMjMxOTc2NDQyNjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc446c7875fbb0487c3d7b297b04e531ea47e2d0d20c3e0144a92872498f5018d
hovercard-subject-tagissue:1555313363
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-core/483/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fd9acf84b315239d14c5b9ee267487657371ef9581cf8670fb754e3948355ce1/python-openapi/openapi-core/issues/483
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fd9acf84b315239d14c5b9ee267487657371ef9581cf8670fb754e3948355ce1/python-openapi/openapi-core/issues/483
og:image:altI'm still working on minimal reproducer to prove this out so apologies for the lack of a one in advance. I've got a schema like this: openapi: '3.1.0' # ... components: schemas: PatchList: type: 'o...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamestephenfin
hostnamegithub.com
expected-hostnamegithub.com
None2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50
turbo-cache-controlno-preview
go-importgithub.com/python-openapi/openapi-core git https://github.com/python-openapi/openapi-core.git
octolytics-dimension-user_id126442889
octolytics-dimension-user_loginpython-openapi
octolytics-dimension-repository_id104200746
octolytics-dimension-repository_nwopython-openapi/openapi-core
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id104200746
octolytics-dimension-repository_network_root_nwopython-openapi/openapi-core
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
release8cc3e064910e26648760f573a358cfc07c97b42c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-openapi/openapi-core/issues/483#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openapi%2Fopenapi-core%2Fissues%2F483
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openapi%2Fopenapi-core%2Fissues%2F483
Sign up https://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-core
Reloadhttps://github.com/python-openapi/openapi-core/issues/483
Reloadhttps://github.com/python-openapi/openapi-core/issues/483
Reloadhttps://github.com/python-openapi/openapi-core/issues/483
python-openapi https://github.com/python-openapi
openapi-corehttps://github.com/python-openapi/openapi-core
Please reload this pagehttps://github.com/python-openapi/openapi-core/issues/483
Notifications https://github.com/login?return_to=%2Fpython-openapi%2Fopenapi-core
Fork 136 https://github.com/login?return_to=%2Fpython-openapi%2Fopenapi-core
Star 356 https://github.com/login?return_to=%2Fpython-openapi%2Fopenapi-core
Code https://github.com/python-openapi/openapi-core
Issues 74 https://github.com/python-openapi/openapi-core/issues
Pull requests 14 https://github.com/python-openapi/openapi-core/pulls
Discussions https://github.com/python-openapi/openapi-core/discussions
Actions https://github.com/python-openapi/openapi-core/actions
Projects 0 https://github.com/python-openapi/openapi-core/projects
Security 0 https://github.com/python-openapi/openapi-core/security
Insights https://github.com/python-openapi/openapi-core/pulse
Code https://github.com/python-openapi/openapi-core
Issues https://github.com/python-openapi/openapi-core/issues
Pull requests https://github.com/python-openapi/openapi-core/pulls
Discussions https://github.com/python-openapi/openapi-core/discussions
Actions https://github.com/python-openapi/openapi-core/actions
Projects https://github.com/python-openapi/openapi-core/projects
Security https://github.com/python-openapi/openapi-core/security
Insights https://github.com/python-openapi/openapi-core/pulse
New issuehttps://github.com/login?return_to=https://github.com/python-openapi/openapi-core/issues/483
New issuehttps://github.com/login?return_to=https://github.com/python-openapi/openapi-core/issues/483
#508https://github.com/python-openapi/openapi-core/pull/508
UnmarshallerError if specifying format with type: [foo, 'null']https://github.com/python-openapi/openapi-core/issues/483#top
#508https://github.com/python-openapi/openapi-core/pull/508
area/unmarshallingIndicates an issue on unmarshalling area.https://github.com/python-openapi/openapi-core/issues?q=state%3Aopen%20label%3A%22area%2Funmarshalling%22
kind/bug/confirmedhttps://github.com/python-openapi/openapi-core/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%2Fconfirmed%22
kind/missing-implementationhttps://github.com/python-openapi/openapi-core/issues?q=state%3Aopen%20label%3A%22kind%2Fmissing-implementation%22
https://github.com/stephenfin
https://github.com/stephenfin
stephenfinhttps://github.com/stephenfin
on Jan 24, 2023https://github.com/python-openapi/openapi-core/issues/483#issue-1555313363
area/unmarshallingIndicates an issue on unmarshalling area.https://github.com/python-openapi/openapi-core/issues?q=state%3Aopen%20label%3A%22area%2Funmarshalling%22
kind/bug/confirmedhttps://github.com/python-openapi/openapi-core/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%2Fconfirmed%22
kind/missing-implementationhttps://github.com/python-openapi/openapi-core/issues?q=state%3Aopen%20label%3A%22kind%2Fmissing-implementation%22
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.