René's URL Explorer Experiment


Title: add discriminator property support by eli-bl · Pull Request #1154 · openapi-generators/openapi-python-client · GitHub

Open Graph Title: add discriminator property support by eli-bl · Pull Request #1154 · openapi-generators/openapi-python-client

X Title: add discriminator property support by eli-bl · Pull Request #1154 · openapi-generators/openapi-python-client

Description: This more fully fixes #219, and supersedes #717. Any valid discriminator definition as described in OpenAPI 3.1.0 should work correctly with these changes, including: Discriminators with a mapping that specifies all valid discriminator values. Discriminators with no mapping, in which the discriminator value for each type is the simple name of the type (equivalent to {"Model1": {"$ref": "#/components/schemas/Model1"}}). Discriminators with a mapping that specifies values for some classes, but not all of them; in this case the default for the unspecified classes is the same as if there was no mapping. Unions of unions where each of the sub-unions has its own discriminator mapping. Validation during parsing is not as thorough as it could be, since currently the property lists inside ModelProperty are not available at the time the UnionProperty is parsed (I do have some further changes in mind to improve this, but I wanted to keep the scope of this PR manageable). But there is some basic validation, like "you can't have a non-object schema, or an inline schema, if there's a discriminator"... so this is a breaking change in the sense that generation will now fail on some invalid specs that previously would have passed.

Open Graph Description: This more fully fixes #219, and supersedes #717. Any valid discriminator definition as described in OpenAPI 3.1.0 should work correctly with these changes, including: Discriminators with a mapping...

X Description: This more fully fixes #219, and supersedes #717. Any valid discriminator definition as described in OpenAPI 3.1.0 should work correctly with these changes, including: Discriminators with a mapping...

Opengraph URL: https://github.com/openapi-generators/openapi-python-client/pull/1154

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:5377c62f-3068-2e2b-2b9a-c8734098fd9f
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-idA6D4:8C0CD:C145BB:10A4DA7:6980B3C0
html-safe-noncee235b20f13e46db86417e7591fa112eec810e8c07d37e39bd536bdddfef2fa71
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkQ0OjhDMENEOkMxNDVCQjoxMEE0REE3OjY5ODBCM0MwIiwidmlzaXRvcl9pZCI6Ijg0Mzk2Njc4MDU2NDA1MDQyNTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd8bdb07003241f4a925d7f3df6c9ec4f437c8ef67a44dfcf3389eb870717bb58
hovercard-subject-tagpull_request:2149913527
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/openapi-generators/openapi-python-client/pull/1154/checks
twitter:imagehttps://avatars.githubusercontent.com/u/170372326?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/170372326?s=400&v=4
og:image:altThis more fully fixes #219, and supersedes #717. Any valid discriminator definition as described in OpenAPI 3.1.0 should work correctly with these changes, including: Discriminators with a mapping...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned5070894b88d5cf03785c677c23c659b0431dfc2e6df2f35e35f2e0de9ceb94a
turbo-cache-controlno-preview
go-importgithub.com/openapi-generators/openapi-python-client git https://github.com/openapi-generators/openapi-python-client.git
octolytics-dimension-user_id84925606
octolytics-dimension-user_loginopenapi-generators
octolytics-dimension-repository_id240776275
octolytics-dimension-repository_nwoopenapi-generators/openapi-python-client
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id240776275
octolytics-dimension-repository_network_root_nwoopenapi-generators/openapi-python-client
turbo-body-classeslogged-out env-production page-responsive full-width full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release821a5a2664fd1c2441fb3caded98e0f525bf913f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenapi-generators%2Fopenapi-python-client%2Fpull%2F1154%2Fchecks
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%2Fopenapi-generators%2Fopenapi-python-client%2Fpull%2F1154%2Fchecks
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%2Fpull_requests%2Fshow%2Fchecks&source=header-repo&source_repo=openapi-generators%2Fopenapi-python-client
Reloadhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
Reloadhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
Reloadhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
openapi-generators https://patch-diff.githubusercontent.com/openapi-generators
openapi-python-clienthttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client
Please reload this pagehttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fopenapi-generators%2Fopenapi-python-client
Fork 264 https://patch-diff.githubusercontent.com/login?return_to=%2Fopenapi-generators%2Fopenapi-python-client
Star 1.9k https://patch-diff.githubusercontent.com/login?return_to=%2Fopenapi-generators%2Fopenapi-python-client
Code https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client
Issues 77 https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/issues
Pull requests 14 https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pulls
Discussions https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/discussions
Actions https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions
Security 2 https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/security
Insights https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pulse
Code https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client
Issues https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/issues
Pull requests https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pulls
Discussions https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/discussions
Actions https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions
Security https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/security
Insights https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fopenapi-generators%2Fopenapi-python-client%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fopenapi-generators%2Fopenapi-python-client%2Fissues%2Fnew%2Fchoose
eli-blhttps://patch-diff.githubusercontent.com/eli-bl
openapi-generators:mainhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/main
benchling:discriminatorshttps://patch-diff.githubusercontent.com/benchling/openapi-python-client/tree/discriminators
Conversation 9 https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154
Commits 9 https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/commits
Checks 19 https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
Files changed https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/files
Please reload this pagehttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
Please reload this pagehttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
add discriminator property support https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks#top
Please reload this pagehttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks
Require changes to be documented https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1154/checks?check_run_id=34060796605
Run Checks on: pull_request https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516
test (3.9, ubuntu-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060798433?pr=1154
test (3.9, macos-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060798814?pr=1154
test (3.9, windows-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060799006?pr=1154
test (3.10, ubuntu-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060799198?pr=1154
test (3.10, macos-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060799388?pr=1154
test (3.10, windows-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060799579?pr=1154
test (3.11, ubuntu-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060799753?pr=1154
test (3.11, macos-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060799906?pr=1154
test (3.11, windows-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060800156?pr=1154
test (3.12, ubuntu-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060800337?pr=1154
test (3.12, macos-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060800548?pr=1154
test (3.12, windows-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060800751?pr=1154
test (3.13, ubuntu-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060801106?pr=1154
test (3.13, macos-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060801295?pr=1154
test (3.13, windows-latest) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060801567?pr=1154
Integration Tests (0.20.0) https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060798002?pr=1154
Integration Tests https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060798623?pr=1154
Combine & check coverage https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/actions/runs/12208125516/job/34060885765?pr=1154
Learn more about checks retentionhttps://docs.github.com/rest/guides/getting-started-with-the-checks-api#retention-of-checks-data
create more change fileshttps://knope.tech/reference/concepts/changeset/
View more details on Knope Bot https://knope.tech
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.