mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
52 lines
985 B
YAML
52 lines
985 B
YAML
|
swagger: 2
|
||
|
info:
|
||
|
title: Echo API
|
||
|
description: Simple Rest Echo
|
||
|
version: "1.0.0"
|
||
|
host: "localhost:8002"
|
||
|
schemes:
|
||
|
- http
|
||
|
basePath: /v1
|
||
|
produces:
|
||
|
- application/json
|
||
|
paths:
|
||
|
/echo:
|
||
|
get:
|
||
|
description: "Returns the 'message' to the caller"
|
||
|
operationId: "echo"
|
||
|
parameters:
|
||
|
#- name: X-header-param
|
||
|
- name: headerParam
|
||
|
in: header
|
||
|
type: string
|
||
|
required: false
|
||
|
- name: message
|
||
|
in: query
|
||
|
type: string
|
||
|
required: true
|
||
|
responses:
|
||
|
200:
|
||
|
description: "Success"
|
||
|
schema:
|
||
|
$ref: EchoResponse
|
||
|
default:
|
||
|
description: "Error"
|
||
|
schema:
|
||
|
$ref: Error
|
||
|
definitions:
|
||
|
EchoResponse:
|
||
|
required:
|
||
|
- message
|
||
|
properties:
|
||
|
message:
|
||
|
type: string
|
||
|
Error:
|
||
|
properties:
|
||
|
code:
|
||
|
type: integer
|
||
|
format: int32
|
||
|
message:
|
||
|
type: string
|
||
|
fields:
|
||
|
type: string
|