Add support for templatedRef in Reference Object
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
調査の方向性
まず Reference Object の定義、JSON Reference の資料、RFC 6570、およびリンクされている JSON Schema ボキャブラリーに関する議論を確認します。$templatedRef のセマンティクスとスコープについて合意し、collection と style の例をサポートできる十分な明確さで仕様化できた時点で、作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
Proposing to add support for "$templatedRef" to Reference Objects supporting templated references, allowing referencing dynamic schemas that could be retrieved by substituting the template variables by the selected value for earlier path parameters
so that later path parameters can be defined differently based on earlier path parameters.
Example:
"parameters" :
{
"collection-styleId" :
{
"name" : "styleId",
"schema" :
{
"$templatedRef" : "./api/collections-styles/{collectionId}"`
}
}
}
As it was initially suggested that this would require to first extend JSON schema, an initial discussion took place in https://github.com/json-schema-org/json-schema-vocabularies/issues/36 . However reading on https://swagger.io/specification/ that the Reference Object is defined by the JSON Reference, rather than by JSON Schema, it seems that this could rather simply be extended with$templatedRef, following https://tools.ietf.org/html/rfc6570 (or a simpler subset of it).
The {collectionId} template would be replaced by a selected value like collection1.
(e.g. in this example, this "$templatedRef" is used to define the valid values for {styleId} in a path /collections/{collectionId}/styles/{styleId}).
The {collectionId} would have previously been validated against another potentially dynamic list like "$ref" : "./api/collections".
./api/collections would return something like:
{
"type" : "string",
"enum" : [
"collection1",
"collection2",
"collection3"
]
}
and ./api/collection-styles/collection1 would return something like
{
"type" : "string",
"enum" : [
"style234",
"style235",
"style236"
]
}
while ./api/collection-styles/collection2 would return something like
{
"type" : "string",
"enum" : [
"style454",
"style455",
"style456"
]
}
The context being that available/compatibles styles depend on the selected collection.
Such a capability would allow to define much more interoperable APIs, where the specifics of a particular instance / deployment would be left to the templated references. In turn this would allow to automatically generate clients from an API definition that will work with multiple instances of the same templatable API, therefore extending the usability of clients automatically generated from OpenAPI definitions beyond on-the-fly client generation, more suitable for compiled programming languages.
- 主要言語
- Markdown
- スター
- 31.2k
- フォーク
- 9.2k
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OAI/OpenAPI-Specification のほかの issue
-
Housekeeping
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
OAI/OpenAPI-Specification#5566 ·
メンテナーはふだん 1 日以内に返信
-
Housekeeping
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
OAI/OpenAPI-Specification#5562 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Housekeeping
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
OAI/OpenAPI-Specification#5556 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
v3.2.1 release再び着手できるかも @lornajane が 32 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
OAI/OpenAPI-Specification#5460 · コメント 11 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
param serialization
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
OAI/OpenAPI-Specification#5366 · コメント 12 件 ·
メンテナーはふだん 1 日以内に返信
OAI/OpenAPI-Specification の issue をすべて見る
似ている issue
-
small item
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
canonical/pebble#1127 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AOSSIE-Org/Gitcord-GithubDiscordBot#147 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`RedisList.reversed()` view returns an empty `range` and `trim` removes all elements対応中かも @CCCLL が今日担当しました。 オープンstatus: waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
spring-projects/spring-data-redis#3461 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
huggingface/transformers#49556 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信