Changes reported in operations but only securityScheme changed
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by reproducing the report with the two OpenAPI 3.1 documents shown and the openapi-diff-core 2.1.6 dependency. Trace how changes to the OAuth2 securityScheme's authorizationUrl and tokenUrl are assigned to POST /users, then update the reported change location and verify the resulting message identifies the security-scheme change.
Written by the indexing model from the issue text.
Description
I am using
testImplementation("org.openapitools.openapidiff:openapi-diff-core:2.1.6") {
exclude(group = "io.swagger.core.v3", module = "swagger-core")
exclude(group = "io.swagger.core.v3", module = "swagger-models")
exclude(group = "io.swagger.core.v3", module = "swagger-annotations")
}
Given the two API docs to compare where the only change is in authorizationUrl ('' vs. 'some_value') and tokenUrl ('' vs. 'some_value').
First file
components:
securitySchemes:
OAuth2:
bearerFormat: JWT
flows:
authorizationCode:
authorizationUrl: ''
tokenUrl: ''
in: header
scheme: bearer
type: oauth2
info:
title: Company API
version: V0
openapi: 3.1.0
paths:
/users:
post:
operationId: createUser
responses:
"201":
description: Created
security:
- OAuth2: []
servers:
- description: Default Server URL
url: /api/
Second file
components:
securitySchemes:
OAuth2:
bearerFormat: JWT
flows:
authorizationCode:
authorizationUrl: 'some_value'
tokenUrl: 'some_value'
in: header
scheme: bearer
type: oauth2
info:
title: Company API
version: V0
openapi: 3.1.0
paths:
/users:
post:
operationId: createUser
responses:
"201":
description: Created
security:
- OAuth2: []
servers:
- description: Default Server URL
url: /api/
The resulting error message is misleading as the issue is not directly related to any concrete endpoint. This took me quite a while to narrow this down to this difference.
So it would be nice to have a more suitable error message.
org.opentest4j.AssertionFailedError: [### Company API (v V0)
---
#### What's Changed
---
##### `POST` /users
#### Result
---
API changes broke backward compatibility
]
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenAPITools/openapi-diff
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenAPITools/openapi-diff#506 ·
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenAPITools/openapi-diff#364 ·
-
bug OpenAP 3.1.0 Support
Difficulty 3/5 1-2 days Newbie friendliness 68/100
OpenAPITools/openapi-diff#910 · 1 comment ·
-
Breaking/Non-Breaking classification
Difficulty 3/5 1-2 days Newbie friendliness 55/100
OpenAPITools/openapi-diff#886 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
OpenAPITools/openapi-diff#883 ·
All issues in OpenAPITools/openapi-diff
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100