Validator doesn't report properties that are in the required list but not defined
まだ誰も着手していません。
評価
調査の方向性
Reproduce the supplied OpenAPI 3.0.3 example and inspect how required properties are checked when they are absent from properties. Done means the validator reports every undefined required property, including problem-type, order-trees, and site-location, rather than only event-photo.
索引モデルが issue の本文から書いたものです。
説明
Following specification causes validator to report only the event-photo property
Required list has not defined properties: ['event-photo']
whereas I would expect similar messages for the problem-type, order-trees and site-location properties.
openapi: 3.0.3
info:
title: Protect Earth API
version: 0.3.0
paths:
/events:
get:
operationId: get-events
summary: Get Events
description: Get a list of all the events
tags:
- Event
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Generic_Problem'
/orders:
post:
operationId: post-orders
summary: Create Order
tags:
- Order
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
responses:
'201':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Event'
components:
schemas:
Generic_Problem:
title: Problem
type: object
required:
- problem-type
- title
properties:
title:
type: string
status:
type: integer
Event:
title: Event
type: object
required:
- description
- event-photo
properties:
id:
type: string
summary:
type: string
description:
type: string
Order:
title: Order
type: object
required:
- site
- order-trees
properties:
id:
type: string
format: uuid
readOnly: true
site:
$ref: '#/components/schemas/Site'
Site:
title: Site
type: object
required:
- url
- site-location
properties:
id:
type: string
format: uuid
url:
type: string
format: url
- 主要言語
- 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
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100