Hi,
I'm using the gradle swagger plugin
<https://github.com/gigaSproule/swagger-gradle-plugin> that generates
the Swagger OAS in json format and under the hood uses Swagger-core.
I want to be able to add constraints to ensure that elements of a List are
of a certain String length and of a particular pattern such as
My original class is as follows:
private class MyRequest {
@Size(max=10)
private List<@MinLength(10) @Pattern("^myPattern$") String> foo;
}
However, when checking the generated Swagger JSON, i was *expecting*...
type: array
items:
type: string
minLength: 10
pattern: ^myPattern$
but the items array only contained a type property
type: array
items:
type: string
Is this possible and if so, how i can achieve this?
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.