microsoft / microsoft/OpenAPI.NET.OData

Optimization - reusable components for orderby/expand/select query parameters

オープン
#612 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

priority:p1 type:enhancement
主要言語
C#
スター
240
フォーク
70
平均マージ
7時間 59分
マージ済み PR(30日)
13

説明

Since #197 was implemented through #499, we have a big opportunity to make descriptions much smaller.

Effectively all operations now have the same definition for those query parameters when they support it

        - name: $orderby
          in: query
          description: Order items by property values
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $select
          in: query
          description: Select properties to be returned
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $expand
          in: query
          description: Expand related entities
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string

When the setting it on, we should do the same thing we do for count/top/skip/filter... and have instead

 - $ref: '#/components/parameters/expand'
 - $ref: '#/components/parameters/select'
 - $ref: '#/components/parameters/orderby'

Which would save a ton of repetition throughout the final description.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、再利用可能な count/top/skip/filter パラメーターの既存の処理と、それを制御する設定を見つけます。現在 orderby、select、expand がどのように出力されているかを追跡し、次に設定を有効にするとコンポーネントパラメーターへの参照が生成され、設定が無効な場合は既存の動作が維持されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
api, backend-api-design
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。