lbovet / docson

Documentation for your JSON types
Apache License 2.0
491 stars 97 forks source link

Enum value false doesn't render #84

Open zbodor-gs opened 4 years ago

zbodor-gs commented 4 years ago

Hi, I guess because of an old Handlebars bug (https://github.com/wycats/handlebars.js/issues/827) false enum values (and thus 'constant' values too) don't render properly: they result in an empty string.

For example

{
  "type": "object",
  "properties": {
    "testTrue": {
      "type": "boolean",
      "enum": [ true ]
    },
    "testFalse": {
      "type": "boolean",
      "enum": [ false ]
    }
  }
}

results in

image

Is it possible to update the underlying handlebars lib to a newer version to fix this bug?

Thanks, Zoli

(Possible workarounds until then: https://stackoverflow.com/questions/17664323/handlebars-doesnt-render-boolean-variables-when-false)

yanick commented 4 years ago

Hi! Can you submit a PR with the change? I don't have a lot of tuits to work on this project, but I should be at least be able to merge and publish PRs.