Generators aren't consistently escaping the regex patterns for python and python-flask.
Description
openapi-codegen python and python-flask generate different regex escapes.
Generated Client
ifbusiness_addr_zipisnotNoneandnotre.search(r'^\d{5}(?:[-\s]\d{4})?$', business_addr_zip): # noqa: E501Generated Server
ifbusiness_addr_zipisnotNoneandnotre.search(r'^\\d{5}(?:[-\\s]\\d{4})?$', business_addr_zip): # noqa: E501The client seems fine, but the server is double escaped.
openapi-generator version
docker image https://hub.docker.com/r/openapitools/openapi-generator-cli/
OpenAPI declaration file content or url
Specification:
PlaceQuery:
properties:
data:
properties:
entity_name:
type: stringphysical_address:
properties:
business_addr_zip:
pattern: ^\d{5}(?:[-\s]\d{4})?$type: stringrequired:
- business_addr_ziptype: objectrequired:
- entity_name
- physical_addresstype: objectrequired:
- datatype: objectCommand line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix
Generators aren't consistently escaping the regex patterns for python and python-flask.
Description
openapi-codegen python and python-flask generate different regex escapes.
Generated Client
Generated Server
The client seems fine, but the server is double escaped.
openapi-generator version
docker image https://hub.docker.com/r/openapitools/openapi-generator-cli/
OpenAPI declaration file content or url
Specification:
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix