Šī lapa labāk darbojas, ja pārlūkam ir iespējots JavaScript.
Sākums
Izpētīt
Palīdzība
Pierakstīties
bubblev
/
swagger-ui
Vērot
4
Pievienot zvaigznīti
0
Atdalīts
0
Kods
Problēmas
0
Izmaiņu pieprasījumi
0
Laidieni
0
Vikivietne
Aktivitāte
Pārlūkot izejas kodu
#3289
- Update boolean sample function to accept schema object and return value based off of schema's default value (if exists)
bubble
Owen Conti
pirms 7 gadiem
vecāks
165c1d7fcb
revīzija
8b073757fe
1 mainītis faili
ar
1 papildinājumiem
un
1 dzēšanām
Dalītais skats
Salīdzināšanas iespējas
Rādīt statistiku
Lejupielādēt ielāpa failu
Lejupielādēt izmaiņu failu
+1
-1
src/core/plugins/samples/fn.js
+ 1
- 1
src/core/plugins/samples/fn.js
Parādīt failu
@@ -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) => {
Rakstīt
Priekšskatītījums
Notiek ielāde…
Atcelt
Saglabāt