-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi-definition.yaml
96 lines (96 loc) · 2.93 KB
/
openapi-definition.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
openapi: 3.0.0
info:
description: X-Road-Kafka Adapter API
version: "1.0.0"
title: X-Road-Kafka Adapter API
contact:
name: Nordic Institute for Interoperability Solutions (NIIS)
url: https://github.com/nordic-institute/xrd-kafka-xrdkafkaadapter
email: info@niis.org
license:
name: MIT
url: https://opensource.org/licenses/MIT
servers:
- url: /api/v1/<KAFKA_TOPIC_NAME>
description: basepath for API v1
- url: http://xrd-kafka-adapter:8080/api/v1/<KAFKA_TOPIC_NAME>
description: Docker Compose API TEST URL for example requests
paths:
/subscriptions:
post:
summary: subscribe to a topic
operationId: subscribe
parameters:
- in: query
name: offsetResetPolicy
description: Offset reset policy defines the initial position where consumption of the messages starts
when subscribing to a topic. The default value is "smallest" if the parameter is missing.
required: false
schema:
type: string
enum: [earliest, latest]
responses:
'204':
description: request was successfull
'400':
description: request was invalid
'403':
description: request has been refused
'404':
description: resource requested does not exists
'406':
description: request specified an invalid format
'500':
description: internal server error
delete:
summary: unsubscribe from a topic
operationId: unsubscribe
responses:
'204':
description: request was successfull
'400':
description: request was invalid
'403':
description: request has been refused
'404':
description: resource requested does not exists
'406':
description: request specified an invalid format
'500':
description: internal server error
/records:
get:
summary: fetch data from a topic
operationId: fetch
responses:
'200':
description: request was successfull
'400':
description: request was invalid
'403':
description: request has been refused
'404':
description: resource requested does not exists
'406':
description: request specified an invalid format
'500':
description: internal server error
post:
summary: publish data to a topic
operationId: publish
responses:
'204':
description: request was successfull
'400':
description: request was invalid
'403':
description: request has been refused
'404':
description: resource requested does not exists
'406':
description: request specified an invalid format
'415':
description: unsupported media type
'500':
description: internal server error