@@ -55,12 +55,17 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
5555 * @attribute
5656 */
5757 baseUri : { type : String } ,
58+ /**
59+ * Optional, operation id that is render only for async api
60+ */
61+ operationId :{ type : String } ,
5862 _url : { type : String } ,
5963 _method : { type : String } ,
6064 _protocol : { type : String } ,
6165 _protocolVersion : { type : String } ,
6266 _operation : { type : Object } ,
63- _server : { type : Object }
67+ _server : { type : Object } ,
68+ _operationId :{ type : String }
6469 } ;
6570 }
6671
@@ -189,6 +194,14 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
189194 return null
190195 }
191196
197+ get operationId ( ) {
198+ return this . _operationId
199+ }
200+
201+ set operationId ( value ) {
202+ this . _operationId = value
203+ }
204+
192205 render ( ) {
193206 const { url, asyncServersNames } = this ;
194207 const isAsyncApi = this . _isAsyncAPI ( this . amf )
@@ -275,6 +288,7 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
275288 ${ this . _getMethodTemplate ( ) }
276289 < div class ="async-servers ">
277290 ${ this . _getAsyncPathTemplate ( ) }
291+ ${ this . _getOperationIdTemplate ( ) }
278292 ${ this . _getAsyncServersNamesTemplate ( asyncServersNames ) }
279293 </ div >
280294 </ section >
@@ -289,6 +303,15 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
289303 return '' ;
290304 }
291305
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+
292315 _getAsyncServersNamesTemplate ( asyncServersNames ) {
293316 const { _method } = this ;
294317 if ( asyncServersNames && ! ! _method ) {
0 commit comments