OpenAPITools / OpenAPITools/openapi-diff
Removing a Query parameter is considered a breaking change while removing a Request Body parameter isn't
- 主要言語
- Java
- スター
- 1.1k
- フォーク
- 190
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
While testing this tool, we've noticed that removing a query parameter would give a API changes broke backward compatibility result while removing a request body parameter would return a API changes are backward compatible. Shouldn't both be breaking changes?
If this is expected, we'd be curious to understand why that is.
Here are the spec files we used to test this:

old_queryparameter.yml :
openapi: "3.0.1"
info:
title: "Public Api"
description: ""
version: "2022-08-23T16:17:54Z"
servers:
- url: "https://someurl"
variables:
basePath:
default: "/v1"
paths:
/auth:
post:
parameters:
- name: "Username"
in: "query"
required: true
schema:
type: "string"
- name: "Password"
in: "query"
required: true
schema:
type: "string"
new_queryparameter.yml :
openapi: "3.0.1"
info:
title: "Public Api"
description: ""
version: "2022-08-23T16:17:54Z"
servers:
- url: "https://someurl"
variables:
basePath:
default: "/v1"
paths:
/auth:
post:
parameters:
- name: "Username"
in: "query"
required: true
schema:
type: "string"

old_requestbody.yml:
openapi: "3.0.1"
info:
title: "Public Api"
description: ""
version: "2022-08-23T16:17:54Z"
servers:
- url: "https://someurl"
variables:
basePath:
default: "/v1"
paths:
/auth:
post:
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/AuthRequest"
required: true
components:
schemas:
AuthRequest:
required:
- "Username"
- "Password"
type: "object"
properties:
Username:
type: "string"
Password:
type: "string"
new_requestbody.yml:
openapi: "3.0.1"
info:
title: "Public Api"
description: ""
version: "2022-08-23T16:17:54Z"
servers:
- url: "https://someurl"
variables:
basePath:
default: "/v1"
paths:
/auth:
post:
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/AuthRequest"
required: true
components:
schemas:
AuthRequest:
required:
- "Username"
type: "object"
properties:
Username:
type: "string"
Thank you!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue にある old_queryparameter.yml/new_queryparameter.yml と old_requestbody.yml/new_requestbody.yml を使って比較を再現し、その後、クエリパラメーターとリクエストボディスキーマの互換性比較のエントリーポイントを調べてください。報告された結果を、想定される破壊的変更の動作と比較してください。開始前に pull request #474 を確認してください。この issue に対してすでに開かれているためです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, openapi
- 領域
- api
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100