question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

enum string type field in formData with required=true always send the first value.

See original GitHub issue

Q&A (please complete the following information)

  • OS: macOS
  • Browser: Chrome
  • Version: 63
  • Method of installation: docker
  • Swagger-UI version: latest from docker hub: 2376859c51c8
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

formData field with type:string, required: true and enum fields, whatever you choose, it always send the first enum value.

Example Swagger/OpenAPI definition:

add one field to the official pet store example, whatever you choose, it will always send hello.

      - in: formData
        name: type
        type: string
        required: true
        enum:
          - hello
          - world

Expected behavior

swagger-ui will send the enum value I choose instead of the first enum value.

Screenshots

image

image

I’ve searched in existing issue but didn’t find any useful information. thank you!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bestmike007commented, Jul 16, 2018

@SongJoey it’s fixed in v3.17.4.

0reactions
mmsooncommented, Jul 16, 2018

Thanks. @bestmike007

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - How to Post Enum data in Postman with form-data type
I've tried searching Google but the answer is irrelevant, what I want to ask is how to Post enum data in Postman.
Read more >
Validation - react-jsonschema-form documentation
When the form is submitted, the form data is validated to conform to the given JSON schema;. As of version 5, as a...
Read more >
OpenAPI Specification
Fixed Fields. Field Name, Type, Description. swagger, string, Required. Specifies the Swagger Specification version being used.
Read more >
Upload Field - Alpaca Forms
List of disallowed values for the property. enum, array, List of specific values for this property. format, string, Data format of the property....
Read more >
Express Tutorial Part 3: Using a Database (with Mongoose)
First you require() mongoose, then use the Schema constructor to ... Field name and type as a key-value pair (i.e. as done with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found