Skip to content

Doesn't take pattern field into account #104

Closed
@eelessam

Description

@eelessam

Hi I have the following contract

openapi: 3.0.0
info:
  title: ban-check
  version: '1.0'
servers:
  - url: 'http://localhost:3000'
paths:
  /demo-app/ban-check:
    post:
      summary: ban-check
      tags: []
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - BANNED
                      - NOT_BANNED
                  tom:
                    type: string
                    enum:
                      - BANNED
                      - NOT_BANNED
                required:
                  - status
      parameters:
        - schema:
            type: string
            enum:
              - VENTURE1
              - VENTURE2
          in: header
          name: Venture-Name
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dni:
                  type: string
                  minLength: 9
                  maxLength: 9
                  pattern: '^[A-Za-z0-9]+$'
              required:
                - dni
        description: Dni request
components:
  schemas: {}

To reproduce:

When I compare it with another contract that has a stricter pattern on the REGEX for example only numbers or only lower case, the change is not detected by the diff tool.

Expected behaviour:

It shows that the regex has changed and thus is a breaking change

Metadata

Metadata

Assignees

Labels

Still Valid?Issue is need to be reproduced on latest buildhelp wanted

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions