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

[BUG] enum does not support integer type #257

Open
JustSamuel opened this issue Dec 26, 2023 · 0 comments
Open

[BUG] enum does not support integer type #257

JustSamuel opened this issue Dec 26, 2023 · 0 comments

Comments

@JustSamuel
Copy link

Describe the bug
When defining the spec for an integer enum the resulting swagger will parse the enum values as strings, even if the type is integer or number.

To Reproduce

/**
 * GET /api/v1
 * @summary This is the summary of the endpoint
 * @param {integer} state.query.required - name param description - enum:1,2,3
 * @return {string} 200 - success response
 */

Creates:

type: integer
enum:
  - '1'
  - '2'
  - '3'
  - '4'

Expected behavior
Either give an error, or create the following correct swagger:

type: integer
enum:
  - 1
  - 2
  - 3
  - 4

Desktop:

  • Version 1.8.0
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