Re: How to override pattern from java @Pattern validation

2017-02-04 Thread lange.kay via Swagger
On Sun, 2/5/17, alex.rhomb...@temet.ch wrote: Subject: Re: How to override pattern from java @Pattern validation To: "Swagger" Date: Sunday, February 5, 2017, 1:08 AM Thanks, I did: https://github.com/swagger-api/swagger-core/i

Re: How to override pattern from java @Pattern validation

2017-02-04 Thread alex . rhomberg
Thanks, I did: https://github.com/swagger-api/swagger-core/issues/2102 -- 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 swagger-swaggersocket+unsubscr...@googlegroups.

Re: How to override pattern from java @Pattern validation

2017-02-04 Thread tony tam
I think this is because of differences between Java and the REGEX format supported in the editor. Could you please open an issue in swagger-core so we can see about converting the syntax to the spec supported one? > On Feb 4, 2017, at 2:52 PM, alex.rhomb...@temet.ch wrote: > > Relevant part in

Re: How to override pattern from java @Pattern validation

2017-02-04 Thread alex . rhomberg
Relevant part in yaml: properties: id: type: integer format: int64 name: type: string pattern: '(?U)\w[\w -]*\w' Results in Swagger error Object didn't pass validation for format regex: (?U)\w[\w -]*\w If I remove the (?U) in swagger editor, the

Re: How to override pattern from java @Pattern validation

2017-02-04 Thread tony tam
Can you please share what is being emitted in the swagger definition? > On Feb 4, 2017, at 12:15 AM, alex.rhomb...@temet.ch wrote: > > I have this validation: > > /** > * @return the name > */ > @NotNull > //Validation: > @Pattern(regexp="(?U)\\w[\\w -]*\\w") > public final String getNam

How to override pattern from java @Pattern validation

2017-02-04 Thread alex . rhomberg
I have this validation: /** * @return the name */ @NotNull //Validation: @Pattern(regexp="(?U)\\w[\\w -]*\\w") public final String getName() { return name; } The @Pattern is converted to a pattern constraint in swagger, but the (?U) switch is not supported. How can I override the pat