`Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^\\/']['patternProperties']['^(get|put|post|delete|options|head|patch|trace)$']['properties']['parameters']['items']:`
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- openapi, python
調査の方向性
Reproduce the minimal OpenAPI 3.0 document with openapi-spec-validator 0.3.0 and 0.2.10, focusing on the referenced query parameter under paths / get. Check the OpenAPI parameter rules and validator behavior when example and examples are both present. Done means establishing whether the validator behavior matches the specification and documenting or correcting the discrepancy.
索引モデルが issue の本文から書いたものです。
説明
I get:
{'in': 'query', 'name': 'bar', 'example': '1', 'examples': {'1': {'summary': '1', 'value': '1'}, '2': {'summary': '2', 'value': '2'}}, 'schema': {'type': 'string'}} is not valid under any of the given schemas
Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^\\/']['patternProperties']['^(get|put|post|delete|options|head|patch|trace)$']['properties']['parameters']['items']:
{'oneOf': [{'$ref': '#/definitions/Parameter'},
{'$ref': '#/definitions/Reference'}]}
On instance['paths']['/']['get']['parameters'][0]:
{'$ref': '#/components/parameters/foo',
'x-scope': ['file:///usr/share/ucs-test/73_udm-rest/openapi2.json']}
for
{
"components": {
"parameters": {
"foo": {
"in": "query",
"name": "bar",
"example": "1",
"examples": {
"1": {
"summary": "1",
"value": "1"
},
"2": {
"summary": "2",
"value": "2"
}
},
"schema": {
"type": "string"
}
}
}
},
"info": {
"description": "",
"title": "",
"version": "1.0.0"
},
"openapi": "3.0.0",
"paths": {
"/": {
"get": {
"parameters": [
{
"$ref": "#/components/parameters/foo"
}
],
"responses": { "200": {"description": "", "content": {"text/plain": {"schema": {"type": "string"}}}} }
}
}
}
}
since openapi-spec-validator==0.3.0. It succeeded to validate with openapi-spec-validator==0.2.10.
If I remove one of example or examples from #/components/parameters/foo the validation succeeds.
Does openapi define them as mutually exclusive?
https://swagger.io/docs/specification/adding-examples/ doesn't seem to contain a mix. The swagger UI just sucks in displaying examples.
- 主要言語
- Python
- スター
- 409
- フォーク
- 73
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-openapi/openapi-spec-validator のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
python-openapi/openapi-spec-validator#400 · コメント 1 件 ·
-
kind/bug/confirmed
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
python-openapi/openapi-spec-validator#373 · コメント 1 件 ·
python-openapi/openapi-spec-validator の issue をすべて見る
似ている issue
-
Add: hunch オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DiamondLightSource/dodal#2211 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openml/openml-python#1749 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
sipyourdrink-ltd/bernstein#6191 ·