mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-06 04:19:26 +00:00
This PR updates the examples for Connexion 3.0 and merges them for OpenAPI and Swagger. 2 examples required some changes to make them work: - The reverse proxy example required some fixes to the SwaggerUIMiddleware to leverage the `root_path` correctly. This is included in the PR. - The enforced defaults example requires the json validator to adapt the body and pass it on. We currently pass on the original body after validation, and I'm not sure if we should change this. I'll submit a separate PR to discuss this.
26 lines
545 B
YAML
26 lines
545 B
YAML
swagger: "2.0"
|
|
|
|
info:
|
|
title: Hello World
|
|
version: "1.0"
|
|
basePath: /swagger
|
|
|
|
paths:
|
|
/greeting/{name}:
|
|
post:
|
|
summary: Generate greeting
|
|
description: Generates a greeting message.
|
|
operationId: hello.post_greeting
|
|
responses:
|
|
200:
|
|
description: greeting response
|
|
schema:
|
|
type: string
|
|
example: "hello dave!"
|
|
parameters:
|
|
- name: name
|
|
in: path
|
|
description: Name of the person to greet.
|
|
required: true
|
|
type: string
|