You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swagger-Editor version: Available release on the web
Swagger/OpenAPI version: 3.0.3
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.0.3
info:
title: Real Estate API
version: 1.0.0
paths:
/realEstateSites:
get:
summary: Get Real Estate Sites
operationId: getRealEstateSites
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
realEstateSite:
type: object
properties:
timeZone:
$ref: '#/components/schemas/TimeZone'
components:
schemas:
TimeZone:
description: Time zone as declared in the TZ database in the form "Area/Location".
type: string
minLength: 3
maxLength: 44
pattern: '^(?n)((?!Etc/GMT)[A-Z][A-Za-z_]{0,13}/[A-Z][A-Za-z_]{0,13})(/[A-Z][A-Za-z_]{0,13})?|(Etc/GMT[+-]\d{1,2})$'
example: Europe/Paris
Describe the bug you're encountering
Swagger editor does not recognize the valid regex (checked with https://regex101.com/) provided as the 'pattern' of TimeZone
To reproduce...
As soon as I put the YAML in the Swagger editor, it reports
Structural error at components.schemas.TimeZone.pattern
should match format "regex"
format: regex
Jump to line 30
Expected behavior
No error
Screenshots
Additional context or thoughts
It seems the (?n) is not recognized
On the web, I saw that the (?i) is not recognized either
(?n) match the remainder of the pattern with the following effective flags: gmn
n modifier: no capture. All capturing groups () are instead treated as if they were non-capturing groups (?:).
(?i) match the remainder of the pattern with the following effective flags: gmni
i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])
The text was updated successfully, but these errors were encountered:
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.0.3
info:
title: Real Estate API
version: 1.0.0
paths:
/realEstateSites:
get:
summary: Get Real Estate Sites
operationId: getRealEstateSites
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
realEstateSite:
type: object
properties:
timeZone:
$ref: '#/components/schemas/TimeZone'
components:
schemas:
TimeZone:
description: Time zone as declared in the TZ database in the form "Area/Location".
type: string
minLength: 3
maxLength: 44
pattern: '^(?n)((?!Etc/GMT)[A-Z][A-Za-z_]{0,13}/[A-Z][A-Za-z_]{0,13})(/[A-Z][A-Za-z_]{0,13})?|(Etc/GMT[+-]\d{1,2})$'
example: Europe/Paris
Describe the bug you're encountering
Swagger editor does not recognize the valid regex (checked with https://regex101.com/) provided as the 'pattern' of TimeZone
To reproduce...
As soon as I put the YAML in the Swagger editor, it reports
Expected behavior
No error
Screenshots
Additional context or thoughts
It seems the (?n) is not recognized
On the web, I saw that the (?i) is not recognized either
(?n) match the remainder of the pattern with the following effective flags: gmn
n modifier: no capture. All capturing groups () are instead treated as if they were non-capturing groups (?:).
(?i) match the remainder of the pattern with the following effective flags: gmni
i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])
The text was updated successfully, but these errors were encountered: