@@ -46,9 +46,9 @@ function onExpandCollapseAll(e, action = 'expand-all') {
46
46
/* eslint-disable indent */
47
47
function endpointHeadTemplate ( path , pathsExpanded = false ) {
48
48
return html `
49
- < summary @click ="${ ( e ) => { toggleExpand . call ( this , path , e ) ; } } " part ="endpoint-head " class ='endpoint-head ${ path . method } ${ path . deprecated ? 'deprecated' : '' } ${ pathsExpanded || path . expanded ? 'expanded' : 'collapsed' } '>
50
- < div part ="endpoint-head-method " class ="method ${ path . method } ${ path . deprecated ? 'deprecated' : '' } "> ${ path . method } </ div >
51
- < div class ="path ${ path . deprecated ? 'deprecated' : '' } ">
49
+ < summary @click ="${ ( e ) => { toggleExpand . call ( this , path , e ) ; } } " part ="section- endpoint-head " class ='endpoint-head ${ path . method } ${ path . deprecated ? 'deprecated' : '' } ${ pathsExpanded || path . expanded ? 'expanded' : 'collapsed' } '>
50
+ < div part ="section- endpoint-head-method " class ="method ${ path . method } ${ path . deprecated ? 'deprecated' : '' } "> ${ path . method } </ div >
51
+ < div part =" section-endpoint-head-path " class ="path ${ path . deprecated ? 'deprecated' : '' } ">
52
52
${ path . path }
53
53
${ path . isWebhook ? html `< span style ="font-family: var(--font-regular); font-size: var(--); font-size: var(--font-size-small); color:var(--primary-color); margin-left: 16px "> Webhook</ span > ` : '' }
54
54
</ div >
@@ -62,7 +62,7 @@ function endpointHeadTemplate(path, pathsExpanded = false) {
62
62
${ this . showSummaryWhenCollapsed
63
63
? html `
64
64
< div class ="only-large-screen " style ="min-width:60px; flex:1 "> </ div >
65
- < div part ="endpoint-head-summary " class ="descr "> ${ path . summary || path . shortSummary } </ div > `
65
+ < div part ="section- endpoint-head-description " class ="descr "> ${ path . summary || path . shortSummary } </ div > `
66
66
: ''
67
67
}
68
68
</ summary >
@@ -88,27 +88,27 @@ function endpointBodyTemplate(path) {
88
88
89
89
const codeSampleTabPanel = path . xCodeSamples ? codeSamplesTemplate ( path . xCodeSamples ) : '' ;
90
90
return html `
91
- < div class ='endpoint-body ${ path . method } ${ path . deprecated ? 'deprecated' : '' } '>
91
+ < div part =" section-end-point-body " class ='endpoint-body ${ path . method } ${ path . deprecated ? 'deprecated' : '' } '>
92
92
< div class ="summary ">
93
93
${ path . summary
94
- ? html `< div class ="title "> ${ path . summary } < div > `
94
+ ? html `< div class ="title " part =" section-end-point-body-title " > ${ path . summary } < div > `
95
95
: path . shortSummary !== path . description
96
- ? html `< div class ="title "> ${ path . shortSummary } </ div > `
96
+ ? html `< div class ="title " part =" section-end-point-body-title " > ${ path . shortSummary } </ div > `
97
97
: ''
98
98
}
99
99
${ path . xBadges && path . xBadges ?. length > 0
100
100
? html `
101
101
< div style ="display:flex; flex-wrap:wrap;font-size: var(--font-size-small); ">
102
102
${ path . xBadges . map ( ( v ) => (
103
- html `< span style ="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${ v . color } , var(--input-bg)); color:var(--${ v . color } ); border:1px solid var(--${ v . color } ) "> ${ v . label } </ span > `
103
+ html `< span part =" endpoint-badge " style ="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${ v . color } , var(--input-bg)); color:var(--${ v . color } ); border:1px solid var(--${ v . color } ) "> ${ v . label } </ span > `
104
104
) )
105
105
}
106
106
</ div >
107
107
`
108
108
: ''
109
109
}
110
110
111
- ${ path . description ? html `< div class ="m-markdown "> ${ unsafeHTML ( marked ( path . description ) ) } </ div > ` : '' }
111
+ ${ path . description ? html `< div part =" section-end-point-body-description " class ="m-markdown "> ${ unsafeHTML ( marked ( path . description ) ) } </ div > ` : '' }
112
112
< slot name ="${ path . elementId } "> </ slot >
113
113
${ pathSecurityTemplate . call ( this , path . security ) }
114
114
${ codeSampleTabPanel }
@@ -141,7 +141,7 @@ function endpointBodyTemplate(path) {
141
141
fetch-credentials = "${ this . fetchCredentials } "
142
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,
143
143
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
144
- anchor:anchor, anchor-param-example:anchor-param-example "
144
+ anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle "
145
145
> </ api-request >
146
146
147
147
${ path . callbacks ? callbackTemplate . call ( this , path . callbacks ) : '' }
@@ -160,8 +160,9 @@ function endpointBodyTemplate(path) {
160
160
schema-hide-read-only = "${ path . isWebhook ? this . schemaHideWriteOnly : this . schemaHideReadOnly } "
161
161
schema-hide-write-only = "${ path . isWebhook ? this . schemaHideReadOnly : this . schemaHideWriteOnly } "
162
162
selected-status = "${ Object . keys ( path . responses || { } ) [ 0 ] || '' } "
163
- exportparts =
164
- "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input, 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 "
163
+ exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
164
+ 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,
165
+ schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle "
165
166
> </ api-response >
166
167
</ div >
167
168
</ div > ` ;
@@ -202,7 +203,7 @@ export default function endpointTemplate(showExpandCollapse = true, showTags = t
202
203
}
203
204
return true ;
204
205
} ) . map ( ( path ) => html `
205
- < section id ='${ path . elementId } ' class ='m-endpoint regular-font ${ path . method } ${ pathsExpanded || path . expanded ? 'expanded' : 'collapsed' } '>
206
+ < section part =" section-end-point " id ='${ path . elementId } ' class ='m-endpoint regular-font ${ path . method } ${ pathsExpanded || path . expanded ? 'expanded' : 'collapsed' } '>
206
207
${ endpointHeadTemplate . call ( this , path , pathsExpanded ) }
207
208
${ pathsExpanded || path . expanded ? endpointBodyTemplate . call ( this , path ) : '' }
208
209
</ section > ` )
0 commit comments