Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hlc] generate unexpected enum if swagger has multiple identical x-ms-enum.name definitions #2789

Open
kazrael2119 opened this issue Sep 2, 2024 · 0 comments
Labels
CodeGen Issues that relate to code generation P1 priority 1

Comments

@kazrael2119
Copy link
Contributor

here are the two provisioningState definitions from swagger:
1:

"provisioningState": {
              "type": "string",
              "description": "Provisioning state.",
              "enum": [
                "created"
              ],
              "x-ms-enum": {
                "name": "ProvisioningState",
                "modelAsString": false
              }
            }

2:

"provisioningState": {
          "readOnly": true,
          "type": "string",
          "description": "The current provisioning state of the API Management gateway config connection ",
          "enum": [
            "Activating",
            "Canceled",
            "Failed",
            "Succeeded",
            "Terminating",
            "Upgrading",
            "Updating"
          ],
          "x-ms-enum": {
            "name": "ProvisioningState",
            "modelAsString": true
          }
        },

they have the same x-ms-enum,name and m4 will merge these two enum values which is unexpected
PS: if the first one has value[] or both of them have value[] in x-ms-enum , the second one will be missed stead of merging together

@kazrael2119 kazrael2119 changed the title [hlc] generate unexpected enum if swagger has several same x-ms-enum.name definition [hlc] generate unexpected enum if swagger has multiple identical x-ms-enum.name definitions Sep 2, 2024
@qiaozha qiaozha added CodeGen Issues that relate to code generation P1 priority 1 labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeGen Issues that relate to code generation P1 priority 1
Projects
None yet
Development

No branches or pull requests

2 participants