Is it possible to write own validation for custom types ? If it is, can someone give me example ?
swagger version: 0.8.0
Can you elaborate a little bit more on this use case?
For example.
There is bookstore, with info about books: author, title, price. And we want, that books from some author will not cost more the some price. So I want write function ValidateBookCustom() like
if book.author == "Some author" {
if book.price > 1000 {
return false
}
else return true
}
And I want to use this function.
See also #1334
Most helpful comment
For example.
There is bookstore, with info about books: author, title, price. And we want, that books from some author will not cost more the some price. So I want write function ValidateBookCustom() like
And I want to use this function.