Closed glowcloud closed 3 months ago
Le'ts concentrate the type casting int config/type-cast
module. We will map path
to the typecaster to make the design declarative.
const Boolean = (string) => boolean
Map
- syntaxHighlight.activated: Boolean
We want to apply the typecasting as a last operation in the merge
function.
Addressed in https://github.com/swagger-api/swagger-ui/pull/9829
When the configuration options are defined in the URL query parameters, we are actually getting
strings
. This causes issues if the value of the configuration parameter should not be astring
.For example, for
deepLinking
we should actually have aboolean
value, but instead we'll have a string"true"
. This means that this configuration option won't actually be activated.To fix this, we need to cast values into proper types if we can, ex. for
number
andboolean
. We won't be parsingobject
andarray
type values.