jskov / openapi-jaxrs-client

An OpenAPI JAX-RS client code generator
Apache License 2.0
1 stars 4 forks source link

Bad string escaping #543

Closed jskov-jyskebank-dk closed 7 months ago

jskov-jyskebank-dk commented 7 months ago
ContactV2MergePatch:
      properties:
        email:
          description: Email address of the contact. Must comply with regex '^(?=.{1,64}@)[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,})$'

Ends up as:

  @JsonbProperty(JSON_PROPERTY_EMAIL)
  @Schema(nullable = true, description = "Email address of the contact. Must comply with regex '^(?=.{1,64}@)[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,})$'", example = "jeka@virksomhed.dk")
  private String email;

which results in: Illegal escape character

(Martinsen)