-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.yaml
136 lines (123 loc) · 3.03 KB
/
swagger.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
swagger: "2.0"
info:
description: "DFS Talk Api"
version: "1.0.0"
title: "DFSTalk API"
contact:
email: "[email protected]"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "dfstalk.vessels.tech"
# host: "us-central1-dfs-talk.cloudfunctions.net"
# basePath: "/v1"
tags:
- name: "number"
description: "Number generators"
schemes:
- "https"
- "http"
paths:
/number/:
post:
tags:
- "number"
summary: "Generate an audio file for a given number"
description: ""
operationId: "CreateNumber"
consumes:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Specify the number and language to generate an audio file"
required: true
schema:
$ref: "#/definitions/NumberRequest"
responses:
200:
description: "successful generation"
schema:
$ref: "#/definitions/NumberResponse"
400:
description: "bad request"
404:
description: "Unsupported Language"
/number/languages:
get:
tags:
- "number"
summary: "Gets the available language codes for the number audio generator"
description: ""
operationId: "GetNumberLanguages"
produces:
- "application/json"
responses:
200:
description: "list of available language codes"
schema:
$ref: "#/definitions/GetNumberLanguagesResponse"
400:
description: "bad request"
404:
description: "Unsupported Language"
securityDefinitions:
basicAuth:
type: basic
security:
- basicAuth: []
definitions:
NumberRequest:
type: "object"
properties:
language:
type: "string"
description: "The language code of the audio to be generated"
enum:
- "en_AU_male"
- "sw"
number:
type: "number"
description: "The number to generate the audio for"
format:
type: "string"
description: "Format to return audio in"
enum:
- "mp3"
- "asterisk_sln"
NumberResponse:
type: "object"
properties:
expiry:
type: "integer"
format: "int64"
description: "the expiry time on the generated url (seconds)"
url:
type: "string"
format: "url"
description: "A url referring to the generated audio file"
GetNumberLanguagesResponse:
type: "array"
items:
type: "string"
Tag:
type: "object"
properties:
id:
type: "integer"
format: "int64"
name:
type: "string"
ApiResponse:
type: "object"
properties:
code:
type: "integer"
format: "int32"
type:
type: "string"
message:
type: "string"
externalDocs:
description: "Find out more about this service"
url: "https://github.com/vessels-tech/dfstalk"