@@ -55,12 +55,17 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
55
55
* @attribute
56
56
*/
57
57
baseUri : { type : String } ,
58
+ /**
59
+ * Optional, operation id that is render only for async api
60
+ */
61
+ operationId :{ type : String } ,
58
62
_url : { type : String } ,
59
63
_method : { type : String } ,
60
64
_protocol : { type : String } ,
61
65
_protocolVersion : { type : String } ,
62
66
_operation : { type : Object } ,
63
- _server : { type : Object }
67
+ _server : { type : Object } ,
68
+ _operationId :{ type : String }
64
69
} ;
65
70
}
66
71
@@ -189,6 +194,14 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
189
194
return null
190
195
}
191
196
197
+ get operationId ( ) {
198
+ return this . _operationId
199
+ }
200
+
201
+ set operationId ( value ) {
202
+ this . _operationId = value
203
+ }
204
+
192
205
render ( ) {
193
206
const { url, asyncServersNames } = this ;
194
207
const isAsyncApi = this . _isAsyncAPI ( this . amf )
@@ -275,6 +288,7 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
275
288
${ this . _getMethodTemplate ( ) }
276
289
< div class ="async-servers ">
277
290
${ this . _getAsyncPathTemplate ( ) }
291
+ ${ this . _getOperationIdTemplate ( ) }
278
292
${ this . _getAsyncServersNamesTemplate ( asyncServersNames ) }
279
293
</ div >
280
294
</ section >
@@ -289,6 +303,15 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
289
303
return '' ;
290
304
}
291
305
306
+ _getOperationIdTemplate ( ) {
307
+ const { operationId } = this ;
308
+ if ( operationId ) {
309
+ return html `< div class ="async-server-names-container ">
310
+ < span class ="async-server-names-title "> Operation ID: ${ operationId } </ span > </ div > `
311
+ }
312
+ return html ``
313
+ }
314
+
292
315
_getAsyncServersNamesTemplate ( asyncServersNames ) {
293
316
const { _method } = this ;
294
317
if ( asyncServersNames && ! ! _method ) {
0 commit comments