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

Generated OpenAPI files wrongly encode enums #517

Open
bripkens opened this issue Dec 15, 2023 · 0 comments
Open

Generated OpenAPI files wrongly encode enums #517

bripkens opened this issue Dec 15, 2023 · 0 comments

Comments

@bripkens
Copy link
Contributor

bripkens commented Dec 15, 2023

The repo supports the creation of OpenAPI files via make gen-openapi. Unfortunately, the generated files wrongly encode enums (as strings vs. numbers):

Examples

    "v1SeverityNumber": {
      "type": "string",
      "enum": [
        "SEVERITY_NUMBER_UNSPECIFIED",
        "SEVERITY_NUMBER_TRACE",
        "SEVERITY_NUMBER_TRACE2",
        "SEVERITY_NUMBER_TRACE3",
        "SEVERITY_NUMBER_TRACE4",
        "SEVERITY_NUMBER_DEBUG",
        "SEVERITY_NUMBER_DEBUG2",
        "SEVERITY_NUMBER_DEBUG3",
        "SEVERITY_NUMBER_DEBUG4",
        "SEVERITY_NUMBER_INFO",
        "SEVERITY_NUMBER_INFO2",
        "SEVERITY_NUMBER_INFO3",
        "SEVERITY_NUMBER_INFO4",
        "SEVERITY_NUMBER_WARN",
        "SEVERITY_NUMBER_WARN2",
        "SEVERITY_NUMBER_WARN3",
        "SEVERITY_NUMBER_WARN4",
        "SEVERITY_NUMBER_ERROR",
        "SEVERITY_NUMBER_ERROR2",
        "SEVERITY_NUMBER_ERROR3",
        "SEVERITY_NUMBER_ERROR4",
        "SEVERITY_NUMBER_FATAL",
        "SEVERITY_NUMBER_FATAL2",
        "SEVERITY_NUMBER_FATAL3",
        "SEVERITY_NUMBER_FATAL4"
      ],
      "default": "SEVERITY_NUMBER_UNSPECIFIED",
      "description": "Possible values for LogRecord.SeverityNumber.\n\n - SEVERITY_NUMBER_UNSPECIFIED: UNSPECIFIED is the default SeverityNumber, it MUST NOT be used."
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant