-
Notifications
You must be signed in to change notification settings - Fork 67
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
oasdiff fails to detect a breaking chnage for type change #280
Comments
Hi @gssbzn , |
Sorry I was busy yesterday and could go back to this
This is find if we are being strict on the required for response but I should've probably stick to my original test which was a change of type base: openapi: 3.0.1
info:
title: Test
version: "2.0"
servers:
- url: http://localhost:8080
tags:
- name: Tests
description: Test tag.
paths:
/api/atlas/v2/changeOfResponseArrayFieldTest:
get:
tags:
- Tests
summary: This is a test
description: Test description.
operationId: getTest
parameters:
- name: new
in: query
description: Test param
schema:
type: string
responses:
"200":
description: OK
content:
application/vnd.atlas.2023-01-01+json:
schema:
type: array
items:
$ref: '#/components/schemas/ChangeOfResponseArrayFieldTestView'
components:
schemas:
ChangeOfResponseArrayFieldTestView:
type: object
properties:
testField:
type: string
description: A nested view revision: openapi: 3.0.1
info:
title: Test
version: "2.0"
servers:
- url: http://localhost:8080
tags:
- name: Tests
description: Test tag.
paths:
/api/atlas/v2/changeOfResponseArrayFieldTest:
get:
tags:
- Tests
summary: This is a test
description: Test description.
operationId: getTest
parameters:
- name: new
in: query
description: Test param
schema:
type: string
responses:
"200":
description: OK
content:
application/vnd.atlas.2023-01-01+json:
schema:
type: array
items:
$ref: '#/components/schemas/ChangeOfResponseArrayFieldTestView'
components:
schemas:
ChangeOfResponseArrayFieldTestView:
type: object
properties:
testField:
type: integer
description: A nested view
format: int32 is not flagged by oasdiff -base ChangeOfResponseArrayFieldTest-base.yaml -revision ChangeOfResponseArrayFieldTest-revision.yaml -check-breaking |
Describe the bug
This may be similar to #276 but if I change elements in an array of the response it seems to fail to recognize the breaking change
To Reproduce
Base
Revision
Produces no breaking change
oasdiff -base ChangeOfResponseArrayFieldTest-base.yaml -revision ChangeOfResponseArrayFieldTest-revision.yaml -check-breaking # no result
But produces a correct diff
Expected behavior
I expect a breaking change report
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: