Files
connexion/examples/openapi3/enforcedefaults_aiohttp/enforcedefaults-api.yaml
Pavol Vargovčík a6717c3bbf Enforcedefaults aiohttp (#1163)
* cache ConnexionRequest.json

* add openapi3 enforcedefaults_aiohttp example

Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
2022-02-23 22:31:41 +01:00

40 lines
867 B
YAML

openapi: '3.0.0'
info:
version: '1'
title: Custom Validator Example
servers:
- url: http://localhost:8080/{basePath}
variables:
basePath:
default: api
paths:
/echo:
post:
description: Echo passed data
operationId: enforcedefaults.echo
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Data'
responses:
'200':
description: Data with defaults filled in by validator
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Data:
type: object
properties:
foo:
type: string
default: foo
Error:
type: string