How to make SmartDocs render dropdown based on "enum" property for parameters in formData?

In my YAML specification there are parameters where only certain values can be passed, which I have listed in an array in the "enum" property.

- name: scope
  in: formData
  description: Enter <em>bearer</em> or <em>mobile</em>
  required: true
  type: string
  enum:
    - bearer
    - mobile

When using "in: query" or "in: header" SmartDocs will render a dropdown to choose between these options.

4932-screen-shot-2017-05-25-at-93320-am.png

However when using "in: formData" it does not render a dropdown. Is there a way to change the SmartDocs template so it does?

1 3 267
3 REPLIES 3

Hi @Bennett Hansen,

Click 'Edit' tab in your API Documentation and give values for 'option' as a json array and save changes. You will be able to see the drop down.

Attaching screen shots

4933-form-drpdown.jpg

4934-dropdown.jpg

for reference:

@Hadlee N.A Thank you. Is there a way to make it render the dropdown when I import the spec file, like it does for header and query parameters? I would prefer not to have to manually edit via the UI every time I import and render the spec file.

@Bennett Hansen, the drop down gets rendered properly using the swagger editor. I am not sure why the same doesn't get reflected when the Specification is imported in the developer portal. @Anil Sagar could help!