-
Notifications
You must be signed in to change notification settings - Fork 9.1k
/
Copy pathlatest.html
4473 lines (4426 loc) · 388 KB
/
latest.html
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
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang="en"><head>
<meta charset="UTF-8">
<meta name="generator" content="ReSpec 35.1.2">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
dfn{cursor:pointer}
.dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font-family:"Helvetica Neue",sans-serif;font-size:small;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px}
.dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}
.dfn-panel:not(.docked)>.caret::after,.dfn-panel:not(.docked)>.caret::before{content:"";position:absolute;border:10px solid transparent;border-top:0;border-bottom:10px solid #fff;border-bottom-color:var(--indextable-hover-bg,#fff);top:0}
.dfn-panel:not(.docked)>.caret::before{border-bottom:9px solid #a2a9b1;border-bottom-color:var(--indextable-hover-bg,#a2a9b1)}
.dfn-panel *{margin:0}
.dfn-panel b{display:block;color:#000;color:var(--text,#000);margin-top:.25em}
.dfn-panel ul a[href]{color:#333;color:var(--text,#333)}
.dfn-panel>div{display:flex}
.dfn-panel a.self-link{font-weight:700;margin-right:auto}
.dfn-panel .marker{padding:.1em;margin-left:.5em;border-radius:.2em;text-align:center;white-space:nowrap;font-size:90%;color:#040b1c}
.dfn-panel .marker.dfn-exported{background:#d1edfd;box-shadow:0 0 0 .125em #1ca5f940}
.dfn-panel .marker.idl-block{background:#8ccbf2;box-shadow:0 0 0 .125em #0670b161}
.dfn-panel a:not(:hover){text-decoration:none!important;border-bottom:none!important}
.dfn-panel a[href]:hover{border-bottom-width:1px}
.dfn-panel ul{padding:0}
.dfn-panel li{margin-left:1em}
.dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}
</style>
<title>OpenAPI Specification v3.1.0</title>
<meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs.">
<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c"></script>
<style id="respec-mainstyle">
@keyframes pop{
0%{transform:scale(1,1)}
25%{transform:scale(1.25,1.25);opacity:.75}
100%{transform:scale(1,1)}
}
a.internalDFN{color:inherit;border-bottom:1px solid #99c;text-decoration:none}
a.externalDFN{color:inherit;border-bottom:1px dotted #ccc;text-decoration:none}
a.bibref{text-decoration:none}
.respec-offending-element:target{animation:pop .25s ease-in-out 0s 1}
.respec-offending-element,a[href].respec-offending-element{text-decoration:red wavy underline}
@supports not (text-decoration:red wavy underline){
.respec-offending-element:not(pre){display:inline-block}
.respec-offending-element{background:url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=) bottom repeat-x}
}
#references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1}
cite .bibref{font-style:normal}
a[href].orcid{padding-left:4px;padding-right:4px}
a[href].orcid>svg{margin-bottom:-2px}
ol.tof,ul.tof{list-style:none outside none}
.caption{margin-top:.5em;font-style:italic}
#issue-summary>ul{column-count:2}
#issue-summary li{list-style:none;display:inline-block}
details.respec-tests-details{margin-left:1em;display:inline-block;vertical-align:top}
details.respec-tests-details>*{padding-right:2em}
details.respec-tests-details[open]{z-index:999999;position:absolute;border:thin solid #cad3e2;border-radius:.3em;background-color:#fff;padding-bottom:.5em}
details.respec-tests-details[open]>summary{border-bottom:thin solid #cad3e2;padding-left:1em;margin-bottom:1em;line-height:2em}
details.respec-tests-details>ul{width:100%;margin-top:-.3em}
details.respec-tests-details>li{padding-left:1em}
.self-link:hover{opacity:1;text-decoration:none;background-color:transparent}
aside.example .marker>a.self-link{color:inherit}
.header-wrapper{display:flex;align-items:baseline}
:is(h2,h3,h4,h5,h6):not(#toc>h2,#abstract>h2,#sotd>h2,.head>h2){position:relative;left:-.5em}
:is(h2,h3,h4,h5,h6):not(#toch2)+a.self-link{color:inherit;order:-1;position:relative;left:-1.1em;font-size:1rem;opacity:.5}
:is(h2,h3,h4,h5,h6)+a.self-link::before{content:"§";text-decoration:none;color:var(--heading-text)}
:is(h2,h3)+a.self-link{top:-.2em}
:is(h4,h5,h6)+a.self-link::before{color:#000}
@media (max-width:767px){
dd{margin-left:0}
}
@media print{
.removeOnSave{display:none}
}
</style>
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-831873-42');
</script>
<meta name="color-scheme" content="light">
<link rel="canonical" href="https://spec.openapis.org/oas/v3.1.0.html">
<style>
var{position:relative;cursor:pointer}
var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none}
var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222}
var[data-type]::after{content:attr(data-type);transform:translateX(-50%) translateY(-100%);background:#222;text-align:center;font-family:"Dank Mono","Fira Code",monospace;font-style:normal;padding:6px;border-radius:3px;color:#daca88;text-indent:0;font-weight:400}
var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}
</style>
<script id="initialUserConfig" type="application/json">{
"specStatus": "base",
"latestVersion": "https://spec.openapis.org/oas/latest.html",
"thisVersion": "https://spec.openapis.org/oas/v3.1.0.html",
"canonicalURI": "https://spec.openapis.org/oas/v3.1.0.html",
"editors": [
{
"name": "Darrel Miller "
},
{
"name": "Jeremy Whitlock "
},
{
"name": "Marsh Gardiner "
},
{
"name": "Mike Ralphson "
},
{
"name": "Ron Ratovsky "
},
{
"name": "Uri Sarid "
}
],
"formerEditors": [
{
"name": "Jason Harmon "
},
{
"name": "Tony Tam "
}
],
"publishDate": "2021-02-15T00:00:00.000Z",
"subtitle": "Version 3.1.0",
"edDraftURI": "https://github.com/OAI/OpenAPI-Specification/",
"shortName": "OAS",
"historyURI": null,
"lint": false,
"logos": [
{
"src": "https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png",
"alt": "OpenAPI Initiative",
"height": 48,
"url": "https://openapis.org/"
}
],
"otherLinks": [
{
"key": "Participate",
"data": [
{
"value": "GitHub OAI/OpenAPI-Specification",
"href": "https://github.com/OAI/OpenAPI-Specification/"
},
{
"value": "File a bug",
"href": "https://github.com/OAI/OpenAPI-Specification/issues"
},
{
"value": "Commit history",
"href": "https://github.com/OAI/OpenAPI-Specification/commits/main/versions/3.1.0.md"
},
{
"value": "Pull requests",
"href": "https://github.com/OAI/OpenAPI-Specification/pulls"
}
]
}
],
"publishISODate": "2021-02-15T00:00:00.000Z",
"generatedSubtitle": "15 February 2021"
}</script>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"></head><body class="h-entry toc-inline"><div class="head">
<p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png">
</a></p>
<h1 id="title" class="title">OpenAPI Specification v3.1.0 </h1> <h2 id="subtitle" class="subtitle">Version 3.1.0</h2>
<p id="w3c-state"> <time class="dt-published" datetime="2021-02-15">15 February 2021</time></p>
<details open="">
<summary>More details about this document</summary>
<dl>
<dt>This version:</dt><dd>
<a class="u-url" href="https://spec.openapis.org/oas/v3.1.0.html">https://spec.openapis.org/oas/v3.1.0.html</a>
</dd>
<dt>Latest published version:</dt><dd>
<a href="https://spec.openapis.org/oas/latest.html">https://spec.openapis.org/oas/latest.html</a>
</dd>
<dt>Latest editor's draft:</dt><dd><a href="https://github.com/OAI/OpenAPI-Specification/">https://github.com/OAI/OpenAPI-Specification/</a></dd>
<dt>Editors:</dt><dd class="editor p-author h-card vcard">
<span class="p-name fn">Darrel Miller </span>
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Jeremy Whitlock </span>
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Marsh Gardiner </span>
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Mike Ralphson </span>
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Ron Ratovsky </span>
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Uri Sarid </span>
</dd>
<dt>
Former editors:
</dt><dd class="editor p-author h-card vcard">
<span class="p-name fn">Jason Harmon </span>
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Tony Tam </span>
</dd>
<dt>Participate</dt><dd>
<a href="https://github.com/OAI/OpenAPI-Specification/">GitHub OAI/OpenAPI-Specification</a>
</dd><dd>
<a href="https://github.com/OAI/OpenAPI-Specification/issues">File a bug</a>
</dd><dd>
<a href="https://github.com/OAI/OpenAPI-Specification/commits/main/versions/3.1.0.md">Commit history</a>
</dd><dd>
<a href="https://github.com/OAI/OpenAPI-Specification/pulls">Pull requests</a>
</dd>
</dl>
</details>
<p class="copyright">Copyright © 2021 the Linux Foundation</p>
<hr title="Separator for header">
</div><style>
#respec-ui { visibility: hidden; }#title { color: #578000; } #subtitle { color: #578000; }.dt-published { color: #578000; } .dt-published::before { content: "Published "; }h1,h2,h3,h4,h5,h6 { color: #578000; font-weight: normal; font-style: normal; }a[href] { color: #45512c; }body:not(.toc-inline) #toc h2 { color: #45512c; }table { display: block; width: 100%; overflow: auto; }table th { font-weight: 600; }table th, table td { padding: 6px 13px; border: 1px solid #dfe2e5; }table tr { background-color: #fff; border-top: 1px solid #c6cbd1; }table tr:nth-child(2n) { background-color: #f6f8fa; }pre { background-color: #f6f8fa !important; }code { color: #c83500 } th code { color: inherit }a.bibref { text-decoration: underline;}/** * GitHub Gist Theme * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro */ .hljs { display: block; background: white; padding: 0.5em; color: #333333; overflow-x: auto; } .hljs-comment, .hljs-meta { color: #727070; } .hljs-string, .hljs-variable, .hljs-template-variable, .hljs-strong, .hljs-emphasis, .hljs-quote { color: #c74700; } .hljs-number { color: #005e5e; } .hljs-keyword, .hljs-selector-tag, .hljs-type { color: #a71d5d; } .hljs-literal, .hljs-symbol, .hljs-bullet, .hljs-attribute { color: #007aa2; } .hljs-section, .hljs-name { color: #4b7c46; } .hljs-tag { color: #333333; } .hljs-title, .hljs-attr, .hljs-selector-id, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo { color: #795da3; } .hljs-addition { color: #55a532; background-color: #eaffea; } .hljs-deletion { color: #bd2c00; background-color: #ffecec; } .hljs-link { text-decoration: underline; }
</style><section class="notoc introductory" id="abstract"><h2>What is the OpenAPI Specification?</h2>The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.</section><section class="override introductory notoc" id="sotd" data-max-toc="0"><h2>Status of This Document</h2>The source-of-truth for this specification is the HTML file referenced above as <em>This version</em>.</section><nav id="toc"><h2 class="introductory" id="table-of-contents">Table of Contents</h2><ol class="toc"><li class="tocline"><a class="tocxref" href="#openapi-specification"><bdi class="secno">1. </bdi>OpenAPI Specification</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#conformance"><bdi class="secno">1.1 </bdi>Version 3.1.0</a></li></ol></li><li class="tocline"><a class="tocxref" href="#introduction"><bdi class="secno">2. </bdi>Introduction</a></li><li class="tocline"><a class="tocxref" href="#definitions"><bdi class="secno">3. </bdi><span>Definitions</span></a><ol class="toc"><li class="tocline"><a class="tocxref" href="#openapi-document"><bdi class="secno">3.1 </bdi><span>OpenAPI Document</span></a></li><li class="tocline"><a class="tocxref" href="#path-templating"><bdi class="secno">3.2 </bdi><span>Path Templating</span></a></li><li class="tocline"><a class="tocxref" href="#media-types"><bdi class="secno">3.3 </bdi><span>Media Types</span></a></li><li class="tocline"><a class="tocxref" href="#http-status-codes"><bdi class="secno">3.4 </bdi><span>HTTP Status Codes</span></a></li></ol></li><li class="tocline"><a class="tocxref" href="#specification"><bdi class="secno">4. </bdi>Specification</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#versions"><bdi class="secno">4.1 </bdi>Versions</a></li><li class="tocline"><a class="tocxref" href="#format"><bdi class="secno">4.2 </bdi>Format</a></li><li class="tocline"><a class="tocxref" href="#document-structure"><bdi class="secno">4.3 </bdi>Document Structure</a></li><li class="tocline"><a class="tocxref" href="#data-types"><bdi class="secno">4.4 </bdi>Data Types</a></li><li class="tocline"><a class="tocxref" href="#rich-text-formatting"><bdi class="secno">4.5 </bdi>Rich Text Formatting</a></li><li class="tocline"><a class="tocxref" href="#relative-references-in-uris"><bdi class="secno">4.6 </bdi>Relative References in URIs</a></li><li class="tocline"><a class="tocxref" href="#relative-references-in-urls"><bdi class="secno">4.7 </bdi>Relative References in URLs</a></li><li class="tocline"><a class="tocxref" href="#schema"><bdi class="secno">4.8 </bdi>Schema</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#openapi-object"><bdi class="secno">4.8.1 </bdi>OpenAPI Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields"><bdi class="secno">4.8.1.1 </bdi>Fixed Fields</a></li></ol></li><li class="tocline"><a class="tocxref" href="#info-object"><bdi class="secno">4.8.2 </bdi>Info Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-0"><bdi class="secno">4.8.2.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#info-object-example"><bdi class="secno">4.8.2.2 </bdi>Info Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#contact-object"><bdi class="secno">4.8.3 </bdi>Contact Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-1"><bdi class="secno">4.8.3.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#contact-object-example"><bdi class="secno">4.8.3.2 </bdi>Contact Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#license-object"><bdi class="secno">4.8.4 </bdi>License Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-2"><bdi class="secno">4.8.4.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#license-object-example"><bdi class="secno">4.8.4.2 </bdi>License Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#server-object"><bdi class="secno">4.8.5 </bdi>Server Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-3"><bdi class="secno">4.8.5.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#server-object-example"><bdi class="secno">4.8.5.2 </bdi>Server Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#server-variable-object"><bdi class="secno">4.8.6 </bdi>Server Variable Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-4"><bdi class="secno">4.8.6.1 </bdi>Fixed Fields</a></li></ol></li><li class="tocline"><a class="tocxref" href="#components-object"><bdi class="secno">4.8.7 </bdi>Components Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-5"><bdi class="secno">4.8.7.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#components-object-example"><bdi class="secno">4.8.7.2 </bdi>Components Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#paths-object"><bdi class="secno">4.8.8 </bdi>Paths Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#patterned-fields"><bdi class="secno">4.8.8.1 </bdi>Patterned Fields</a></li><li class="tocline"><a class="tocxref" href="#path-templating-matching"><bdi class="secno">4.8.8.2 </bdi>Path Templating Matching</a></li><li class="tocline"><a class="tocxref" href="#paths-object-example"><bdi class="secno">4.8.8.3 </bdi>Paths Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#path-item-object"><bdi class="secno">4.8.9 </bdi>Path Item Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-6"><bdi class="secno">4.8.9.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#path-item-object-example"><bdi class="secno">4.8.9.2 </bdi>Path Item Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#operation-object"><bdi class="secno">4.8.10 </bdi>Operation Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-7"><bdi class="secno">4.8.10.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#operation-object-example"><bdi class="secno">4.8.10.2 </bdi>Operation Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#external-documentation-object"><bdi class="secno">4.8.11 </bdi>External Documentation Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-8"><bdi class="secno">4.8.11.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#external-documentation-object-example"><bdi class="secno">4.8.11.2 </bdi>External Documentation Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#parameter-object"><bdi class="secno">4.8.12 </bdi>Parameter Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#parameter-locations"><bdi class="secno">4.8.12.1 </bdi>Parameter Locations</a></li><li class="tocline"><a class="tocxref" href="#fixed-fields-9"><bdi class="secno">4.8.12.2 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#style-values"><bdi class="secno">4.8.12.3 </bdi>Style Values</a></li><li class="tocline"><a class="tocxref" href="#style-examples"><bdi class="secno">4.8.12.4 </bdi>Style Examples</a></li><li class="tocline"><a class="tocxref" href="#parameter-object-examples"><bdi class="secno">4.8.12.5 </bdi>Parameter Object Examples</a></li></ol></li><li class="tocline"><a class="tocxref" href="#request-body-object"><bdi class="secno">4.8.13 </bdi>Request Body Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-10"><bdi class="secno">4.8.13.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#request-body-examples"><bdi class="secno">4.8.13.2 </bdi>Request Body Examples</a></li></ol></li><li class="tocline"><a class="tocxref" href="#media-type-object"><bdi class="secno">4.8.14 </bdi>Media Type Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-11"><bdi class="secno">4.8.14.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#media-type-examples"><bdi class="secno">4.8.14.2 </bdi>Media Type Examples</a></li><li class="tocline"><a class="tocxref" href="#considerations-for-file-uploads"><bdi class="secno">4.8.14.3 </bdi>Considerations for File Uploads</a></li><li class="tocline"><a class="tocxref" href="#support-for-x-www-form-urlencoded-request-bodies"><bdi class="secno">4.8.14.4 </bdi>Support for x-www-form-urlencoded Request Bodies</a></li><li class="tocline"><a class="tocxref" href="#special-considerations-for-multipart-content"><bdi class="secno">4.8.14.5 </bdi>Special Considerations for <code>multipart</code> Content</a></li></ol></li><li class="tocline"><a class="tocxref" href="#encoding-object"><bdi class="secno">4.8.15 </bdi>Encoding Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-12"><bdi class="secno">4.8.15.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#encoding-object-example"><bdi class="secno">4.8.15.2 </bdi>Encoding Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#responses-object"><bdi class="secno">4.8.16 </bdi>Responses Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-13"><bdi class="secno">4.8.16.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#patterned-fields-0"><bdi class="secno">4.8.16.2 </bdi>Patterned Fields</a></li><li class="tocline"><a class="tocxref" href="#responses-object-example"><bdi class="secno">4.8.16.3 </bdi>Responses Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#response-object"><bdi class="secno">4.8.17 </bdi>Response Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-14"><bdi class="secno">4.8.17.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#response-object-examples"><bdi class="secno">4.8.17.2 </bdi>Response Object Examples</a></li></ol></li><li class="tocline"><a class="tocxref" href="#callback-object"><bdi class="secno">4.8.18 </bdi>Callback Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#patterned-fields-1"><bdi class="secno">4.8.18.1 </bdi>Patterned Fields</a></li><li class="tocline"><a class="tocxref" href="#key-expression"><bdi class="secno">4.8.18.2 </bdi>Key Expression</a></li><li class="tocline"><a class="tocxref" href="#callback-object-examples"><bdi class="secno">4.8.18.3 </bdi>Callback Object Examples</a></li></ol></li><li class="tocline"><a class="tocxref" href="#example-object"><bdi class="secno">4.8.19 </bdi>Example Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-15"><bdi class="secno">4.8.19.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#example-object-examples"><bdi class="secno">4.8.19.2 </bdi>Example Object Examples</a></li></ol></li><li class="tocline"><a class="tocxref" href="#link-object"><bdi class="secno">4.8.20 </bdi>Link Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-16"><bdi class="secno">4.8.20.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#examples"><bdi class="secno">4.8.20.2 </bdi>Examples</a></li><li class="tocline"><a class="tocxref" href="#operationref-examples"><bdi class="secno">4.8.20.3 </bdi>OperationRef Examples</a></li><li class="tocline"><a class="tocxref" href="#runtime-expressions"><bdi class="secno">4.8.20.4 </bdi>Runtime Expressions</a></li><li class="tocline"><a class="tocxref" href="#examples-0"><bdi class="secno">4.8.20.5 </bdi>Examples</a></li></ol></li><li class="tocline"><a class="tocxref" href="#header-object"><bdi class="secno">4.8.21 </bdi>Header Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#header-object-example"><bdi class="secno">4.8.21.1 </bdi>Header Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#tag-object"><bdi class="secno">4.8.22 </bdi>Tag Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-17"><bdi class="secno">4.8.22.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#tag-object-example"><bdi class="secno">4.8.22.2 </bdi>Tag Object Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#reference-object"><bdi class="secno">4.8.23 </bdi>Reference Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-18"><bdi class="secno">4.8.23.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#reference-object-example"><bdi class="secno">4.8.23.2 </bdi>Reference Object Example</a></li><li class="tocline"><a class="tocxref" href="#relative-schema-document-example"><bdi class="secno">4.8.23.3 </bdi>Relative Schema Document Example</a></li><li class="tocline"><a class="tocxref" href="#relative-documents-with-embedded-schema-example"><bdi class="secno">4.8.23.4 </bdi>Relative Documents With Embedded Schema Example</a></li></ol></li><li class="tocline"><a class="tocxref" href="#schema-object"><bdi class="secno">4.8.24 </bdi>Schema Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#properties"><bdi class="secno">4.8.24.1 </bdi>Properties</a></li><li class="tocline"><a class="tocxref" href="#fixed-fields-19"><bdi class="secno">4.8.24.2 </bdi>Fixed Fields</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#composition-and-inheritance-polymorphism"><bdi class="secno">4.8.24.2.1 </bdi>Composition and Inheritance (Polymorphism)</a></li><li class="tocline"><a class="tocxref" href="#xml-modeling"><bdi class="secno">4.8.24.2.2 </bdi>XML Modeling</a></li><li class="tocline"><a class="tocxref" href="#specifying-schema-dialects"><bdi class="secno">4.8.24.2.3 </bdi>Specifying Schema Dialects</a></li></ol></li><li class="tocline"><a class="tocxref" href="#schema-object-examples"><bdi class="secno">4.8.24.3 </bdi>Schema Object Examples</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#primitive-sample"><bdi class="secno">4.8.24.3.1 </bdi>Primitive Sample</a></li><li class="tocline"><a class="tocxref" href="#simple-model"><bdi class="secno">4.8.24.3.2 </bdi>Simple Model</a></li><li class="tocline"><a class="tocxref" href="#model-with-map-dictionary-properties"><bdi class="secno">4.8.24.3.3 </bdi>Model with Map/Dictionary Properties</a></li><li class="tocline"><a class="tocxref" href="#model-with-example"><bdi class="secno">4.8.24.3.4 </bdi>Model with Example</a></li><li class="tocline"><a class="tocxref" href="#models-with-composition"><bdi class="secno">4.8.24.3.5 </bdi>Models with Composition</a></li><li class="tocline"><a class="tocxref" href="#models-with-polymorphism-support"><bdi class="secno">4.8.24.3.6 </bdi>Models with Polymorphism Support</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#discriminator-object"><bdi class="secno">4.8.25 </bdi>Discriminator Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-20"><bdi class="secno">4.8.25.1 </bdi>Fixed Fields</a></li></ol></li><li class="tocline"><a class="tocxref" href="#xml-object"><bdi class="secno">4.8.26 </bdi>XML Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-21"><bdi class="secno">4.8.26.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#xml-object-examples"><bdi class="secno">4.8.26.2 </bdi>XML Object Examples</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#no-xml-element"><bdi class="secno">4.8.26.2.1 </bdi>No XML Element</a></li><li class="tocline"><a class="tocxref" href="#xml-name-replacement"><bdi class="secno">4.8.26.2.2 </bdi>XML Name Replacement</a></li><li class="tocline"><a class="tocxref" href="#xml-attribute-prefix-and-namespace"><bdi class="secno">4.8.26.2.3 </bdi>XML Attribute, Prefix and Namespace</a></li><li class="tocline"><a class="tocxref" href="#xml-arrays"><bdi class="secno">4.8.26.2.4 </bdi>XML Arrays</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#security-scheme-object"><bdi class="secno">4.8.27 </bdi>Security Scheme Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-22"><bdi class="secno">4.8.27.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#security-scheme-object-example"><bdi class="secno">4.8.27.2 </bdi>Security Scheme Object Example</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#basic-authentication-sample"><bdi class="secno">4.8.27.2.1 </bdi>Basic Authentication Sample</a></li><li class="tocline"><a class="tocxref" href="#api-key-sample"><bdi class="secno">4.8.27.2.2 </bdi>API Key Sample</a></li><li class="tocline"><a class="tocxref" href="#jwt-bearer-sample"><bdi class="secno">4.8.27.2.3 </bdi>JWT Bearer Sample</a></li><li class="tocline"><a class="tocxref" href="#implicit-oauth2-sample"><bdi class="secno">4.8.27.2.4 </bdi>Implicit OAuth2 Sample</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#oauth-flows-object"><bdi class="secno">4.8.28 </bdi>OAuth Flows Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-23"><bdi class="secno">4.8.28.1 </bdi>Fixed Fields</a></li></ol></li><li class="tocline"><a class="tocxref" href="#oauth-flow-object"><bdi class="secno">4.8.29 </bdi>OAuth Flow Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#fixed-fields-24"><bdi class="secno">4.8.29.1 </bdi>Fixed Fields</a></li><li class="tocline"><a class="tocxref" href="#oauth-flow-object-examples"><bdi class="secno">4.8.29.2 </bdi>OAuth Flow Object Examples</a></li></ol></li><li class="tocline"><a class="tocxref" href="#security-requirement-object"><bdi class="secno">4.8.30 </bdi>Security Requirement Object</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#patterned-fields-2"><bdi class="secno">4.8.30.1 </bdi>Patterned Fields</a></li><li class="tocline"><a class="tocxref" href="#security-requirement-object-examples"><bdi class="secno">4.8.30.2 </bdi>Security Requirement Object Examples</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#non-oauth2-security-requirement"><bdi class="secno">4.8.30.2.1 </bdi>Non-OAuth2 Security Requirement</a></li><li class="tocline"><a class="tocxref" href="#oauth2-security-requirement"><bdi class="secno">4.8.30.2.2 </bdi>OAuth2 Security Requirement</a></li><li class="tocline"><a class="tocxref" href="#optional-oauth2-security"><bdi class="secno">4.8.30.2.3 </bdi>Optional OAuth2 Security</a></li></ol></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#specification-extensions"><bdi class="secno">4.9 </bdi>Specification Extensions</a></li><li class="tocline"><a class="tocxref" href="#security-filtering"><bdi class="secno">4.10 </bdi>Security Filtering</a></li></ol></li><li class="tocline"><a class="tocxref" href="#appendix-a-revision-history"><bdi class="secno">A. </bdi>Appendix A: Revision History</a></li><li class="tocline"><a class="tocxref" href="#references"><bdi class="secno">B. </bdi>References</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><bdi class="secno">B.1 </bdi>Normative references</a></li></ol></li></ol></nav>
<section id="openapi-specification"><div class="header-wrapper"><h2 id="x1-openapi-specification"><bdi class="secno">1. </bdi>OpenAPI Specification</h2><a class="self-link" href="#openapi-specification" aria-label="Permalink for Section 1."></a></div>
<section class="override" id="conformance"><div class="header-wrapper"><h3 id="x1-1-version-3-1-0"><bdi class="secno">1.1 </bdi>Version 3.1.0</h3><a class="self-link" href="#conformance" aria-label="Permalink for Section 1.1"></a></div>
<p>The key words “<em class="rfc2119">MUST</em>”, “<em class="rfc2119">MUST NOT</em>”, “<em class="rfc2119">REQUIRED</em>”, “<em class="rfc2119">SHALL</em>”, “<em class="rfc2119">SHALL NOT</em>”, “<em class="rfc2119">SHOULD</em>”, “<em class="rfc2119">SHOULD NOT</em>”, “<em class="rfc2119">RECOMMENDED</em>”, “<em class="rfc2119">NOT RECOMMENDED</em>”, “<em class="rfc2119">MAY</em>”, and “<em class="rfc2119">OPTIONAL</em>” in this document are to be interpreted as described in <a href="https://tools.ietf.org/html/bcp14">BCP 14</a> [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">RFC2119</a></cite>] [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc8174" title="Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words">RFC8174</a></cite>] when, and only when, they appear in all capitals, as shown here.</p>
<p>This document is licensed under <a href="https://www.apache.org/licenses/LICENSE-2.0.html">The Apache License, Version 2.0</a>.</p>
</section></section><section id="introduction"><div class="header-wrapper"><h2 id="x2-introduction"><bdi class="secno">2. </bdi>Introduction</h2><a class="self-link" href="#introduction" aria-label="Permalink for Section 2."></a></div>
<p>The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.</p>
<p>An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.</p>
</section><section id="definitions"><div class="header-wrapper"><h2 id="x3-definitions"><bdi class="secno">3. </bdi><dfn id="dfn-definitions" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">Definitions</dfn></h2><a class="self-link" href="#definitions" aria-label="Permalink for Section 3."></a></div>
<section id="openapi-document"><div class="header-wrapper"><h3 id="x3-1-openapi-document"><bdi class="secno">3.1 </bdi><dfn id="dfn-openapi-document" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">OpenAPI Document</dfn></h3><a class="self-link" href="#openapi-document" aria-label="Permalink for Section 3.1"></a></div>
<p>A self-contained or composite resource which defines or describes an API or elements of an API. The OpenAPI document <em class="rfc2119">MUST</em> contain at least one <a href="#paths-object">paths</a> field, a <a href="#oasComponents">components</a> field or a <a href="#oasWebhooks">webhooks</a> field. An OpenAPI document uses and conforms to the OpenAPI Specification.</p>
</section><section id="path-templating"><div class="header-wrapper"><h3 id="x3-2-path-templating"><bdi class="secno">3.2 </bdi><dfn id="dfn-path-templating" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">Path Templating</dfn></h3><a class="self-link" href="#path-templating" aria-label="Permalink for Section 3.2"></a></div>
<p>Path templating refers to the usage of template expressions, delimited by curly braces ({}), to mark a section of a URL path as replaceable using path parameters.</p>
<p>Each template expression in the path <em class="rfc2119">MUST</em> correspond to a path parameter that is included in the <a href="#path-item-object">Path Item</a> itself and/or in each of the Path Item’s <a href="#operation-object">Operations</a>. An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required.</p>
<p>The value for these path parameters <em class="rfc2119">MUST NOT</em> contain any unescaped “generic syntax” characters described by [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3">Section 3</a>: forward slashes (<code>/</code>), question marks (<code>?</code>), or hashes (<code>#</code>).</p>
</section><section id="media-types"><div class="header-wrapper"><h3 id="x3-3-media-types"><bdi class="secno">3.3 </bdi><dfn id="dfn-media-types" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">Media Types</dfn></h3><a class="self-link" href="#media-types" aria-label="Permalink for Section 3.3"></a></div>
<p>Media type definitions are spread across several resources.
The media type definitions <em class="rfc2119">SHOULD</em> be in compliance with [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc6838" title="Media Type Specifications and Registration Procedures">RFC6838</a></cite>].</p>
<p>Some examples of possible media type definitions:</p>
<pre class="nohighlight" tabindex="0"><code> text/plain; charset=utf-8
application/json
application/vnd.github+json
application/vnd.github.v3+json
application/vnd.github.v3.raw+json
application/vnd.github.v3.text+json
application/vnd.github.v3.html+json
application/vnd.github.v3.full+json
application/vnd.github.v3.diff
application/vnd.github.v3.patch
</code></pre>
</section><section id="http-status-codes"><div class="header-wrapper"><h3 id="x3-4-http-status-codes"><bdi class="secno">3.4 </bdi><dfn id="dfn-http-status-codes" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">HTTP Status Codes</dfn></h3><a class="self-link" href="#http-status-codes" aria-label="Permalink for Section 3.4"></a></div>
<p>The HTTP Status Codes are used to indicate the status of the executed operation.
The available status codes are defined by [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc7231" title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">RFC7231</a></cite>] <a href="https://datatracker.ietf.org/doc/html/rfc7231#section-6">Section 6</a> and registered status codes are listed in the <cite><a class="bibref" data-link-type="biblio" href="#bib-iana-http-status-codes" title="Hypertext Transfer Protocol (HTTP) Status Code Registry">IANA Status Code Registry</a></cite>.</p>
</section></section><section id="specification"><div class="header-wrapper"><h2 id="x4-specification"><bdi class="secno">4. </bdi>Specification</h2><a class="self-link" href="#specification" aria-label="Permalink for Section 4."></a></div>
<section id="versions"><div class="header-wrapper"><h3 id="x4-1-versions"><bdi class="secno">4.1 </bdi>Versions</h3><a class="self-link" href="#versions" aria-label="Permalink for Section 4.1"></a></div>
<p>The OpenAPI Specification is versioned using a <code>major</code>.<code>minor</code>.<code>patch</code> versioning scheme. The <code>major</code>.<code>minor</code> portion of the version string (for example <code>3.1</code>) <em class="rfc2119">SHALL</em> designate the OAS feature set. <em><code>.patch</code></em> versions address errors in, or provide clarifications to, this document, not the feature set. Tooling which supports OAS 3.1 <em class="rfc2119">SHOULD</em> be compatible with all OAS 3.1.* versions. The patch version <em class="rfc2119">SHOULD NOT</em> be considered by tooling, making no distinction between <code>3.1.0</code> and <code>3.1.1</code> for example.</p>
<p>Occasionally, non-backwards compatible changes may be made in <code>minor</code> versions of the OAS where impact is believed to be low relative to the benefit provided.</p>
<p>An OpenAPI document compatible with OAS 3.*.* contains a required <a href="#oasVersion"><code>openapi</code></a> field which designates the version of the OAS that it uses.</p>
</section><section id="format"><div class="header-wrapper"><h3 id="x4-2-format"><bdi class="secno">4.2 </bdi>Format</h3><a class="self-link" href="#format" aria-label="Permalink for Section 4.2"></a></div>
<p>An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in <cite><a class="bibref" data-link-type="biblio" href="#bib-rfc7159" title="The JavaScript Object Notation (JSON) Data Interchange Format">JSON</a></cite> or <cite><a class="bibref" data-link-type="biblio" href="#bib-yaml" title="YAML Ain’t Markup Language (YAML™) Version 1.2">YAML</a></cite> format.</p>
<p>For example, if a field has an array value, the JSON array representation will be used:</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"field"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span> <span class="hljs-number">1</span><span class="hljs-punctuation">,</span> <span class="hljs-number">2</span><span class="hljs-punctuation">,</span> <span class="hljs-number">3</span> <span class="hljs-punctuation">]</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<p>All field names in the specification are <strong>case sensitive</strong>.
This includes all fields that are used as keys in a map, except where explicitly noted that keys are <strong>case insensitive</strong>.</p>
<p>The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.</p>
<p>Patterned fields <em class="rfc2119">MUST</em> have unique names within the containing object.</p>
<p>In order to preserve the ability to round-trip between YAML and JSON formats, <cite><a class="bibref" data-link-type="biblio" href="#bib-yaml" title="YAML Ain’t Markup Language (YAML™) Version 1.2">YAML version 1.2</a></cite> is <em class="rfc2119">RECOMMENDED</em> along with some additional constraints:</p>
<ul>
<li>Tags <em class="rfc2119">MUST</em> be limited to those allowed by the <a href="https://yaml.org/spec/1.2/spec.html#id2803231">JSON Schema ruleset</a>.</li>
<li>Keys used in YAML maps <em class="rfc2119">MUST</em> be limited to a scalar string, as defined by the <a href="https://yaml.org/spec/1.2/spec.html#id2802346">YAML Failsafe schema ruleset</a>.</li>
</ul>
<p><strong>Note:</strong> While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.</p>
</section><section id="document-structure"><div class="header-wrapper"><h3 id="x4-3-document-structure"><bdi class="secno">4.3 </bdi>Document Structure</h3><a class="self-link" href="#document-structure" aria-label="Permalink for Section 4.3"></a></div>
<p>An OpenAPI document <em class="rfc2119">MAY</em> be made up of a single document or be divided into multiple, connected parts at the discretion of the author. In the latter case, <a href="#reference-object"><code>Reference Objects</code></a> and <a href="#schema-object"><code>Schema Object</code></a> <code>$ref</code> keywords are used.</p>
<p>It is <em class="rfc2119">RECOMMENDED</em> that the root OpenAPI document be named: <code>openapi.json</code> or <code>openapi.yaml</code>.</p>
</section><section id="data-types"><div class="header-wrapper"><h3 id="x4-4-data-types"><bdi class="secno">4.4 </bdi>Data Types</h3><a class="self-link" href="#data-types" aria-label="Permalink for Section 4.4"></a></div>
<p>Data types in the OAS are based on the types supported by the <a href="https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-4.2.1">JSON Schema Specification Draft 2020-12</a>.
Note that <code>integer</code> as a type is also supported and is defined as a JSON number without a fraction or exponent part.
Models are defined using the <a href="#schema-object">Schema Object</a>, which is a superset of JSON Schema Specification Draft 2020-12.</p>
<p><span id="dataTypeFormat"></span>As defined by the <a href="https://tools.ietf.org/html/draft-bhutton-json-schema-validation-00#section-7.3">JSON Schema Validation vocabulary</a>, data types can have an optional modifier property: <code>format</code>.
OAS defines additional formats to provide fine detail for primitive data types.</p>
<p>The formats defined by the OAS are:</p>
<table>
<thead>
<tr>
<th><a href="#data-types"><code>type</code></a></th>
<th><a href="#dataTypeFormat"><code>format</code></a></th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>integer</code></td>
<td><code>int32</code></td>
<td>signed 32 bits</td>
</tr>
<tr>
<td><code>integer</code></td>
<td><code>int64</code></td>
<td>signed 64 bits (a.k.a long)</td>
</tr>
<tr>
<td><code>number</code></td>
<td><code>float</code></td>
<td></td>
</tr>
<tr>
<td><code>number</code></td>
<td><code>double</code></td>
<td></td>
</tr>
<tr>
<td><code>string</code></td>
<td><code>password</code></td>
<td>A hint to UIs to obscure input.</td>
</tr>
</tbody>
</table>
</section><section id="rich-text-formatting"><div class="header-wrapper"><h3 id="x4-5-rich-text-formatting"><bdi class="secno">4.5 </bdi>Rich Text Formatting</h3><a class="self-link" href="#rich-text-formatting" aria-label="Permalink for Section 4.5"></a></div>
<p>Throughout the specification <code>description</code> fields are noted as supporting [<cite><a class="bibref" data-link-type="biblio" href="#bib-commonmark" title="CommonMark Spec">CommonMark</a></cite>] markdown formatting.
Where OpenAPI tooling renders rich text it <em class="rfc2119">MUST</em> support, at a minimum, markdown syntax as described by [<cite><a class="bibref" data-link-type="biblio" href="#bib-commonmark-0.27" title="CommonMark Spec, Version 0.27">CommonMark-0.27</a></cite>]. Tooling <em class="rfc2119">MAY</em> choose to ignore some CommonMark features to address security concerns.</p>
</section><section id="relative-references-in-uris"><div class="header-wrapper"><h3 id="x4-6-relative-references-in-uris"><bdi class="secno">4.6 </bdi>Relative References in URIs</h3><a class="self-link" href="#relative-references-in-uris" aria-label="Permalink for Section 4.6"></a></div>
<p>Unless specified otherwise, all properties that are URIs <em class="rfc2119">MAY</em> be relative references as defined by [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">Section 4.2</a>.</p>
<p>Relative references, including those in <a href="#reference-object"><code>Reference Objects</code></a>, <a href="#path-item-object"><code>PathItem Object</code></a> <code>$ref</code> fields, <a href="#link-object"><code>Link Object</code></a> <code>operationRef</code> fields and <a href="#example-object"><code>Example Object</code></a> <code>externalValue</code> fields, are resolved using the referring document as the Base URI according to [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-5.2">Section 5.2</a>.</p>
<p>If a URI contains a fragment identifier, then the fragment should be resolved per the fragment resolution mechanism of the referenced document. If the representation of the referenced document is JSON or YAML, then the fragment identifier <em class="rfc2119">SHOULD</em> be interpreted as a JSON-Pointer as per [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc6901" title="JavaScript Object Notation (JSON) Pointer">RFC6901</a></cite>].</p>
<p>Relative references in <a href="#schema-object"><code>Schema Objects</code></a>, including any that appear as <code>$id</code> values, use the nearest parent <code>$id</code> as a Base URI, as described by <a href="https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-8.2">JSON Schema Specification Draft 2020-12</a>. If no parent schema contains an <code>$id</code>, then the Base URI <em class="rfc2119">MUST</em> be determined according to [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-5.1">Section 5.1</a>.</p>
</section><section id="relative-references-in-urls"><div class="header-wrapper"><h3 id="x4-7-relative-references-in-urls"><bdi class="secno">4.7 </bdi>Relative References in URLs</h3><a class="self-link" href="#relative-references-in-urls" aria-label="Permalink for Section 4.7"></a></div>
<p>Unless specified otherwise, all properties that are URLs <em class="rfc2119">MAY</em> be relative references as defined by [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">Section 4.2</a>.
Unless specified otherwise, relative references are resolved using the URLs defined in the <a href="#server-object"><code>Server Object</code></a> as a Base URL. Note that these themselves <em class="rfc2119">MAY</em> be relative to the referring document.</p>
</section><section id="schema"><div class="header-wrapper"><h3 id="x4-8-schema"><bdi class="secno">4.8 </bdi>Schema</h3><a class="self-link" href="#schema" aria-label="Permalink for Section 4.8"></a></div>
<p>In the following description, if a field is not explicitly <strong><em class="rfc2119">REQUIRED</em></strong> or described with a <em class="rfc2119">MUST</em> or <em class="rfc2119">SHALL</em>, it can be considered <em class="rfc2119">OPTIONAL</em>.</p>
<section id="openapi-object"><div class="header-wrapper"><h4 id="x4-8-1-openapi-object"><bdi class="secno">4.8.1 </bdi>OpenAPI Object</h4><a class="self-link" href="#openapi-object" aria-label="Permalink for Section 4.8.1"></a></div>
<p>This is the root object of the <a href="#openapi-document">OpenAPI document</a>.</p>
<section id="fixed-fields"><div class="header-wrapper"><h5 id="x4-8-1-1-fixed-fields"><bdi class="secno">4.8.1.1 </bdi>Fixed Fields</h5><a class="self-link" href="#fixed-fields" aria-label="Permalink for Section 4.8.1.1"></a></div>
<table>
<thead>
<tr>
<th>Field Name</th>
<th style="text-align:center">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="oasVersion"></span>openapi</td>
<td style="text-align:center"><code>string</code></td>
<td><strong><em class="rfc2119">REQUIRED</em></strong>. This string <em class="rfc2119">MUST</em> be the <a href="#versions">version number</a> of the OpenAPI Specification that the OpenAPI document uses. The <code>openapi</code> field <em class="rfc2119">SHOULD</em> be used by tooling to interpret the OpenAPI document. This is <em>not</em> related to the API <a href="#infoVersion"><code>info.version</code></a> string.</td>
</tr>
<tr>
<td><span id="oasInfo"></span>info</td>
<td style="text-align:center"><a href="#info-object">Info Object</a></td>
<td><strong><em class="rfc2119">REQUIRED</em></strong>. Provides metadata about the API. The metadata <em class="rfc2119">MAY</em> be used by tooling as required.</td>
</tr>
<tr>
<td><span id="oasJsonSchemaDialect"></span> jsonSchemaDialect</td>
<td style="text-align:center"><code>string</code></td>
<td>The default value for the <code>$schema</code> keyword within <a href="#schema-object">Schema Objects</a> contained within this OAS document. This <em class="rfc2119">MUST</em> be in the form of a URI.</td>
</tr>
<tr>
<td><span id="oasServers"></span>servers</td>
<td style="text-align:center">[<a href="#server-object">Server Object</a>]</td>
<td>An array of Server Objects, which provide connectivity information to a target server. If the <code>servers</code> property is not provided, or is an empty array, the default value would be a <a href="#server-object">Server Object</a> with a <a href="#serverUrl">url</a> value of <code>/</code>.</td>
</tr>
<tr>
<td><span id="oasPaths"></span>paths</td>
<td style="text-align:center"><a href="#paths-object">Paths Object</a></td>
<td>The available paths and operations for the API.</td>
</tr>
<tr>
<td><span id="oasWebhooks"></span>webhooks</td>
<td style="text-align:center">Map[<code>string</code>, <a href="#path-item-object">Path Item Object</a> | <a href="#reference-object">Reference Object</a>] ]</td>
<td>The incoming webhooks that <em class="rfc2119">MAY</em> be received as part of this API and that the API consumer <em class="rfc2119">MAY</em> choose to implement. Closely related to the <code>callbacks</code> feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An <a href="https://learn.openapis.org/examples/v3.1/webhook-example.html">example</a> is available.</td>
</tr>
<tr>
<td><span id="oasComponents"></span>components</td>
<td style="text-align:center"><a href="#components-object">Components Object</a></td>
<td>An element to hold various schemas for the document.</td>
</tr>
<tr>
<td><span id="oasSecurity"></span>security</td>
<td style="text-align:center">[<a href="#security-requirement-object">Security Requirement Object</a>]</td>
<td>A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement (<code>{}</code>) can be included in the array.</td>
</tr>
<tr>
<td><span id="oasTags"></span>tags</td>
<td style="text-align:center">[<a href="#tag-object">Tag Object</a>]</td>
<td>A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the <a href="#operation-object">Operation Object</a> must be declared. The tags that are not declared <em class="rfc2119">MAY</em> be organized randomly or based on the tools’ logic. Each tag name in the list <em class="rfc2119">MUST</em> be unique.</td>
</tr>
<tr>
<td><span id="oasExternalDocs"></span>externalDocs</td>
<td style="text-align:center"><a href="#external-documentation-object">External Documentation Object</a></td>
<td>Additional external documentation.</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
</section></section><section id="info-object"><div class="header-wrapper"><h4 id="x4-8-2-info-object"><bdi class="secno">4.8.2 </bdi>Info Object</h4><a class="self-link" href="#info-object" aria-label="Permalink for Section 4.8.2"></a></div>
<p>The object provides metadata about the API.
The metadata <em class="rfc2119">MAY</em> be used by the clients if needed, and <em class="rfc2119">MAY</em> be presented in editing or documentation generation tools for convenience.</p>
<section id="fixed-fields-0"><div class="header-wrapper"><h5 id="x4-8-2-1-fixed-fields"><bdi class="secno">4.8.2.1 </bdi>Fixed Fields</h5><a class="self-link" href="#fixed-fields-0" aria-label="Permalink for Section 4.8.2.1"></a></div>
<table>
<thead>
<tr>
<th>Field Name</th>
<th style="text-align:center">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="infoTitle"></span>title</td>
<td style="text-align:center"><code>string</code></td>
<td><strong><em class="rfc2119">REQUIRED</em></strong>. The title of the API.</td>
</tr>
<tr>
<td><span id="infoSummary"></span>summary</td>
<td style="text-align:center"><code>string</code></td>
<td>A short summary of the API.</td>
</tr>
<tr>
<td><span id="infoDescription"></span>description</td>
<td style="text-align:center"><code>string</code></td>
<td>A description of the API. [<cite><a class="bibref" data-link-type="biblio" href="#bib-commonmark" title="CommonMark Spec">CommonMark</a></cite>] syntax <em class="rfc2119">MAY</em> be used for rich text representation.</td>
</tr>
<tr>
<td><span id="infoTermsOfService"></span>termsOfService</td>
<td style="text-align:center"><code>string</code></td>
<td>A URL to the Terms of Service for the API. This <em class="rfc2119">MUST</em> be in the form of a URL.</td>
</tr>
<tr>
<td><span id="infoContact"></span>contact</td>
<td style="text-align:center"><a href="#contact-object">Contact Object</a></td>
<td>The contact information for the exposed API.</td>
</tr>
<tr>
<td><span id="infoLicense"></span>license</td>
<td style="text-align:center"><a href="#license-object">License Object</a></td>
<td>The license information for the exposed API.</td>
</tr>
<tr>
<td><span id="infoVersion"></span>version</td>
<td style="text-align:center"><code>string</code></td>
<td><strong><em class="rfc2119">REQUIRED</em></strong>. The version of the OpenAPI document (which is distinct from the <a href="#oasVersion">OpenAPI Specification version</a> or the API implementation version).</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
</section><section id="info-object-example"><div class="header-wrapper"><h5 id="x4-8-2-2-info-object-example"><bdi class="secno">4.8.2.2 </bdi>Info Object Example</h5><a class="self-link" href="#info-object-example" aria-label="Permalink for Section 4.8.2.2"></a></div>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"title"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Sample Pet Store App"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"summary"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"A pet store manager."</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"This is a sample server for a pet store."</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"termsOfService"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://example.com/terms/"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"contact"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"API Support"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://www.example.com/support"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"email"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"[email protected]"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"license"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Apache 2.0"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://www.apache.org/licenses/LICENSE-2.0.html"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"version"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"1.0.1"</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">title:</span> <span class="hljs-string">Sample</span> <span class="hljs-string">Pet</span> <span class="hljs-string">Store</span> <span class="hljs-string">App</span>
<span class="hljs-attr">summary:</span> <span class="hljs-string">A</span> <span class="hljs-string">pet</span> <span class="hljs-string">store</span> <span class="hljs-string">manager.</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">This</span> <span class="hljs-string">is</span> <span class="hljs-string">a</span> <span class="hljs-string">sample</span> <span class="hljs-string">server</span> <span class="hljs-string">for</span> <span class="hljs-string">a</span> <span class="hljs-string">pet</span> <span class="hljs-string">store.</span>
<span class="hljs-attr">termsOfService:</span> <span class="hljs-string">https://example.com/terms/</span>
<span class="hljs-attr">contact:</span>
<span class="hljs-attr">name:</span> <span class="hljs-string">API</span> <span class="hljs-string">Support</span>
<span class="hljs-attr">url:</span> <span class="hljs-string">https://www.example.com/support</span>
<span class="hljs-attr">email:</span> <span class="hljs-string">[email protected]</span>
<span class="hljs-attr">license:</span>
<span class="hljs-attr">name:</span> <span class="hljs-string">Apache</span> <span class="hljs-number">2.0</span>
<span class="hljs-attr">url:</span> <span class="hljs-string">https://www.apache.org/licenses/LICENSE-2.0.html</span>
<span class="hljs-attr">version:</span> <span class="hljs-number">1.0</span><span class="hljs-number">.1</span>
</code></pre>
</section></section><section id="contact-object"><div class="header-wrapper"><h4 id="x4-8-3-contact-object"><bdi class="secno">4.8.3 </bdi>Contact Object</h4><a class="self-link" href="#contact-object" aria-label="Permalink for Section 4.8.3"></a></div>
<p>Contact information for the exposed API.</p>
<section id="fixed-fields-1"><div class="header-wrapper"><h5 id="x4-8-3-1-fixed-fields"><bdi class="secno">4.8.3.1 </bdi>Fixed Fields</h5><a class="self-link" href="#fixed-fields-1" aria-label="Permalink for Section 4.8.3.1"></a></div>
<table>
<thead>
<tr>
<th>Field Name</th>
<th style="text-align:center">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="contactName"></span>name</td>
<td style="text-align:center"><code>string</code></td>
<td>The identifying name of the contact person/organization.</td>
</tr>
<tr>
<td><span id="contactUrl"></span>url</td>
<td style="text-align:center"><code>string</code></td>
<td>The URL pointing to the contact information. This <em class="rfc2119">MUST</em> be in the form of a URL.</td>
</tr>
<tr>
<td><span id="contactEmail"></span>email</td>
<td style="text-align:center"><code>string</code></td>
<td>The email address of the contact person/organization. This <em class="rfc2119">MUST</em> be in the form of an email address.</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
</section><section id="contact-object-example"><div class="header-wrapper"><h5 id="x4-8-3-2-contact-object-example"><bdi class="secno">4.8.3.2 </bdi>Contact Object Example</h5><a class="self-link" href="#contact-object-example" aria-label="Permalink for Section 4.8.3.2"></a></div>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"API Support"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://www.example.com/support"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"email"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"[email protected]"</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">name:</span> <span class="hljs-string">API</span> <span class="hljs-string">Support</span>
<span class="hljs-attr">url:</span> <span class="hljs-string">https://www.example.com/support</span>
<span class="hljs-attr">email:</span> <span class="hljs-string">[email protected]</span>
</code></pre>
</section></section><section id="license-object"><div class="header-wrapper"><h4 id="x4-8-4-license-object"><bdi class="secno">4.8.4 </bdi>License Object</h4><a class="self-link" href="#license-object" aria-label="Permalink for Section 4.8.4"></a></div>
<p>License information for the exposed API.</p>
<section id="fixed-fields-2"><div class="header-wrapper"><h5 id="x4-8-4-1-fixed-fields"><bdi class="secno">4.8.4.1 </bdi>Fixed Fields</h5><a class="self-link" href="#fixed-fields-2" aria-label="Permalink for Section 4.8.4.1"></a></div>
<table>
<thead>
<tr>
<th>Field Name</th>
<th style="text-align:center">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="licenseName"></span>name</td>
<td style="text-align:center"><code>string</code></td>
<td><strong><em class="rfc2119">REQUIRED</em></strong>. The license name used for the API.</td>
</tr>
<tr>
<td><span id="licenseIdentifier"></span>identifier</td>
<td style="text-align:center"><code>string</code></td>
<td>An [<cite><a class="bibref" data-link-type="biblio" href="#bib-spdx-licenses" title="SPDX License List">SPDX-Licenses</a></cite>] expression for the API. The <code>identifier</code> field is mutually exclusive of the <code>url</code> field.</td>
</tr>
<tr>
<td><span id="licenseUrl"></span>url</td>
<td style="text-align:center"><code>string</code></td>
<td>A URL to the license used for the API. This <em class="rfc2119">MUST</em> be in the form of a URL. The <code>url</code> field is mutually exclusive of the <code>identifier</code> field.</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
</section><section id="license-object-example"><div class="header-wrapper"><h5 id="x4-8-4-2-license-object-example"><bdi class="secno">4.8.4.2 </bdi>License Object Example</h5><a class="self-link" href="#license-object-example" aria-label="Permalink for Section 4.8.4.2"></a></div>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Apache 2.0"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"identifier"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Apache-2.0"</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">name:</span> <span class="hljs-string">Apache</span> <span class="hljs-number">2.0</span>
<span class="hljs-attr">identifier:</span> <span class="hljs-string">Apache-2.0</span>
</code></pre>
</section></section><section id="server-object"><div class="header-wrapper"><h4 id="x4-8-5-server-object"><bdi class="secno">4.8.5 </bdi>Server Object</h4><a class="self-link" href="#server-object" aria-label="Permalink for Section 4.8.5"></a></div>
<p>An object representing a Server.</p>
<section id="fixed-fields-3"><div class="header-wrapper"><h5 id="x4-8-5-1-fixed-fields"><bdi class="secno">4.8.5.1 </bdi>Fixed Fields</h5><a class="self-link" href="#fixed-fields-3" aria-label="Permalink for Section 4.8.5.1"></a></div>
<table>
<thead>
<tr>
<th>Field Name</th>
<th style="text-align:center">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="serverUrl"></span>url</td>
<td style="text-align:center"><code>string</code></td>
<td><strong><em class="rfc2119">REQUIRED</em></strong>. A URL to the target host. This URL supports Server Variables and <em class="rfc2119">MAY</em> be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in <code>{</code>brackets<code>}</code>.</td>
</tr>
<tr>
<td><span id="serverDescription"></span>description</td>
<td style="text-align:center"><code>string</code></td>
<td>An optional string describing the host designated by the URL. [<cite><a class="bibref" data-link-type="biblio" href="#bib-commonmark" title="CommonMark Spec">CommonMark</a></cite>] syntax <em class="rfc2119">MAY</em> be used for rich text representation.</td>
</tr>
<tr>
<td><span id="serverVariables"></span>variables</td>
<td style="text-align:center">Map[<code>string</code>, <a href="#server-variable-object">Server Variable Object</a>]</td>
<td>A map between a variable name and its value. The value is used for substitution in the server’s URL template.</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
</section><section id="server-object-example"><div class="header-wrapper"><h5 id="x4-8-5-2-server-object-example"><bdi class="secno">4.8.5.2 </bdi>Server Object Example</h5><a class="self-link" href="#server-object-example" aria-label="Permalink for Section 4.8.5.2"></a></div>
<p>A single server would be described as:</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://development.gigantic-server.com/v1"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Development server"</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">url:</span> <span class="hljs-string">https://development.gigantic-server.com/v1</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">Development</span> <span class="hljs-string">server</span>
</code></pre>
<p>The following shows how multiple servers can be described, for example, at the OpenAPI Object’s <a href="#oasServers"><code>servers</code></a>:</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"servers"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://development.gigantic-server.com/v1"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Development server"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://staging.gigantic-server.com/v1"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Staging server"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://api.gigantic-server.com/v1"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Production server"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">servers:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">url:</span> <span class="hljs-string">https://development.gigantic-server.com/v1</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">Development</span> <span class="hljs-string">server</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">url:</span> <span class="hljs-string">https://staging.gigantic-server.com/v1</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">Staging</span> <span class="hljs-string">server</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">url:</span> <span class="hljs-string">https://api.gigantic-server.com/v1</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">Production</span> <span class="hljs-string">server</span>
</code></pre>
<p>The following shows how variables can be used for a server configuration:</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"servers"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://{username}.gigantic-server.com:{port}/{basePath}"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"The production API server"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"variables"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"username"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"default"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"demo"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"this value is assigned by the service provider, in this example `gigantic-server.com`"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"port"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"enum"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
<span class="hljs-string">"8443"</span><span class="hljs-punctuation">,</span>
<span class="hljs-string">"443"</span>
<span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"default"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"8443"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"basePath"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"default"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"v2"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">servers:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">url:</span> <span class="hljs-string">https://{username}.gigantic-server.com:{port}/{basePath}</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">The</span> <span class="hljs-string">production</span> <span class="hljs-string">API</span> <span class="hljs-string">server</span>
<span class="hljs-attr">variables:</span>
<span class="hljs-attr">username:</span>
<span class="hljs-comment"># note! no enum here means it is an open value</span>
<span class="hljs-attr">default:</span> <span class="hljs-string">demo</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">this</span> <span class="hljs-string">value</span> <span class="hljs-string">is</span> <span class="hljs-string">assigned</span> <span class="hljs-string">by</span> <span class="hljs-string">the</span> <span class="hljs-string">service</span> <span class="hljs-string">provider,</span> <span class="hljs-string">in</span> <span class="hljs-string">this</span> <span class="hljs-string">example</span> <span class="hljs-string">`gigantic-server.com`</span>
<span class="hljs-attr">port:</span>
<span class="hljs-attr">enum:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">'8443'</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">'443'</span>
<span class="hljs-attr">default:</span> <span class="hljs-string">'8443'</span>
<span class="hljs-attr">basePath:</span>
<span class="hljs-comment"># open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`</span>
<span class="hljs-attr">default:</span> <span class="hljs-string">v2</span>
</code></pre>
</section></section><section id="server-variable-object"><div class="header-wrapper"><h4 id="x4-8-6-server-variable-object"><bdi class="secno">4.8.6 </bdi>Server Variable Object</h4><a class="self-link" href="#server-variable-object" aria-label="Permalink for Section 4.8.6"></a></div>
<p>An object representing a Server Variable for server URL template substitution.</p>
<section id="fixed-fields-4"><div class="header-wrapper"><h5 id="x4-8-6-1-fixed-fields"><bdi class="secno">4.8.6.1 </bdi>Fixed Fields</h5><a class="self-link" href="#fixed-fields-4" aria-label="Permalink for Section 4.8.6.1"></a></div>
<table>
<thead>
<tr>
<th>Field Name</th>
<th style="text-align:center">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="serverVariableEnum"></span>enum</td>
<td style="text-align:center">[<code>string</code>]</td>
<td>An enumeration of string values to be used if the substitution options are from a limited set. The array <em class="rfc2119">MUST NOT</em> be empty.</td>
</tr>
<tr>
<td><span id="serverVariableDefault"></span>default</td>
<td style="text-align:center"><code>string</code></td>
<td><strong><em class="rfc2119">REQUIRED</em></strong>. The default value to use for substitution, which <em class="rfc2119">SHALL</em> be sent if an alternate value is <em>not</em> supplied. Note this behavior is different than the <a href="#schema-object">Schema Object’s</a> treatment of default values, because in those cases parameter values are optional. If the <a href="#serverVariableEnum"><code>enum</code></a> is defined, the value <em class="rfc2119">MUST</em> exist in the enum’s values.</td>
</tr>
<tr>
<td><span id="serverVariableDescription"></span>description</td>
<td style="text-align:center"><code>string</code></td>
<td>An optional description for the server variable. [<cite><a class="bibref" data-link-type="biblio" href="#bib-commonmark" title="CommonMark Spec">CommonMark</a></cite>] syntax <em class="rfc2119">MAY</em> be used for rich text representation.</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
</section></section><section id="components-object"><div class="header-wrapper"><h4 id="x4-8-7-components-object"><bdi class="secno">4.8.7 </bdi>Components Object</h4><a class="self-link" href="#components-object" aria-label="Permalink for Section 4.8.7"></a></div>
<p>Holds a set of reusable objects for different aspects of the OAS.
All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.</p>
<section id="fixed-fields-5"><div class="header-wrapper"><h5 id="x4-8-7-1-fixed-fields"><bdi class="secno">4.8.7.1 </bdi>Fixed Fields</h5><a class="self-link" href="#fixed-fields-5" aria-label="Permalink for Section 4.8.7.1"></a></div>
<table>
<thead>
<tr>
<th>Field Name</th>
<th style="text-align:left">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="componentsSchemas"></span> schemas</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#schema-object">Schema Object</a>]</td>
<td>An object to hold reusable <a href="#schema-object">Schema Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsResponses"></span> responses</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#response-object">Response Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#response-object">Response Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsParameters"></span> parameters</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#parameter-object">Parameter Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#parameter-object">Parameter Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsExamples"></span> examples</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#example-object">Example Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#example-object">Example Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsRequestBodies"></span> requestBodies</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#request-body-object">Request Body Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#request-body-object">Request Body Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsHeaders"></span> headers</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#header-object">Header Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#header-object">Header Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsSecuritySchemes"></span> securitySchemes</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#security-scheme-object">Security Scheme Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#security-scheme-object">Security Scheme Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsLinks"></span> links</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#link-object">Link Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#link-object">Link Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsCallbacks"></span> callbacks</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#callback-object">Callback Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#callback-object">Callback Objects</a>.</td>
</tr>
<tr>
<td><span id="componentsPathItems"></span> pathItems</td>
<td style="text-align:left">Map[<code>string</code>, <a href="#path-item-object">Path Item Object</a> | <a href="#reference-object">Reference Object</a>]</td>
<td>An object to hold reusable <a href="#path-item-object">Path Item Object</a>.</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
<p>All the fixed fields declared above are objects that <em class="rfc2119">MUST</em> use keys that match the regular expression: <code>^[a-zA-Z0-9\.\-_]+$</code>.</p>
<p>Field Name Examples:</p>
<pre class="nohighlight" tabindex="0"><code>User
User_1
User_Name
user-name
my.org.User
</code></pre>
</section><section id="components-object-example"><div class="header-wrapper"><h5 id="x4-8-7-2-components-object-example"><bdi class="secno">4.8.7.2 </bdi>Components Object Example</h5><a class="self-link" href="#components-object-example" aria-label="Permalink for Section 4.8.7.2"></a></div>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">"components"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"schemas"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"GeneralError"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"object"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"properties"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"code"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"integer"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"format"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"int32"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"message"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"string"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"Category"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"object"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"properties"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"id"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"integer"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"format"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"int64"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"string"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"Tag"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"object"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"properties"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"id"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"integer"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"format"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"int64"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"string"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"parameters"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"skipParam"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"skip"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"in"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"query"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"number of items to skip"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"required"</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">true</span></span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"schema"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"integer"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"format"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"int32"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"limitParam"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"limit"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"in"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"query"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"max records to return"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"required"</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">true</span></span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"schema"</span> <span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"integer"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"format"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"int32"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"responses"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"NotFound"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Entity not found."</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"IllegalInput"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Illegal input for operation."</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"GeneralError"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"General Error"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"content"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"application/json"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"schema"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"$ref"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"#/components/schemas/GeneralError"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"securitySchemes"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"api_key"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"apiKey"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"api_key"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"in"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"header"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"petstore_auth"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"oauth2"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"flows"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"implicit"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"authorizationUrl"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"https://example.org/api/oauth/dialog"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"scopes"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"write:pets"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"modify pets in your account"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"read:pets"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"read your pets"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
</code></pre>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">components:</span>
<span class="hljs-attr">schemas:</span>
<span class="hljs-attr">GeneralError:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">object</span>
<span class="hljs-attr">properties:</span>
<span class="hljs-attr">code:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">integer</span>
<span class="hljs-attr">format:</span> <span class="hljs-string">int32</span>
<span class="hljs-attr">message:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">string</span>
<span class="hljs-attr">Category:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">object</span>
<span class="hljs-attr">properties:</span>
<span class="hljs-attr">id:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">integer</span>
<span class="hljs-attr">format:</span> <span class="hljs-string">int64</span>
<span class="hljs-attr">name:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">string</span>
<span class="hljs-attr">Tag:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">object</span>
<span class="hljs-attr">properties:</span>
<span class="hljs-attr">id:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">integer</span>
<span class="hljs-attr">format:</span> <span class="hljs-string">int64</span>
<span class="hljs-attr">name:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">string</span>
<span class="hljs-attr">parameters:</span>
<span class="hljs-attr">skipParam:</span>
<span class="hljs-attr">name:</span> <span class="hljs-string">skip</span>
<span class="hljs-attr">in:</span> <span class="hljs-string">query</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">number</span> <span class="hljs-string">of</span> <span class="hljs-string">items</span> <span class="hljs-string">to</span> <span class="hljs-string">skip</span>
<span class="hljs-attr">required:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">schema:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">integer</span>
<span class="hljs-attr">format:</span> <span class="hljs-string">int32</span>
<span class="hljs-attr">limitParam:</span>
<span class="hljs-attr">name:</span> <span class="hljs-string">limit</span>
<span class="hljs-attr">in:</span> <span class="hljs-string">query</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">max</span> <span class="hljs-string">records</span> <span class="hljs-string">to</span> <span class="hljs-string">return</span>
<span class="hljs-attr">required:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">schema:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">integer</span>
<span class="hljs-attr">format:</span> <span class="hljs-string">int32</span>
<span class="hljs-attr">responses:</span>
<span class="hljs-attr">NotFound:</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">Entity</span> <span class="hljs-string">not</span> <span class="hljs-string">found.</span>
<span class="hljs-attr">IllegalInput:</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">Illegal</span> <span class="hljs-string">input</span> <span class="hljs-string">for</span> <span class="hljs-string">operation.</span>
<span class="hljs-attr">GeneralError:</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">General</span> <span class="hljs-string">Error</span>
<span class="hljs-attr">content:</span>
<span class="hljs-attr">application/json:</span>
<span class="hljs-attr">schema:</span>
<span class="hljs-string">$ref:</span> <span class="hljs-string">'#/components/schemas/GeneralError'</span>
<span class="hljs-attr">securitySchemes:</span>
<span class="hljs-attr">api_key:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">apiKey</span>
<span class="hljs-attr">name:</span> <span class="hljs-string">api_key</span>
<span class="hljs-attr">in:</span> <span class="hljs-string">header</span>
<span class="hljs-attr">petstore_auth:</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">oauth2</span>
<span class="hljs-attr">flows:</span>
<span class="hljs-attr">implicit:</span>
<span class="hljs-attr">authorizationUrl:</span> <span class="hljs-string">https://example.org/api/oauth/dialog</span>
<span class="hljs-attr">scopes:</span>
<span class="hljs-attr">write:pets:</span> <span class="hljs-string">modify</span> <span class="hljs-string">pets</span> <span class="hljs-string">in</span> <span class="hljs-string">your</span> <span class="hljs-string">account</span>
<span class="hljs-attr">read:pets:</span> <span class="hljs-string">read</span> <span class="hljs-string">your</span> <span class="hljs-string">pets</span>
</code></pre>
</section></section><section id="paths-object"><div class="header-wrapper"><h4 id="x4-8-8-paths-object"><bdi class="secno">4.8.8 </bdi>Paths Object</h4><a class="self-link" href="#paths-object" aria-label="Permalink for Section 4.8.8"></a></div>
<p>Holds the relative paths to the individual endpoints and their operations.
The path is appended to the URL from the <a href="#server-object"><code>Server Object</code></a> in order to construct the full URL. The Paths <em class="rfc2119">MAY</em> be empty, due to <a href="#security-filtering">Access Control List (ACL) constraints</a>.</p>
<section id="patterned-fields"><div class="header-wrapper"><h5 id="x4-8-8-1-patterned-fields"><bdi class="secno">4.8.8.1 </bdi>Patterned Fields</h5><a class="self-link" href="#patterned-fields" aria-label="Permalink for Section 4.8.8.1"></a></div>
<table>
<thead>
<tr>
<th>Field Pattern</th>
<th style="text-align:center">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="pathsPath"></span>/{path}</td>
<td style="text-align:center"><a href="#path-item-object">Path Item Object</a></td>
<td>A relative path to an individual endpoint. The field name <em class="rfc2119">MUST</em> begin with a forward slash (<code>/</code>). The path is <strong>appended</strong> (no relative URL resolution) to the expanded URL from the <a href="#server-object"><code>Server Object</code></a>’s <code>url</code> field in order to construct the full URL. <a href="#path-templating">Path templating</a> is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names <em class="rfc2119">MUST NOT</em> exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.</td>
</tr>
</tbody>
</table>
<p>This object <em class="rfc2119">MAY</em> be extended with <a href="#specification-extensions">Specification Extensions</a>.</p>
</section><section id="path-templating-matching"><div class="header-wrapper"><h5 id="x4-8-8-2-path-templating-matching"><bdi class="secno">4.8.8.2 </bdi>Path Templating Matching</h5><a class="self-link" href="#path-templating-matching" aria-label="Permalink for Section 4.8.8.2"></a></div>
<p>Assuming the following paths, the concrete definition, <code>/pets/mine</code>, will be matched first if used:</p>
<pre class="nohighlight" tabindex="0"><code> /pets/{petId}
/pets/mine
</code></pre>
<p>The following paths are considered identical and invalid:</p>
<pre class="nohighlight" tabindex="0"><code> /pets/{petId}
/pets/{name}
</code></pre>
<p>The following may lead to ambiguous resolution:</p>
<pre class="nohighlight" tabindex="0"><code> /{entity}/me
/books/{id}
</code></pre>
</section><section id="paths-object-example"><div class="header-wrapper"><h5 id="x4-8-8-3-paths-object-example"><bdi class="secno">4.8.8.3 </bdi>Paths Object Example</h5><a class="self-link" href="#paths-object-example" aria-label="Permalink for Section 4.8.8.3"></a></div>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"/pets"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"get"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Returns all pets from the system that the user has access to"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"responses"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"200"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"A list of pets."</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"content"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"application/json"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"schema"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"array"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"items"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"$ref"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"#/components/schemas/pet"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>