Ejemplo n.º 1
0
 def openapi_field(self) -> gui_fields.Field:
     return fields.List(
         fields.String(validate=fields.ValidateAnyOfValidators([
             fields.ValidateIPv4(),
             gui_fields.ValidateHostName(),
         ])),
         description="A list of IPv4 addresses.",
     )
Ejemplo n.º 2
0
 def openapi_field(self) -> gui_fields.Field:
     return fields.String(
         description="An IPv4 address.",
         validate=fields.ValidateAnyOfValidators([
             fields.ValidateIPv4(),
             gui_fields.ValidateHostName(),
         ]),
     )