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.

Execute button issue when one of the parameters is boolean

See original GitHub issue

I’m using swagger-ui version 3.0.19, have discovered weird behaviour occurring when one of the parameters is type boolean. After loading page ‘Execute’ button is active, but cannot be clicked (no reaction). The solution is changing the value of boolean from/to true/false and after this ‘Execute’ will be able to perform some action. The interesting fact is, that if we add to parameter definition “default: true” is working from the beginning, but not for “default: false”. @shockey Can you have a look ?

swagger: "2.0"
info:
  version: "1.0.0"
  title: "someName"
host: "localhost:8080"
basePath: "/rest"
tags:
- name: "someTag"
schemes:
- "http"
paths:
  /search/receiptTime:
    get:
      tags:
      - "someTag"
      summary: "someSummary"
      description: "someDescription"
      operationId: "someOperationId"
      produces:
      - "application/json"
      - "application/xml"
      parameters:
      - name: "nodeIndexName"
        in: "query"
        required: true
        type: "string"
      - name: "excludeTime"
        in: "query"
        required: true
        type: "boolean"
        default: true
definitions:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
kwieconkowskicommented, Aug 1, 2017

@owenconti I see it now, yes you are right. The previous fix solves the issue, we can close it now.

1reaction
webroncommented, Jul 20, 2017

Yeah - that makes sense, only instead of ‘None’ value, it should just be an empty value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is wrong with boolean parameters?
A boolean argument indicates the function has 2 different behaviors. These 2 behaviors are probably tangled together. And this just calls for more....
Read more >
Assign 0 to False/1 to True in boolean Parameter + SSRS 2005
I have bind the dataset for boolean parameter. now the issue is when i click true radio button it not considering as '1'...
Read more >
WPF command /w boolean parameter leaves button disabeld
I'm having an issue with binding a Command to a button, with a Boolean CommandParameter. The result is always a disabled/not clickable ...
Read more >
Booleans - Manual - PHP
The bool type only has two values, and is used to express a truth value. It can be either true or false ....
Read more >
Input Boolean - Home Assistant
The Input Boolean helper integration allows you to define boolean values that can be controlled via the user interface and can be used...
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