Changes reported in operations but only securityScheme changed
まだ誰も着手していません。
評価
調査の方向性
まず、示されている2つの OpenAPI 3.1 ドキュメントと openapi-diff-core 2.1.6 依存関係を使って報告を再現します。OAuth2 securityScheme の authorizationUrl と tokenUrl への変更が POST /users にどのように割り当てられるかを追跡し、次に報告された変更箇所を更新して、結果のメッセージが security-scheme の変更を特定していることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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
]
- 主要言語
- Java
- スター
- 1.1k
- フォーク
- 190
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenAPITools/openapi-diff のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
OpenAPITools/openapi-diff#506 ·
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
OpenAPITools/openapi-diff#364 ·
-
bug OpenAP 3.1.0 Support
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
OpenAPITools/openapi-diff#910 · コメント 1 件 ·
-
Breaking/Non-Breaking classification
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
OpenAPITools/openapi-diff#886 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
OpenAPITools/openapi-diff#883 ·
OpenAPITools/openapi-diff の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·