Closed dloibl closed 9 months ago
Hi,
adding optional query parameters, i.e. required: false is considered as breaking change, but it shouldn't. Here is a minimal example to reproduce:
original.yaml
openapi: 3.1.0 paths: /api/foo: get: responses: '200': content: application/json: schema: type: object properties: name: type: string
changed.yaml
paths: /api/foo: parameters: - foo: in: query name: foo schema: type: string required: false get: responses: '200': content: application/json: schema: type: object properties: name: type: string
output:
openapi-changes version: 0.0.52 | compiled: Fri, 05 Jan 2024 13:54:26 UTC
SPEC extracted 2 commits from history DONE completed
└─┬Paths └─┬/api/foo └──[+] parameters (5:7)❌
Date: 01/15/24 | Commit: New: ./changed.yaml, Original: ./original.yaml Document Element | Total Changes | Breaking Changes paths | 1 | 1
❌ 1 Breaking changes out of 1 INFO Additions: 1 INFO Breaking Additions: 1
ERROR breaking changes discovered Error: breaking changes discovered
resolved in v0.0.53
v0.0.53
Hi,
adding optional query parameters, i.e. required: false is considered as breaking change, but it shouldn't. Here is a minimal example to reproduce:
original.yaml
changed.yaml
output:
openapi-changes version: 0.0.52 | compiled: Fri, 05 Jan 2024 13:54:26 UTC
SPEC extracted 2 commits from history
DONE completed
└─┬Paths └─┬/api/foo └──[+] parameters (5:7)❌
Date: 01/15/24 | Commit: New: ./changed.yaml, Original: ./original.yaml Document Element | Total Changes | Breaking Changes paths | 1 | 1
❌ 1 Breaking changes out of 1 INFO Additions: 1 INFO Breaking Additions: 1
ERROR breaking changes discovered Error: breaking changes discovered