René's URL Explorer Experiment


Title: feat: add literal_enums setting to produce Literal[...] instead of enum classes. by emosenkis · Pull Request #1114 · openapi-generators/openapi-python-client · GitHub

Open Graph Title: feat: add literal_enums setting to produce Literal[...] instead of enum classes. by emosenkis · Pull Request #1114 · openapi-generators/openapi-python-client

X Title: feat: add literal_enums setting to produce Literal[...] instead of enum classes. by emosenkis · Pull Request #1114 · openapi-generators/openapi-python-client

Description: Generate modern Python clients from OpenAPI. Contribute to openapi-generators/openapi-python-client development by creating an account on GitHub.

Open Graph Description: While attempting to generate a client for https://api.railz.ai/swagger/v2, I ran into duplicate enum values. I tried using the fixes from #725 and #1095 but neither was sufficient because while som...

X Description: While attempting to generate a client for https://api.railz.ai/swagger/v2, I ran into duplicate enum values. I tried using the fixes from #725 and #1095 but neither was sufficient because while som...

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

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:409d6d9c-444d-3d45-ef49-5f762f5aeb45
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9944:4F79:11DFB59:18A4077:6980BB02
html-safe-nonce01ad3ed741a2276bdbf3d6da5da3a123f93951118ac09088b4b564f1c9a95259
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTQ0OjRGNzk6MTFERkI1OToxOEE0MDc3OjY5ODBCQjAyIiwidmlzaXRvcl9pZCI6IjM4NTQ3MjY0ODg0MzU3NjgwNjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac383c7eceb1de1da88b44e56a9120e5ee22834aa28e8e686ef11d22b79216734e
hovercard-subject-tagpull_request:2050041102
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/openapi-generators/openapi-python-client/pull/1114/commits
twitter:imagehttps://opengraph.githubassets.com/53298fef0cf98f34868bb61b8a8dc5b262e67870acfd88e1e8873b7aa6de7576/openapi-generators/openapi-python-client/pull/1114
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/53298fef0cf98f34868bb61b8a8dc5b262e67870acfd88e1e8873b7aa6de7576/openapi-generators/openapi-python-client/pull/1114
og:image:altWhile attempting to generate a client for https://api.railz.ai/swagger/v2, I ran into duplicate enum values. I tried using the fixes from #725 and #1095 but neither was sufficient because while som...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameemosenkis
hostnamegithub.com
expected-hostnamegithub.com
Nonefb936832e40deb3175641d9cfedc8432372f91b0bc899576222953095fc7879e
turbo-cache-controlno-cache
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasead74180531de4861d5eee036a47b86c66a5b756e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits#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%2F1114%2Fcommits
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%2F1114%2Fcommits
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%2Fcommits&source=header-repo&source_repo=openapi-generators%2Fopenapi-python-client
Reloadhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits
Reloadhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits
Reloadhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits
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/1114/commits
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
emosenkishttps://patch-diff.githubusercontent.com/emosenkis
openapi-generators:mainhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/main
levrofin:em/literal-enumshttps://patch-diff.githubusercontent.com/levrofin/openapi-python-client/tree/em/literal-enums
Conversationhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114
Commits16 (16)https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits
Checkshttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/checks
Files changedhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/changes
feat: add literal_enums setting to produce Literal[...] instead of enum classes.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits#top
emosenkishttps://patch-diff.githubusercontent.com/emosenkis
openapi-generators:mainhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/main
levrofin:em/literal-enumshttps://patch-diff.githubusercontent.com/levrofin/openapi-python-client/tree/em/literal-enums
Add literal_enums option.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/705225055566f43c3076c908363ea507ce5433a6
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
7052250https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/705225055566f43c3076c908363ea507ce5433a6
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/705225055566f43c3076c908363ea507ce5433a6
Merge branch 'main' into em/literal-enumshttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/c3190605d8d88447476d1260da1fb8d27ae9d10b
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
c319060https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/c3190605d8d88447476d1260da1fb8d27ae9d10b
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/c3190605d8d88447476d1260da1fb8d27ae9d10b
Fixhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/77735332b5d5d13325f804a4f87616bc23b163a1
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
7773533https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/77735332b5d5d13325f804a4f87616bc23b163a1
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/77735332b5d5d13325f804a4f87616bc23b163a1
Merge remote-tracking branch 'upstream/main' into em/literal-enumshttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/268e2ceb577e057125766709267519315346c06e
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
268e2cehttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/268e2ceb577e057125766709267519315346c06e
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/268e2ceb577e057125766709267519315346c06e
Format with ruffhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/8a7dccfa3c3046a1c7cef51773067904bbf488ae
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
8a7dccfhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/8a7dccfa3c3046a1c7cef51773067904bbf488ae
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/8a7dccfa3c3046a1c7cef51773067904bbf488ae
Fix bugs and add tests.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/a38b39232e16207866dddf15f98e2092621ab0f2
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
a38b392https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/a38b39232e16207866dddf15f98e2092621ab0f2
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/a38b39232e16207866dddf15f98e2092621ab0f2
Add more tests and suggest literal enums in duplicate enum error.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/01b45497bc3683a26e5a65c68fe693f19548ca45
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
01b4549https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/01b45497bc3683a26e5a65c68fe693f19548ca45
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/01b45497bc3683a26e5a65c68fe693f19548ca45
Membership checking in constructor instead of in isinstance.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/e43830ca5bf59a268ad8f1b547d6a6e5bce0ef46
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
e43830chttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/e43830ca5bf59a268ad8f1b547d6a6e5bce0ef46
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/e43830ca5bf59a268ad8f1b547d6a6e5bce0ef46
Merge remote-tracking branch 'upstream/main' into em/literal-enumshttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/5d5688bb93bfa63b7dafb8c34477011dd15fb3a0
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
5d5688bhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/5d5688bb93bfa63b7dafb8c34477011dd15fb3a0
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/5d5688bb93bfa63b7dafb8c34477011dd15fb3a0
Don't use modern union syntax.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/f411c46f909956b2462f48c22b37ff3ad6c41862
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
f411c46https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/f411c46f909956b2462f48c22b37ff3ad6c41862
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/f411c46f909956b2462f48c22b37ff3ad6c41862
Drop single-value unionhttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/f6dea8ab5f83fe1d7f717221fe61631af43936d7
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
f6dea8ahttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/f6dea8ab5f83fe1d7f717221fe61631af43936d7
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/f6dea8ab5f83fe1d7f717221fe61631af43936d7
Merge remote-tracking branch 'upstream/main' into em/literal-enumshttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/8f8bff5b085fc14d334583acc363fc46168ddc89
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
8f8bff5https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/8f8bff5b085fc14d334583acc363fc46168ddc89
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/8f8bff5b085fc14d334583acc363fc46168ddc89
Remove usage of | operator.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/365a2c796c70dc0526e894bb02412ebe8c34c890
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
365a2c7https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/365a2c796c70dc0526e894bb02412ebe8c34c890
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/365a2c796c70dc0526e894bb02412ebe8c34c890
Fix tests on Python < 3.10https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/bd849eca03002fb1bbc44b7a6b1d69e66683066f
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
bd849echttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/bd849eca03002fb1bbc44b7a6b1d69e66683066f
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/bd849eca03002fb1bbc44b7a6b1d69e66683066f
Fix coverage for almost all lines.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/5c2a0f74121297584d555554a248945f7dd3b539
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
5c2a0f7https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/5c2a0f74121297584d555554a248945f7dd3b539
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/5c2a0f74121297584d555554a248945f7dd3b539
Add test coverage of last missing line.https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/125ae6a18b2c391e91f4d9bd4b8ecc6c6f4a1d7b
https://patch-diff.githubusercontent.com/emosenkis
emosenkishttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/commits?author=emosenkis
125ae6ahttps://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/pull/1114/commits/125ae6a18b2c391e91f4d9bd4b8ecc6c6f4a1d7b
https://patch-diff.githubusercontent.com/openapi-generators/openapi-python-client/tree/125ae6a18b2c391e91f4d9bd4b8ecc6c6f4a1d7b
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.