-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
66 lines (64 loc) · 1.49 KB
/
openapi.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
openapi: 3.0.3
info:
title: Bright Sample Api
description: Bright Sample Api
version: 1.0.0
servers:
- description: Localhost
url: http://localhost:8080
paths:
/blogs-v2:
get:
operationId: blog-posts-get
description: Get list of blog posts
parameters:
- $ref: '#/components/parameters/Page'
responses:
200:
description: List of blog posts
content:
application/json:
schema:
$ref: '#/components/schemas/BlogPage'
post:
operationId: blog-posts-create
description: Create a blog post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BlogPost'
example:
id: 123
content: Super content
publishedAt: 2022-03-04
responses:
200:
description: A location of blog post
headers:
Location:
description: Location of blog post
components:
schemas:
BlogPost:
type: object
properties:
id:
type: string
content:
type: string
publishedAt:
type: string
format: date
BlogPage:
description: A list of blog posts
type: array
items:
$ref: '#/components/schemas/BlogPost'
parameters:
Page:
description: Pagination parameters
name: page
in: query
schema:
type: integer