Commit 9604948e authored by Noel's avatar Noel
Browse files

Permite añadir default en objetos

parent ab03f77e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -885,6 +885,15 @@ class JsonSchemaGenerator
                              thisPropertyNode.meta.put("title", title)
                          }

                        // Optionally add default
                        prop.flatMap {
                          p: BeanProperty =>
                            Option(p.getAnnotation(classOf[JsonSchemaDefault])).map(_.value())
                        }.map {
                            defe =>
                              thisPropertyNode.meta.put("default", defe)
                          }

                        // Optionally add url
                        prop.flatMap {
                          p: BeanProperty =>