Title: Duplicate Key Error during parser/properties/enum · Issue #587 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Duplicate Key Error during parser/properties/enum · Issue #587 · openapi-generators/openapi-python-client
X Title: Duplicate Key Error during parser/properties/enum · Issue #587 · openapi-generators/openapi-python-client
Description: Describe the bug GitHub OpenAPI Descriptor parsing It seems we can not parse the GitHub OpenAPI since in the SCIM emu we have twice the value ( add and Add ) values = EnumProperty.values_from_list(value_list) File "/home/adelisle/.local/...
Open Graph Description: Describe the bug GitHub OpenAPI Descriptor parsing It seems we can not parse the GitHub OpenAPI since in the SCIM emu we have twice the value ( add and Add ) values = EnumProperty.values_from_list(...
X Description: Describe the bug GitHub OpenAPI Descriptor parsing It seems we can not parse the GitHub OpenAPI since in the SCIM emu we have twice the value ( add and Add ) values = EnumProperty.values_from_list(...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/587
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Duplicate Key Error during parser/properties/enum","articleBody":"**Describe the bug**\r\nGitHub OpenAPI Descriptor parsing \r\n\r\nIt seems we can not parse the GitHub OpenAPI since in the SCIM emu we have twice the value ( `add` and `Add` )\r\n\r\n```\r\n values = EnumProperty.values_from_list(value_list)\r\n File \"/home/adelisle/.local/lib/python3.8/site-packages/openapi_python_client/parser/properties/enum_property.py\", line 61, in values_from_list\r\n raise ValueError(f\"Duplicate key {key} in Enum\")\r\nValueError: Duplicate key ADD in Enum\r\n```\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n`openapi-python-client generate --url https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json\\?_sm_au_\\=iHVj504RWD4Fn7kPLVN2jKsTtN4QF`\r\n\r\n**Expected behavior**\r\nI would have thought GitHub Open API would have been parsable. \r\n\r\n\r\n**OpenAPI Spec File**\r\nhttps://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json?_sm_au_=iHVj504RWD4Fn7kPLVN2jKsTtN4QF\r\n\r\nYou can lookup for `\"ADD\"`\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: WSL2 Ubuntu 20.04\r\n - Python Version: 3.8.10 \r\n - openapi-python-client version 0.11.1\r\n\r\n**Additional context**\r\nLine forcing KEY in uppercase. \r\nhttps://github.com/openapi-generators/openapi-python-client/blob/199a8f926e841e5a5f79a9052115d8069bcab281/openapi_python_client/parser/properties/enum_property.py#L57\r\n\r\nIt might be the proper behavior, I am just wondering, why GitHub Spec is not parsable. ","author":{"url":"https://github.com/AlexandreODelisle","@type":"Person","name":"AlexandreODelisle"},"datePublished":"2022-02-17T01:43:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/587/openapi-python-client/issues/587"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:167b4938-0ebc-e4dc-9127-d33010cd4534 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8484:22BD94:281A0BB:33995EF:697FEEB5 |
| html-safe-nonce | ebea611a5d381277d86e56c86a23ffa22c19318d38bf779e729d2c2cbb27e745 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDg0OjIyQkQ5NDoyODFBMEJCOjMzOTk1RUY6Njk3RkVFQjUiLCJ2aXNpdG9yX2lkIjoiMTAzMjYwMDc4NTAxMzE3Mzk0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dc280090c90ac58acb093e94a6dd3f4becb88add75cd664a8f597d00040bb37b |
| hovercard-subject-tag | issue:1140770892 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openapi-generators/openapi-python-client/587/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eb7d9f9838e5662db92c9310aba0aecee444b713906b2f34876083ccdb22b090/openapi-generators/openapi-python-client/issues/587 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eb7d9f9838e5662db92c9310aba0aecee444b713906b2f34876083ccdb22b090/openapi-generators/openapi-python-client/issues/587 |
| og:image:alt | Describe the bug GitHub OpenAPI Descriptor parsing It seems we can not parse the GitHub OpenAPI since in the SCIM emu we have twice the value ( add and Add ) values = EnumProperty.values_from_list(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexandreODelisle |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/openapi-generators/openapi-python-client git https://github.com/openapi-generators/openapi-python-client.git |
| octolytics-dimension-user_id | 84925606 |
| octolytics-dimension-user_login | openapi-generators |
| octolytics-dimension-repository_id | 240776275 |
| octolytics-dimension-repository_nwo | openapi-generators/openapi-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240776275 |
| octolytics-dimension-repository_network_root_nwo | openapi-generators/openapi-python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width