Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Why does the JSON schema for 3.0 specify patternProperties for component names but allows additional properties?

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

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

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

評価

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

調査の方向性

3.0 JSON schema から始め、コンポーネント名の扱いを versions/3.0.3.md の固定フィールドのセクションと比較し、その後、根拠について discussion #2439 を確認してください。追加プロパティを許可することが意図されたものかどうかを文書化するか、schema/spec の正確な修正を特定できれば完了です。

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

説明

bug Schema
Discussed in https://github.com/OAI/OpenAPI-Specification/discussions/2439

Originally posted by ryankinderman January 11, 2021
I've been working on some functionality that uses the JSON schema to help validate OpenAPI schemas, and recently noticed that the 3.0 schema allows any value for {name} in /components/{component}/{name}, while the specification states that "All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$." It seems like this could have been validated automatically by simply adding additionalProperties: false to the JSON schema.

My question is: Was not including additionalProperties: false in the JSON schema for 3.0 just an accidental omission, or was there some rationale behind not doing it?

Thanks for clarifying!

主要言語
Markdown
スター
31.2k
フォーク
9.2k
平均マージ
2日 9時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

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

OAI/OpenAPI-Specification のほかの issue

OAI/OpenAPI-Specification の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

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

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