You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this as well. I would consider this not as enhancement, but as bug, because you can not load valid openapi files. Maybe a step into fixing this is to ignore it.
Simple way to reproduce:
openapi: 3.0.0
info:
version: "1"
title: openapi test
paths:
/foo:
post:
tags:
- foo
summary: foo
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
example:
foo: bar
bar: foo
responses:
"200":
description: Ok
content:
application/json:
schema:
type: string
from openapi_core import create_spec
from openapi_core.shortcuts import RequestValidator
import yaml
with open("openapi.yaml") as f:
openapi_spec = yaml.safe_load(f)
spec = create_spec(openapi_spec)
validator = RequestValidator(spec)
As per https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#schema-object - currently it's expected to be schema.
The text was updated successfully, but these errors were encountered: