Este site funciona melhor com JavaScript.
Página inicial
Explorar
Ajuda
Acessar
bubblev
/
swagger-ui
Observar
4
Favorito
0
Fork
0
Código
Issues
0
Pull requests
0
Versões
0
Wiki
Atividade
Ver código fonte
#3289
- Update boolean sample function to accept schema object and return value based off of schema's default value (if exists)
bubble
Owen Conti
7 anos atrás
pai
165c1d7fcb
commit
8b073757fe
1 arquivos alterados
com
1 adições
e
1 exclusões
Visão dividida
Opções de diferenças
Mostrar estatísticas
Baixar arquivo de patch
Baixar arquivo de diferenças
+1
-1
src/core/plugins/samples/fn.js
+ 1
- 1
src/core/plugins/samples/fn.js
Ver arquivo
@@ -9,7 +9,7 @@ const primitives = {
"number": () => 0,
"number_float": () => 0.0,
"integer": () => 0,
"boolean": () => true
"boolean": (
schema
) => t
ypeof schema.default === "boolean" ? schema.default : t
rue
}
const primitive = (schema) => {
Escrever
Pré-visualização
Carregando…
Cancelar
Salvar