-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathopenapi.yml
More file actions
50 lines (49 loc) · 1.41 KB
/
openapi.yml
File metadata and controls
50 lines (49 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
openapi: 3.0.2
info:
title: OpenAPI Generator Maven Plugin Template Customization Example
description: An example Maven project that uses the OpenAPI Generator Maven plugin with template customization to generate an API model and server.
contact:
email: andy.boothe@gmail.com
version: 0.0.0
servers:
- url: http://localhost:8080/v1
tags:
- name: example
description: Example endpoint
paths:
/greet:
post:
tags:
- example
summary: Greet the user
description: Generate a greeting for the given name
operationId: greet
# We can set determine whether each method is synchronous or asynchronous using this flag.
# This particular option is an extension, so you won't find documentation for it anywhere.
# Implementing it is the point of this exercise.
x-async-enabled: false
requestBody:
description: The name to greet
content:
application/json:
schema:
$ref: '#/components/schemas/Name'
responses:
200:
description: The greeting was generated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Greeting'
components:
schemas:
Name:
type: object
properties:
name:
type: string
Greeting:
type: object
properties:
greeting:
type: string