[RFC] Handle OpenAPI 3.1 BC Breaks
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- openapi, php
調査の方向性
まず既存の OpenAPI 3.0 仕様ファイルと pull request 128 の変更を読み、次にそれらを一覧にある OpenAPI 3.1 の breaking changes およびリンクされた release notes と比較します。この RFC は、完了済みの 3.0 サポートを壊さずに 3.1 を表現するためのアプローチを maintainers が選択して文書化した後にのみ完了となります。
索引モデルが issue の本文から書いたものです。
説明
It's nice to see the work for the OpenAPI 3.1 standard. I think a big part are the deprecated fields or type changes like:
- The nullable keyword has been removed from the Schema Object (null can be used as a type value).
- the type can be now an array with the type and
null - exclusiveMaximum and exclusiveMinimum cannot accept boolean values (following JSON Schema).
- See more at Stoplight Blog and OpenAPI Release Notes
How would you like to handle these breaking changes?
My first idea was to duplicate the spec files into a 3.0 and 3.1 Folder and use them according to the given OpenAPI version.
The positive parts are that static code analysis or the IDE knows which type of Object is used and the user don't have to handle multiple types. For example the type as string in OpenAPi 3.0 and type as array in OpenAPI 3.1 with null item. Also the spec could be validated and it's not necessary to add version switches for fields that are required or not.
The second Idea is to "convert" the Structure into the existing Spec Files. So a type with two items in OpenAPI would be an oneOf or if the type includes null the nullable flag would be added. But then you need to convert the items back to the new structure if you want to write a OpenAPI 3.1 file. The other part is, that you then support a converter from OpenAPI 3.0 to OpenAPI 3.1 and i don't think this is a feature to maintain in this library.
The last solution is to try to handle both versions into a single file. But that could be hard because of the breaking changes in OpenAPI 3.1. Even OpenAPI 3.1 didn't make a release without breaking changes. It could be complex to handle it here.
My preferred solution is version one because of the strict types and the clear break between Version 3.0 and 3.1
The Version and Specs for Version 3.0 are already feature complete and all changes effects only the new Spec files and couldn't break anything.
I look forward to your opinion. Maybe this should be clear before we make more changes into https://github.com/cebe/php-openapi/pull/128 ?
- 主要言語
- PHP
- スター
- 500
- フォーク
- 99
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cebe/php-openapi のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
cebe/php-openapi#247 · コメント 1 件 · リアクション 1 件 ·
-
php 8.4 deprecations オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
cebe/php-openapi#245 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
cebe/php-openapi#242 · コメント 6 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
cebe/php-openapi#238 ·
cebe/php-openapi の issue をすべて見る
似ている issue
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
UX
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug customer-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MagnaCapax/PMSS#949 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Automattic/static-site-importer#1829 ·