Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

legal regex doesn't validate #85

Open
estimiriam opened this issue Nov 4, 2019 · 1 comment
Open

legal regex doesn't validate #85

estimiriam opened this issue Nov 4, 2019 · 1 comment

Comments

@estimiriam
Copy link

estimiriam commented Nov 4, 2019

pattern: '^(?i)one|two|three$'

The regex does not validate.
(?i) is the issue. It allows case-insensitive pattern match.

It causes this error in swagger-editor:

Structural error at components.schemas.Session.properties.operation.pattern
should match format "regex" format: regex

@influence160
Copy link

Hi,

I have the same problem with this

contract_id:
  in: header
  description: Identifiant 
  name: contract_id
  required: true
  schema:
    type: string
    pattern: (?i)^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
  example: 5DD440B2-197A-4AB7-B742-11CE25C9F2AB

result :

  Errors
  Hide
   
  Structural error at components.parameters.contract_id.schema.pattern
  should match format "regex"
  format: regex
  Jump to line 908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants