mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-09 20:37:46 +00:00
* cache ConnexionRequest.json * add openapi3 enforcedefaults_aiohttp example Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
40 lines
867 B
YAML
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
|