[OpenAPI 3.1] Phase 1: 3.0→3.1 converter

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

メンテナーはふだん 5 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, openapi
領域
tooling

調査の方向性

Start from the plan in #942, then look at how org.openapitools.openapidiff.core currently parses specs and where swagger-core's mapper and JsonSchema are already used. The new normalize package must walk components, parameters, headers, bodies, callbacks and nested schemas, applying the listed rules on a deep copy. Compare converted 3.0 output against natively parsed 3.1 for the paired fixtures under the test resources as serialized JSON; also add the Swagger 2.0 fixture and a test asserting the input objects are unchanged.

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

説明

OpenAPI 3.1.0 Support

Part of the OpenAPI 3.1 plan: #942 (Stage 1, Phase 1)

Goal

A converter that turns Swagger 2.0 / OpenAPI 3.0 objects into the 3.1 form. Not wired in yet.

Scope
  • New package org.openapitools.openapidiff.core.normalize, called once per spec
  • Walks every schema: components, parameters, headers, request/response bodies, callbacks, and nested (properties, items, additionalProperties, allOf/anyOf/oneOf, not)
  • Rules: type → types; nullable: true → "null" in types (not when there is no type); boolean exclusiveMinimum/Maximum → numeric; example → examples; typed classes → JsonSchema
  • Works on a copy (JSON round-trip with swagger-core's mapper), so the input objects are never modified
Done when
  • Converted 3.0 == natively parsed 3.1 (compared as serialized JSON) for all paired fixtures
  • Swagger 2.0 fixture converts correctly
  • Copy test: input objects are unchanged after conversion
主要言語
Java
スター
1.1k
フォーク
191
平均マージ
4日 23時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

OpenAPITools/openapi-diff のほかの issue

OpenAPITools/openapi-diff の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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