René's URL Explorer Experiment


Title: Validation for a JSON string inside of a request · python-openapi/openapi-core · Discussion #959 · GitHub

Open Graph Title: Validation for a JSON string inside of a request · python-openapi/openapi-core · Discussion #959

X Title: Validation for a JSON string inside of a request · python-openapi/openapi-core · Discussion #959

Description: Validation for a JSON string inside of a request

Open Graph Description: Hi I have an API endpoint which expects a request with something like the following structure: { "rhs": ["{"object1": "value1"}, {"object2": "some-string"}"] } I would like to provide validation fo...

X Description: Hi I have an API endpoint which expects a request with something like the following structure: { "rhs": ["{"object1": "value1"}, {"object2": "some-...

Opengraph URL: https://github.com/python-openapi/openapi-core/discussions/959

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Validation for a JSON string inside of a request","text":"

Hi I have an API endpoint which expects a request with something like the following structure:

\n

{
\n\"rhs\": [\"{\"object1\": \"value1\"}, {\"object2\": \"some-string\"}\"]
\n}

\n

I would like to provide validation for the outer structure but also for the string JSON within my JSON array. Right now when I try to validate, my string JSON is never deserialized into something I can validate against (throwing a body cast error), but if I specify it as a string the validator will not attempt to deserialize the string and assume everything is valid. Is there a way of having the validator attempt to deserialize the string through my OpenAPI schema or is this something that is not supported?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Hi @jjimene1

\n

it is possible to define specification for such case in OpenAPI 3.1.1 by using contentMediaType and contentSchema. Although the library currently doesn't support it.

","upvoteCount":1,"url":"https://github.com/python-openapi/openapi-core/discussions/959#discussioncomment-12281535"}}}

route-pattern/_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format)
route-controllervoltron_discussions_fragments
route-actiondiscussion_layout
fetch-noncev2:bf4af542-452e-db30-c1b0-72505313a697
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-id84BA:307653:A18D5A7:D28275D:69774271
html-safe-noncec3cd9b76f9b8483272c6e2f0a03056ae530e415bce057f20a2b32213a3babf9c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEJBOjMwNzY1MzpBMThENUE3OkQyODI3NUQ6Njk3NzQyNzEiLCJ2aXNpdG9yX2lkIjoiMjY5ODA0NTU2NDU5NDM3MzIzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3d7c71d21a1341479faf3d8c1cbc37610731b6d474bcdec213d3bb3037d552cb
hovercard-subject-tagdiscussion:7999232
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/discussions_fragments/discussion_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/python-openapi/openapi-core/959/discussion_layout
twitter:imagehttps://opengraph.githubassets.com/469f36744b9a6745a7e7fafad936d57fdf7c90ee50593cbd940a8bd2781d5200/python-openapi/openapi-core/discussions/959
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/469f36744b9a6745a7e7fafad936d57fdf7c90ee50593cbd940a8bd2781d5200/python-openapi/openapi-core/discussions/959
og:image:altHi I have an API endpoint which expects a request with something like the following structure: { "rhs": ["{"object1": "value1"}, {"object2": "some-string"}"] } I would like to provide validation fo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09
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
release8b4769605623191b876ce084a47e46d8431b205a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openapi%2Fopenapi-core%2Fdiscussions%2F959
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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openapi%2Fopenapi-core%2Fdiscussions%2F959
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&source=header-repo&source_repo=python-openapi%2Fopenapi-core
Reloadhttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
Reloadhttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
Reloadhttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
python-openapi https://patch-diff.githubusercontent.com/python-openapi
openapi-corehttps://patch-diff.githubusercontent.com/python-openapi/openapi-core
Please reload this pagehttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-openapi%2Fopenapi-core
Fork 136 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-openapi%2Fopenapi-core
Star 356 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-openapi%2Fopenapi-core
Code https://patch-diff.githubusercontent.com/python-openapi/openapi-core
Issues 74 https://patch-diff.githubusercontent.com/python-openapi/openapi-core/issues
Pull requests 13 https://patch-diff.githubusercontent.com/python-openapi/openapi-core/pulls
Discussions https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions
Actions https://patch-diff.githubusercontent.com/python-openapi/openapi-core/actions
Projects 0 https://patch-diff.githubusercontent.com/python-openapi/openapi-core/projects
Security 0 https://patch-diff.githubusercontent.com/python-openapi/openapi-core/security
Insights https://patch-diff.githubusercontent.com/python-openapi/openapi-core/pulse
Code https://patch-diff.githubusercontent.com/python-openapi/openapi-core
Issues https://patch-diff.githubusercontent.com/python-openapi/openapi-core/issues
Pull requests https://patch-diff.githubusercontent.com/python-openapi/openapi-core/pulls
Discussions https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions
Actions https://patch-diff.githubusercontent.com/python-openapi/openapi-core/actions
Projects https://patch-diff.githubusercontent.com/python-openapi/openapi-core/projects
Security https://patch-diff.githubusercontent.com/python-openapi/openapi-core/security
Insights https://patch-diff.githubusercontent.com/python-openapi/openapi-core/pulse
Answered https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#discussioncomment-12281535
p1c2uhttps://patch-diff.githubusercontent.com/p1c2u
jjimene1 https://patch-diff.githubusercontent.com/jjimene1
Q&Ahttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/categories/q-a
Validation for a JSON string inside of a request https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#top
jjimene1 https://patch-diff.githubusercontent.com/jjimene1
Answered https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#discussioncomment-12281535
p1c2uhttps://patch-diff.githubusercontent.com/p1c2u
Return to tophttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#top
Please reload this pagehttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
jjimene1 https://patch-diff.githubusercontent.com/jjimene1
Feb 21, 2025 https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#discussion-7999232
Give feedback.https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
p1c2u https://patch-diff.githubusercontent.com/p1c2u
Feb 21, 2025 https://github.com/python-openapi/openapi-core/discussions/959#discussioncomment-12281535
@jjimene1https://github.com/jjimene1
View full answer https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#discussioncomment-12281535
Oldest https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959?sort=old
Newest https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959?sort=new
Top https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959?sort=top
Please reload this pagehttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
p1c2u https://patch-diff.githubusercontent.com/p1c2u
Feb 21, 2025 https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#discussioncomment-12281535
@jjimene1https://github.com/jjimene1
Give feedback.https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
https://patch-diff.githubusercontent.com/jjimene1
Please reload this pagehttps://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
jjimene1https://patch-diff.githubusercontent.com/jjimene1
Feb 24, 2025 https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959#discussioncomment-12304461
Give feedback.https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
jjimene1https://patch-diff.githubusercontent.com/jjimene1
Sign up for freehttps://patch-diff.githubusercontent.com/join?source=comment-repo
Sign in to commenthttps://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openapi%2Fopenapi-core%2Fdiscussions%2F959
🙏 Q&A https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/categories/q-a
https://patch-diff.githubusercontent.com/jjimene1
https://patch-diff.githubusercontent.com/p1c2u
https://patch-diff.githubusercontent.com/python-openapi/openapi-core/discussions/959
https://patch-diff.githubusercontent.com/settings/replies?return_to=1
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.