Strona działa najlepiej z włączonym JavaScript.
Strona główna
Odkrywaj
Pomoc
Zaloguj się
bubblev
/
swagger-ui
Obserwuj
4
Polub
0
Forkuj
0
Kod
Zgłoszenia
0
Oczekujące zmiany
0
Wydania
0
Wiki
Aktywność
Przeglądaj źródła
#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 lat temu
rodzic
165c1d7fcb
commit
8b073757fe
1 zmienionych plików
z
1 dodań
i
1 usunięć
Widok podzielony
Opcje porównania
Pokaż statystyki
Ściągnij plik aktualizacji
Ściągnij plik porównania
+1
-1
src/core/plugins/samples/fn.js
+ 1
- 1
src/core/plugins/samples/fn.js
Wyświetl plik
@@ -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) => {
Napisz
Podgląd
Ładowanie…
Anuluj
Zapisz