rapidoc 9.3.3 → 9.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.github/workflow/words.yaml +22 -0
  2. package/dist/rapidoc-min.js +815 -709
  3. package/dist/rapidoc-min.js.LICENSE.txt +8 -7
  4. package/dist/rapidoc-min.js.LICENSE.txt.gz +0 -0
  5. package/dist/rapidoc-min.js.gz +0 -0
  6. package/dist/rapidoc-min.js.map +1 -1
  7. package/dist/rapidoc-min.js.map.gz +0 -0
  8. package/dist/rapidoc.js +17680 -31489
  9. package/dist/report.html +5 -4
  10. package/package.json +18 -18
  11. package/src/components/api-request.js +218 -112
  12. package/src/components/api-response.js +11 -10
  13. package/src/components/json-tree.js +17 -12
  14. package/src/components/schema-table.js +47 -39
  15. package/src/components/schema-tree.js +55 -52
  16. package/src/components/tag-input.js +7 -4
  17. package/src/json-schema-viewer.js +1 -1
  18. package/src/rapidoc-mini.js +1 -1
  19. package/src/rapidoc.js +98 -30
  20. package/src/styles/endpoint-styles.js +1 -1
  21. package/src/styles/info-styles.js +2 -1
  22. package/src/styles/input-styles.js +2 -16
  23. package/src/styles/nav-styles.js +57 -10
  24. package/src/styles/schema-styles.js +27 -15
  25. package/src/styles/tab-styles.js +1 -0
  26. package/src/templates/callback-template.js +3 -3
  27. package/src/templates/code-samples-template.js +1 -0
  28. package/src/templates/components-template.js +3 -5
  29. package/src/templates/endpoint-template.js +38 -25
  30. package/src/templates/expanded-endpoint-template.js +57 -8
  31. package/src/templates/focused-endpoint-template.js +4 -1
  32. package/src/templates/header-template.js +2 -2
  33. package/src/templates/json-schema-viewer-template.js +2 -1
  34. package/src/templates/main-body-template.js +19 -18
  35. package/src/templates/navbar-template.js +98 -81
  36. package/src/templates/overview-template.js +1 -1
  37. package/src/templates/security-scheme-template.js +48 -25
  38. package/src/templates/server-template.js +1 -1
  39. package/src/utils/common-utils.js +1 -1
  40. package/src/utils/schema-utils.js +161 -63
  41. package/src/utils/spec-parser.js +1 -0
  42. package/src/utils/theme.js +9 -3
  43. package/webpack.config.js +2 -1
@@ -12,14 +12,14 @@ function toggleExpand(path) {
12
12
  if (path.expanded) {
13
13
  path.expanded = false; // collapse
14
14
  if (this.updateRoute === 'true') {
15
- window.history.replaceState(null, null, `${window.location.href.split('#')[0]}${this.routePrefix === '#' ? '' : `${this.routePrefix}`}`);
15
+ this.replaceHistoryState('');
16
16
  }
17
17
  } else {
18
18
  path.expanded = true; // Expand
19
19
  if (this.updateRoute === 'true') {
20
20
  const newHash = `${this.routePrefix || '#'}${path.elementId}`;
21
21
  if (window.location.hash !== newHash) {
22
- window.history.replaceState(null, null, `${window.location.href.split('#')[0]}${newHash}`);
22
+ this.replaceHistoryState(path.elementId);
23
23
  }
24
24
  }
25
25
  }
@@ -109,6 +109,18 @@ function endpointBodyTemplate(path) {
109
109
  }
110
110
 
111
111
  ${path.description ? html`<div part="section-endpoint-body-description" class="m-markdown"> ${unsafeHTML(marked(path.description))}</div>` : ''}
112
+ ${path.externalDocs?.url || path.externalDocs?.description
113
+ ? html`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
114
+ <div class="m-markdown"> ${unsafeHTML(marked(path.externalDocs?.description || ''))} </div>
115
+ ${path.externalDocs?.url
116
+ ? html`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${path.externalDocs?.url}" target="_blank">
117
+ ${path.externalDocs?.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
118
+ </a>`
119
+ : ''
120
+ }
121
+ </div>`
122
+ : ''
123
+ }
112
124
  <slot name="${path.elementId}"></slot>
113
125
  ${pathSecurityTemplate.call(this, path.security)}
114
126
  ${codeSampleTabPanel}
@@ -119,7 +131,7 @@ function endpointBodyTemplate(path) {
119
131
  class = "${this.renderStyle}-mode ${this.layout}-layout"
120
132
  style = "width:100%;"
121
133
  webhook = "${path.isWebhook}"
122
- method = "${path.method}",
134
+ method = "${path.method}"
123
135
  path = "${path.path}"
124
136
  .security = "${path.security}"
125
137
  .parameters = "${path.parameters}"
@@ -130,6 +142,7 @@ function endpointBodyTemplate(path) {
130
142
  active-schema-tab = "${this.defaultSchemaTab}"
131
143
  fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
132
144
  allow-try = "${this.allowTry}"
145
+ show-curl-before-try = "${this.showCurlBeforeTry}"
133
146
  accept = "${accept}"
134
147
  render-style="${this.renderStyle}"
135
148
  schema-style = "${this.schemaStyle}"
@@ -139,33 +152,33 @@ function endpointBodyTemplate(path) {
139
152
  schema-hide-read-only = "${this.schemaHideReadOnly === 'never' ? 'false' : path.isWebhook ? 'false' : 'true'}"
140
153
  schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'true' : 'false'}"
141
154
  fetch-credentials = "${this.fetchCredentials}"
142
- exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
155
+ exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
143
156
  file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
144
157
  anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
145
- > </api-request>
158
+ > </api-request>
146
159
 
147
160
  ${path.callbacks ? callbackTemplate.call(this, path.callbacks) : ''}
148
- </div>
161
+ </div>
149
162
 
150
- <api-response
151
- class = "${this.renderStyle}-mode"
152
- style = "width:100%;"
153
- webhook = "${path.isWebhook}"
154
- .responses="${path.responses}"
155
- active-schema-tab = "${this.defaultSchemaTab}"
156
- render-style="${this.renderStyle}"
157
- schema-style="${this.schemaStyle}"
158
- schema-expand-level = "${this.schemaExpandLevel}"
159
- schema-description-expanded = "${this.schemaDescriptionExpanded}"
160
- allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
161
- schema-hide-read-only = "${this.schemaHideReadOnly === 'never' ? 'false' : path.isWebhook ? 'true' : 'false'}"
162
- schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'false' : 'true'}"
163
- selected-status = "${Object.keys(path.responses || {})[0] || ''}"
164
- exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
165
- textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp,
166
- schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
167
- > </api-response>
168
- </div>
163
+ <api-response
164
+ class = "${this.renderStyle}-mode"
165
+ style = "width:100%;"
166
+ webhook = "${path.isWebhook}"
167
+ .responses="${path.responses}"
168
+ active-schema-tab = "${this.defaultSchemaTab}"
169
+ render-style="${this.renderStyle}"
170
+ schema-style="${this.schemaStyle}"
171
+ schema-expand-level = "${this.schemaExpandLevel}"
172
+ schema-description-expanded = "${this.schemaDescriptionExpanded}"
173
+ allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
174
+ schema-hide-read-only = "${this.schemaHideReadOnly === 'never' ? 'false' : path.isWebhook ? 'true' : 'false'}"
175
+ schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'false' : 'true'}"
176
+ selected-status = "${Object.keys(path.responses || {})[0] || ''}"
177
+ exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
178
+ textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp,
179
+ schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
180
+ > </api-response>
181
+ </div>
169
182
  </div>`;
170
183
  }
171
184
 
@@ -15,7 +15,24 @@ function headingRenderer(tagElementId) {
15
15
  return renderer;
16
16
  }
17
17
 
18
- export function expandedEndpointBodyTemplate(path, tagName = '') {
18
+ function expandCollapseTagDescription(e) {
19
+ const tagDescriptionEl = e.target.closest('.tag-container').querySelector('.tag-description');
20
+ const tagIconEl = e.target.closest('.tag-container').querySelector('.tag-icon');
21
+ if (tagDescriptionEl && tagIconEl) {
22
+ const isExpanded = tagDescriptionEl.classList.contains('expanded');
23
+ if (isExpanded) {
24
+ tagDescriptionEl.style.maxHeight = 0;
25
+ tagDescriptionEl.classList.replace('expanded', 'collapsed');
26
+ tagIconEl.classList.replace('expanded', 'collapsed');
27
+ } else {
28
+ tagDescriptionEl.style.maxHeight = `${tagDescriptionEl.scrollHeight}px`;
29
+ tagDescriptionEl.classList.replace('collapsed', 'expanded');
30
+ tagIconEl.classList.replace('collapsed', 'expanded');
31
+ }
32
+ }
33
+ }
34
+
35
+ export function expandedEndpointBodyTemplate(path, tagName = '', tagDescription = '') {
19
36
  const acceptContentTypes = new Set();
20
37
  for (const respStatus in path.responses) {
21
38
  for (const acceptContentType in (path.responses[respStatus]?.content)) {
@@ -37,7 +54,26 @@ export function expandedEndpointBodyTemplate(path, tagName = '') {
37
54
  return html`
38
55
  ${this.renderStyle === 'read' ? html`<div class='divider' part="operation-divider"></div>` : ''}
39
56
  <div class='expanded-endpoint-body observe-me ${path.method} ${path.deprecated ? 'deprecated' : ''} ' part="section-operation ${path.elementId}" id='${path.elementId}'>
40
- ${(this.renderStyle === 'focused' && tagName !== 'General ⦂') ? html`<h3 class="upper" style="font-weight:bold" part="section-operation-tag"> ${tagName} </h3>` : ''}
57
+ ${(this.renderStyle === 'focused' && tagName !== 'General ⦂')
58
+ ? html`
59
+ <div class="tag-container" part="section-operation-tag">
60
+ <span class="upper" style="font-weight:bold; font-size:18px;"> ${tagName} </span>
61
+ ${tagDescription
62
+ ? html`
63
+ <svg class="tag-icon collapsed" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" style="stroke:var(--primary-color); vertical-align:top; cursor:pointer"
64
+ @click="${(e) => { expandCollapseTagDescription.call(this, e); }}"
65
+ >
66
+ <path d="M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8"></path><path d="M18 4v17"></path><path d="M15 18l3 3l3 -3"></path>
67
+ </svg>
68
+ <div class="tag-description collapsed" style="max-height:0px; overflow:hidden; margin-top:16px; border:1px solid var(--border-color)">
69
+ <div class="m-markdown" style="padding:8px"> ${unsafeHTML(marked(tagDescription))}</div>
70
+ </div>`
71
+ : ''
72
+ }
73
+ </div>
74
+ `
75
+ : ''
76
+ }
41
77
  ${path.deprecated ? html`<div class="bold-text red-text"> DEPRECATED </div>` : ''}
42
78
  ${html`
43
79
  ${path.xBadges && path.xBadges?.length > 0
@@ -53,10 +89,10 @@ export function expandedEndpointBodyTemplate(path, tagName = '') {
53
89
  }
54
90
  <h2 part="section-operation-summary"> ${path.shortSummary || `${path.method.toUpperCase()} ${path.path}`}</h2>
55
91
  ${path.isWebhook
56
- ? html`<span part="section-operation-webhook style="color:var(--primary-color); font-weight:bold; font-size: var(--font-size-regular);"> WEBHOOK </span>`
92
+ ? html`<span part="section-operation-webhook" style="color:var(--primary-color); font-weight:bold; font-size: var(--font-size-regular);"> WEBHOOK </span>`
57
93
  : html`
58
- <div class='mono-font part="section-operation-webhook-method" regular-font-size' style='text-align:left; direction:ltr; padding: 8px 0; color:var(--fg3)'>
59
- <span part="label-operation-method" class='regular-font upper method-fg bold-text ${path.method}'>${path.method}</span>
94
+ <div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left; direction:ltr; padding: 8px 0; color:var(--fg3)">
95
+ <span part="label-operation-method" class="regular-font upper method-fg bold-text ${path.method}">${path.method}</span>
60
96
  <span part="label-operation-path">${path.path}</span>
61
97
  </div>
62
98
  `
@@ -65,6 +101,18 @@ export function expandedEndpointBodyTemplate(path, tagName = '') {
65
101
  }
66
102
  ${path.description ? html`<div class="m-markdown"> ${unsafeHTML(marked(path.description))}</div>` : ''}
67
103
  ${pathSecurityTemplate.call(this, path.security)}
104
+ ${path.externalDocs?.url || path.externalDocs?.description
105
+ ? html`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
106
+ <div class="m-markdown"> ${unsafeHTML(marked(path.externalDocs?.description || ''))} </div>
107
+ ${path.externalDocs?.url
108
+ ? html`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${path.externalDocs?.url}" target="_blank">
109
+ ${path.externalDocs?.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
110
+ </a>`
111
+ : ''
112
+ }
113
+ </div>`
114
+ : ''
115
+ }
68
116
  ${codeSampleTabPanel}
69
117
  <div class='expanded-req-resp-container'>
70
118
  <api-request
@@ -81,6 +129,7 @@ export function expandedEndpointBodyTemplate(path, tagName = '') {
81
129
  server-url = "${path.servers?.[0]?.url || this.selectedServer.computedUrl}"
82
130
  fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
83
131
  allow-try = "${this.allowTry}"
132
+ show-curl-before-try = "${this.showCurlBeforeTry}"
84
133
  accept = "${accept}"
85
134
  render-style="${this.renderStyle}"
86
135
  schema-style = "${this.schemaStyle}"
@@ -91,7 +140,7 @@ export function expandedEndpointBodyTemplate(path, tagName = '') {
91
140
  schema-hide-read-only = "${this.schemaHideReadOnly === 'never' ? 'false' : path.isWebhook ? 'false' : 'true'}"
92
141
  schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'true' : 'false'}"
93
142
  fetch-credentials = "${this.fetchCredentials}"
94
- exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
143
+ exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
95
144
  file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
96
145
  anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
97
146
  > </api-request>
@@ -136,8 +185,8 @@ export default function expandedEndpointTemplate() {
136
185
  }
137
186
  </div>
138
187
  </section>
139
- <section class='regular-font section-gap--read-mode' part="section-operations-in-tag">
140
- ${tag.paths.map((path) => expandedEndpointBodyTemplate.call(this, path, 'BBB'))}
188
+ <section class="regular-font section-gap--read-mode" part="section-operations-in-tag">
189
+ ${tag.paths.map((path) => expandedEndpointBodyTemplate.call(this, path))}
141
190
  </section>
142
191
  `)
143
192
  }
@@ -96,7 +96,10 @@ export default function focusedEndpointTemplate() {
96
96
  // In focused mode we must expand the nav-bar tag element if it is collapsed
97
97
  const newNavEl = this.shadowRoot.getElementById(`link-${focusElId}`);
98
98
  expandCollapseNavBarTag(newNavEl, 'expand');
99
- focusedTemplate = wrapFocusedTemplate.call(this, expandedEndpointBodyTemplate.call(this, selectedPathObj, selectedTagObj.name));
99
+ focusedTemplate = wrapFocusedTemplate.call(
100
+ this,
101
+ expandedEndpointBodyTemplate.call(this, selectedPathObj, (selectedTagObj.name || ''), (selectedTagObj.description || '')),
102
+ );
100
103
  } else {
101
104
  // if focusedElementId is not found then show the default content (overview or first-path)
102
105
  focusedTemplate = defaultContentTemplate.call(this);
@@ -23,7 +23,7 @@ export default function headerTemplate() {
23
23
  part="textbox textbox-spec-url"
24
24
  placeholder="Spec URL"
25
25
  value="${this.specUrl || ''}"
26
- @change="${this.onSepcUrlChange}"
26
+ @change="${this.onSpecUrlChange}"
27
27
  spellcheck="false"
28
28
  >
29
29
  <div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">&#x21a9;</div>
@@ -37,7 +37,7 @@ export default function headerTemplate() {
37
37
  type="file"
38
38
  style="display:none"
39
39
  value="${this.specFile || ''}"
40
- @change="${this.onSepcFileChange}"
40
+ @change="${this.onSpecFileChange}"
41
41
  spellcheck="false"
42
42
  >
43
43
  <button class="m-btn primary only-large-screen" style="margin-left:10px;" part="btn btn-fill" @click="${this.onFileLoadClick}"> LOCAL JSON FILE </button>
@@ -63,7 +63,7 @@ function jsonSchemaBodyTemplate() {
63
63
  .data = "${schemaInObjectNotation(jSchemaBody.schema, {})}"
64
64
  schema-expand-level = "${this.schemaExpandLevel}"
65
65
  schema-description-expanded = "${this.schemaDescriptionExpanded}"
66
- allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}",
66
+ allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
67
67
  schema-hide-read-only = "false"
68
68
  schema-hide-write-only = "false"
69
69
  > </schema-tree>
@@ -113,6 +113,7 @@ export default function jsonSchemaViewerTemplate(isMini = false) {
113
113
  navHoverBgColor: isValidHexColor(this.navHoverBgColor) ? this.navHoverBgColor : '',
114
114
  navHoverTextColor: isValidHexColor(this.navHoverTextColor) ? this.navHoverTextColor : '',
115
115
  navAccentColor: isValidHexColor(this.navAccentColor) ? this.navAccentColor : '',
116
+ navAccenttextColor: isValidHexColor(this.navAccentTextColor) ? this.navAccentTextColor : '',
116
117
  };
117
118
  /* eslint-disable indent */
118
119
  if (this.resolvedSpec.specLoadError) {
@@ -30,24 +30,25 @@ export default function mainBodyTemplate(isMini = false, showExpandCollapse = tr
30
30
  navHoverBgColor: isValidHexColor(this.navHoverBgColor) ? this.navHoverBgColor : '',
31
31
  navHoverTextColor: isValidHexColor(this.navHoverTextColor) ? this.navHoverTextColor : '',
32
32
  navAccentColor: isValidHexColor(this.navAccentColor) ? this.navAccentColor : '',
33
+ navAccentTextColor: isValidHexColor(this.navAccentTextColor) ? this.navAccentTextColor : '',
33
34
  };
34
35
  /* eslint-disable indent */
35
36
  if (this.resolvedSpec.specLoadError) {
36
37
  if (isMini) {
37
38
  return html`
38
39
  ${this.theme === 'dark' ? SetTheme.call(this, 'dark', newTheme) : SetTheme.call(this, 'light', newTheme)}
39
- <div style="display:flex; align-items:center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
40
+ <div style='display:flex; align-items:center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)'> ${this.resolvedSpec.info.description} </div>
40
41
  `;
41
42
  }
42
43
  return html`
43
44
  ${this.theme === 'dark' ? SetTheme.call(this, 'dark', newTheme) : SetTheme.call(this, 'light', newTheme)}
44
45
  <!-- Header -->
45
46
  ${headerTemplate.call(this)}
46
- <main class="main-content regular-font" part="section-main-content">
47
+ <main class='main-content regular-font' part='section-main-content'>
47
48
  <slot></slot>
48
- <div style="margin:24px; text-align: center;">
49
- <h1 style="color: var(--red)"> ${this.resolvedSpec.info.title} </h1>
50
- <div style="font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
49
+ <div style='margin:24px; text-align: center;'>
50
+ <h1 style='color: var(--red)'> ${this.resolvedSpec.info.title} </h1>
51
+ <div style='font-family:var(--font-mono)'> ${this.resolvedSpec.info.description} </div>
51
52
  </div>
52
53
  </main>
53
54
  `;
@@ -55,12 +56,12 @@ export default function mainBodyTemplate(isMini = false, showExpandCollapse = tr
55
56
  if (this.resolvedSpec.isSpecLoading) {
56
57
  return html`
57
58
  ${this.theme === 'dark' ? SetTheme.call(this, 'dark', newTheme) : SetTheme.call(this, 'light', newTheme)}
58
- <main class="main-content regular-font" part="section-main-content">
59
+ <main class='main-content regular-font' part='section-main-content'>
59
60
  <slot></slot>
60
- <div class="main-content-inner--${this.renderStyle}-mode">
61
- <div class="loader"></div>
61
+ <div class='main-content-inner--${this.renderStyle}-mode'>
62
+ <div class='loader'></div>
62
63
  </div>
63
- </main>
64
+ </main>
64
65
  `;
65
66
  }
66
67
 
@@ -73,7 +74,7 @@ export default function mainBodyTemplate(isMini = false, showExpandCollapse = tr
73
74
  <!-- Advanced Search -->
74
75
  ${this.allowAdvancedSearch === 'false' ? '' : advancedSearchTemplate.call(this)}
75
76
 
76
- <div id='the-main-body' class="body ${this.cssClasses}" dir= ${this.pageDirection} >
77
+ <div id='the-main-body' class='body ${this.cssClasses}' dir='${this.pageDirection}' >
77
78
  <!-- Side Nav -->
78
79
  ${((this.renderStyle === 'read' || this.renderStyle === 'focused')
79
80
  && this.showSideNav === 'true'
@@ -82,24 +83,24 @@ export default function mainBodyTemplate(isMini = false, showExpandCollapse = tr
82
83
  }
83
84
 
84
85
  <!-- Main Content -->
85
- <main class="main-content regular-font" part="section-main-content">
86
+ <main class='main-content regular-font' tabindex='-1' part='section-main-content'>
86
87
  <slot></slot>
87
- <div class="main-content-inner--${this.renderStyle}-mode">
88
+ <div class='main-content-inner--${this.renderStyle}-mode'>
88
89
  ${this.loading === true
89
- ? html`<div class="loader"></div>`
90
+ ? html`<div class='loader'></div>`
90
91
  : html`
91
92
  ${this.loadFailed === true
92
- ? html`<div style="text-align: center;margin: 16px;"> Unable to load the Spec</div>`
93
+ ? html`<div style='text-align: center;margin: 16px;'> Unable to load the Spec</div>`
93
94
  : html`
94
- <div class="operations-root" @click="${(e) => { this.handleHref(e); }}">
95
+ <div class='operations-root' @click='${(e) => { this.handleHref(e); }}'>
95
96
  ${this.renderStyle === 'focused'
96
97
  ? html`${focusedEndpointTemplate.call(this)}`
97
98
  : html`
98
99
  ${this.showInfo === 'true' ? overviewTemplate.call(this) : ''}
99
100
  ${this.allowServerSelection === 'true' ? serverTemplate.call(this) : ''}
100
101
  ${this.allowAuthentication === 'true' ? securitySchemeTemplate.call(this) : ''}
101
- <div id="operations-top" class="observe-me">
102
- <slot name="operations-top"></slot>
102
+ <div id='operations-top' class='observe-me'>
103
+ <slot name='operations-top'></slot>
103
104
  </div>
104
105
  ${this.renderStyle === 'read'
105
106
  ? expandedEndpointTemplate.call(this)
@@ -112,7 +113,7 @@ export default function mainBodyTemplate(isMini = false, showExpandCollapse = tr
112
113
  }`
113
114
  }
114
115
  </div>
115
- <slot name="footer"></slot>
116
+ <slot name='footer'></slot>
116
117
  </main>
117
118
  </div>
118
119
  `;