microsoft / microsoft/OpenAPI.NET.OData
orderby/select/expand should be oneOf when UseStringArrayForQueryOptionsSchema is false
オープン
まだ誰も着手していません。
priority:p1
type:bug
- 主要言語
- C#
- スター
- 240
- フォーク
- 70
- 平均マージ
- 7時間 59分
- マージ済み PR(30日)
- 13
説明
Currently we describe
parameters:
- name: $select
in: query
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
enum:
- id
- firstName
- ....
It should instead be
parameters:
- name: $select
in: query
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
oneOf:
- type: string
- type: string
enum:
- id
- firstName
- ....
This is because for any navigation property you can write $select=navProperty($expand=subproperty) and we don't want to project all possibilities. But we don't want to restrict clients to simply the scalar/first level properties.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、UseStringArrayForQueryOptionsSchema と、$select、$orderby、$expand のスキーマ生成箇所を特定します。現在生成されている OpenAPI スキーマを issue の例と比較します。ナビゲーションプロパティの式が引き続き使用可能であり、スカラーおよび第1レベルのプロパティが要求された oneOf 構造で表現されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, openapi
- 領域
- api
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100