Only top-level objects are validated
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by tracing how required properties are validated for schemas nested inside array items and other object properties. Add regression cases matching the invalid array-item and nested-object examples, then verify validation rejects required names missing from properties while preserving the existing top-level behavior.
索引モデルが issue の本文から書いたものです。
説明
Validation should fail when an object has an item in the required list that isn't defined in properties.
Validation fails as expected when an object is defined on the top level:
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
paths:
/my-pet:
get:
summary: A pet
operationId: getPet
tags:
- pets
responses:
'200':
description: A pet
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
components:
schemas:
Pet:
type: object
required:
- name
- undefinedRequiredItem # This item is not defined in properties, FAIL validation
properties:
name:
type: string
> Required list has not defined properties: ['undefinedRequiredItem']
BUG: Validation passes for an invalid object used as an array item:
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
paths:
/pets:
get:
summary: List all pets
operationId: listPets
tags:
- pets
responses:
'200':
description: Array of pets
content:
application/json:
schema:
$ref: "#/components/schemas/Pets"
components:
schemas:
Pets:
type: array
items:
type: object
required:
- name
- undefinedRequiredItem # This item is not defined in properties, but validation passes
properties:
name:
type: string
> OK
BUG: Validation passes for an invalid nested object:
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
paths:
/my-pet:
get:
summary: A pet
operationId: getPet
tags:
- pets
responses:
'200':
description: A pet
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
components:
schemas:
Pet:
type: object
properties:
pet:
type: object
required:
- name
- undefinedRequiredItem # This item is not defined in properties, but validation passes
properties:
name:
type: string
> OK
- 主要言語
- 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 ·