-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
590 lines (555 loc) · 16.5 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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
openapi: 3.1.0
info:
title: ESV.org API
summary: A convenient way to fetch content from ESV.org.
description: >-
The ESV API provides access to the ESV text, with a customizable presentation in
multiple formats.
version: 1.0.0
contact:
name: API Support
email: [email protected]
externalDocs:
url: https://api.esv.org/
description: ESV API Website
servers:
- url: "https://api.esv.org/v3/"
description: Production server
security:
- apiKey: []
tags:
- name: Passages
paths:
/passage/html/:
get:
summary: Get Bible passage HTML
description: Returns Bible passage text with HTML formatting
externalDocs:
url: https://api.esv.org/docs/passage-html/
description: Esv.org API Docs for `/v3/passages/html`
operationId: getPassageHtml
tags: [Passages]
x-speakeasy-name-override: getHtml
parameters:
- $ref: "#/components/parameters/PassageSearchQuery"
- $ref: "#/components/parameters/IncludePassageReferences"
- $ref: "#/components/parameters/IncludeVerseNumbers"
- $ref: "#/components/parameters/IncludeFirstVerseNumbers"
- $ref: "#/components/parameters/IncludeFootnotes"
- $ref: "#/components/parameters/IncludeFootnoteBody"
- $ref: "#/components/parameters/IncludeHeadings"
- $ref: "#/components/parameters/IncludeShortCopyright"
- $ref: "#/components/parameters/IncludeCopyright"
- $ref: "#/components/parameters/IncludePassageHorizontalLines"
- $ref: "#/components/parameters/IncludeHeadingHorizontalLines"
- $ref: "#/components/parameters/HorizontalLineLength"
- $ref: "#/components/parameters/IncludeSelahs"
- name: include-css-link
in: query
description: Include a link to the ESV API CSS file
schema:
type: boolean
default: true
- name: inline-styles
in: query
description: Include inline styles on HTML elements
schema:
type: boolean
default: false
- name: wrapping-div
in: query
description: Wrap the HTML output in a div with class="esv"
schema:
type: boolean
default: true
- name: div-classes
in: query
description: Classes to add to the wrapping div
schema:
type: string
default: "esv"
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/PassageResponse"
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/passage/search/:
get:
summary: Search Bible passages
description: Returns search results for Bible passages based on the provided query
externalDocs:
url: https://api.esv.org/docs/passage-search/
description: Esv.org API Docs for `/v3/passage/search`
operationId: searchPassages
tags: [Passages]
x-speakeasy-name-override: search
x-speakeasy-pagination:
type: offsetLimit
inputs:
- name: page
in: parameters
type: page
outputs:
numPages: $.total_pages
parameters:
- name: q
x-speakeasy-name-override: query
in: query
required: true
description: The text to search for
schema:
type: string
- name: page-size
in: query
description: Number of results to return per page
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- name: page
in: query
description: Page number to return
schema:
type: integer
minimum: 1
default: 1
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: object
properties:
page:
type: integer
description: Current page number
total_pages:
type: integer
description: Total number of pages
total_results:
type: integer
description: Total number of results
results:
type: array
items:
type: object
properties:
reference:
type: string
description: The passage reference
content:
type: string
description: The matching passage content
verses:
type: array
items:
type: object
properties:
verse:
type: string
description: Verse reference
text:
type: string
description: Verse text
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/passage/audio/:
get:
summary: Get Bible passage audio
description: Returns audio file for Bible passages based on the provided query
externalDocs:
url: https://api.esv.org/docs/passage-audio/
description: Esv.org API Docs for `/v3/passage/audio`
operationId: getPassageAudio
tags: [Passages]
x-speakeasy-name-override: getAudio
parameters:
- $ref: "#/components/parameters/PassageSearchQuery"
responses:
"200":
description: Successful response
content:
audio/mpeg:
schema:
type: string
format: binary
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/passage/text/:
get:
summary: Get Bible passage text
description: Returns Bible passage text based on the provided query parameters
externalDocs:
url: https://api.esv.org/docs/passage-text/
description: Esv.org API Docs for `/v3/passages/text`
operationId: getPassageText
tags: [Passages]
x-speakeasy-name-override: getText
parameters:
- $ref: "#/components/parameters/PassageSearchQuery"
- $ref: "#/components/parameters/IncludePassageReferences"
- $ref: "#/components/parameters/IncludeVerseNumbers"
- $ref: "#/components/parameters/IncludeFirstVerseNumbers"
- $ref: "#/components/parameters/IncludeFootnotes"
- $ref: "#/components/parameters/IncludeFootnoteBody"
- $ref: "#/components/parameters/IncludeHeadings"
- $ref: "#/components/parameters/IncludeShortCopyright"
- $ref: "#/components/parameters/IncludeCopyright"
- $ref: "#/components/parameters/IncludePassageHorizontalLines"
- $ref: "#/components/parameters/IncludeHeadingHorizontalLines"
- $ref: "#/components/parameters/HorizontalLineLength"
- $ref: "#/components/parameters/IncludeSelahs"
- name: indent-using
in: query
description: Character to use for indentation
schema:
type: string
default: space
enum: [space, tab]
- name: indent-paragraphs
in: query
description: Number of indentation characters for paragraphs
schema:
type: integer
default: 2
- name: indent-poetry
in: query
description: Number of indentation characters for poetry
schema:
type: integer
default: 2
- name: indent-poetry-lines
in: query
description: Number of indentation characters for poetry lines
schema:
type: integer
default: 4
- name: indent-declares
in: query
description: Number of indentation characters for declares
schema:
type: integer
default: 40
- name: indent-psalm-doxology
in: query
description: Number of indentation characters for Psalm doxology
schema:
type: integer
default: 30
- name: line-length
in: query
description: Maximum line length
schema:
type: integer
default: 0
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/PassageResponse"
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
securitySchemes:
apiKey:
type: apiKey
name: Authorization
description: >-
The application key used to make a request. Do _not_ include the `Token` prefix.
For more information on application keys and API authorization, visit the [ESV.org
API docs].
![ESV.org API docs]: https://api.esv.org/docs/
in: header
parameters:
IncludePassageReferences:
name: include-passage-references
in: query
description: Include passage references before passages
schema:
type: boolean
default: true
example: true
IncludeVerseNumbers:
name: include-verse-numbers
in: query
description: Include verse numbers
schema:
type: boolean
default: true
example: true
IncludeFirstVerseNumbers:
name: include-first-verse-numbers
in: query
description: Include the verse number for the first verse of a chapter
schema:
type: boolean
default: true
example: true
IncludeFootnotes:
name: include-footnotes
in: query
description: Include callouts to footnotes in the text.
schema:
type: boolean
default: true
example: true
IncludeFootnoteBody:
name: include-footnote-body
in: query
description: Include footnote body content
schema:
type: boolean
default: true
example: true
IncludeHeadings:
name: include-headings
in: query
description: Include passage headings
schema:
type: boolean
default: true
example: true
IncludeShortCopyright:
name: include-short-copyright
in: query
description: Include a short copyright notice
schema:
type: boolean
default: false
example: false
IncludeCopyright:
name: include-copyright
in: query
description: Include the full copyright notice
schema:
type: boolean
default: false
example: false
IncludePassageHorizontalLines:
name: include-passage-horizontal-lines
in: query
description: Include horizontal lines between passages
schema:
type: boolean
default: false
example: false
IncludeHeadingHorizontalLines:
name: include-heading-horizontal-lines
in: query
description: Include horizontal lines under headings
schema:
type: boolean
default: false
example: false
HorizontalLineLength:
name: horizontal-line-length
in: query
description: Length of horizontal lines
schema:
type: integer
default: 55
example: 55
IncludeSelahs:
name: include-selahs
in: query
description: Include "Selah" in passage text
schema:
type: boolean
default: true
example: true
PassageSearchQuery:
name: q
in: query
x-speakeasy-name-override: query
required: true
description: Bible passage reference (e.g., "John 3:16" or "43011016")
schema:
type: string
examples:
StandardReference:
$ref: "#/components/examples/StandardReference"
CompactNotation:
$ref: "#/components/examples/CompactNotation"
ChapterRange:
$ref: "#/components/examples/ChapterRange"
NumericalEncoding:
$ref: "#/components/examples/NumericalEncoding"
DigitalRange:
$ref: "#/components/examples/DigitalRange"
MultiReference:
$ref: "#/components/examples/MultiReference"
StructuredDigital:
$ref: "#/components/examples/StructuredDigital"
schemas:
PassageResponse:
type: object
properties:
query:
type: string
description: The passage reference that was requested
canonical:
type: string
description: The canonical version of the passage reference
parsed:
type: array
items:
type: array
items:
type: integer
description: Array of parsed passage references
passage_meta:
type: array
items:
$ref: "#/components/schemas/PassageMeta"
passages:
type: array
items:
type: string
description: Array of formatted passage text
PassageMeta:
type: object
properties:
canonical:
type: string
chapter_start:
type: array
items:
type: integer
chapter_end:
type: array
items:
type: integer
prev_verse:
type: integer
next_verse:
type: integer
prev_chapter:
type: array
items:
type: integer
next_chapter:
type: array
items:
type: integer
User:
type: object
required:
- id
- email
- username
properties:
id:
type: string
format: uuid
email:
type: string
format: email
username:
type: string
minLength: 3
firstName:
type: string
lastName:
type: string
createdAt:
type: string
format: date-time
UserInput:
type: object
required:
- email
- username
properties:
email:
type: string
format: email
username:
type: string
minLength: 3
firstName:
type: string
lastName:
type: string
Error:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties: true
examples:
StandardReference:
summary: "Standard Bible Verse Notation"
value: "John 1:1"
CompactNotation:
summary: "Compact Digital-Friendly Notation"
value: "jn11.35"
ChapterRange:
summary: "Chapter Range Notation"
value: "Genesis 1-3"
NumericalEncoding:
summary: "Numerical Encoding of a Verse"
value: "43011035"
DigitalRange:
summary: "Structured Digital Range Notation"
value: "01001001-01011032"
MultiReference:
summary: "Multiple Verses Notation"
value: "John1.1;Genesis1.1"
StructuredDigital:
summary: "Structured Digital Notation for Multiple Ranges"
value: "19001001-19001006,19003001-19003008"