OpenAPITools / OpenAPITools/openapi-diff

References are not resolved according to RFC3986

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

@joschi がすでに取り組んでいます。

2024年6月15日 から。

  • #271 @hiddewie による — マージされずにクローズ
  • #676 @joschi による — オープン
enhancement
主要言語
Java
スター
1.1k
フォーク
190
PR マージ指標
30日以内にマージされた PR はありません

説明

See the specification here: https://swagger.io/docs/specification/using-ref/.
This points to RFC3986 (https://tools.ietf.org/html/rfc3986) for the structure of JSON references. This RFC is not supported in openapi-diff.

I made an example of a valid reference according to OpenAPI 3, for which OpenAPI diff throws an error. See https://github.com/OpenAPITools/openapi-diff/pull/271

Example content:

openapi: 3.0.1
info:
  title: Service
  description: test
  version: test
  contact:
    name: test
    url: 'test'
servers:
  - url: 'localhost'
paths:
  /feature:
    get:
      summary: Get feature state
      operationId: feature
      description: Gets feature
      parameters:
        - name: feature
          in: query
          schema:
            $ref: '#/components/schemas/Feature/properties/feature'    # <---- this
          required: true
      responses:
        '200':
          description: Found feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
components:
  schemas:
    Feature:
      type: object
      properties:
        feature:
          type: string
          enum:
            - alpha
            - beta
        value:
          type: boolean
      required:
        - feature
        - value

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

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

はじめの一歩

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

調査の方向性

提供された OpenAPI の例から始め、その RFC3986 リファレンスを openapi-diff の resolver の動作と比較します。リンクされた仕様と既存の pull request を確認し、プロパティリファレンスがエラーなしで受け入れられること、また既存のリファレンス処理が引き続き正しく動作することを検証します。

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

評価

技術スタック
java
領域
api
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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