@@ -308,25 +308,25 @@ export class DfServiceDetailsComponent implements OnInit {
308308 if ( ! data . config ) {
309309 data . config = { } ;
310310 }
311-
311+
312312 // Helper function to detect if content is likely an OpenAPI/Swagger spec
313313 const isLikelyOpenApiSpec = ( content : string ) : boolean => {
314314 if ( ! content ) return false ;
315315 const trimmed = content . trim ( ) ;
316-
316+
317317 // Check for common OpenAPI/Swagger patterns
318318 const openApiPatterns = [
319- / ^ \s * \{ ? \s * [ " ' ] ? o p e n a p i [ " ' ] ? \s * : / i, // JSON or YAML openapi field
320- / ^ \s * \{ ? \s * [ " ' ] ? s w a g g e r [ " ' ] ? \s * : / i, // JSON or YAML swagger field
321- / ^ \s * o p e n a p i \s * : / im, // YAML format
322- / ^ \s * s w a g g e r \s * : / im, // YAML format
323- / [ " ' ] p a t h s [ " ' ] \s * : \s * \{ / i, // JSON paths object
324- / ^ \s * p a t h s \s * : / im // YAML paths
319+ / ^ \s * \{ ? \s * [ " ' ] ? o p e n a p i [ " ' ] ? \s * : / i, // JSON or YAML openapi field
320+ / ^ \s * \{ ? \s * [ " ' ] ? s w a g g e r [ " ' ] ? \s * : / i, // JSON or YAML swagger field
321+ / ^ \s * o p e n a p i \s * : / im, // YAML format
322+ / ^ \s * s w a g g e r \s * : / im, // YAML format
323+ / [ " ' ] p a t h s [ " ' ] \s * : \s * \{ / i, // JSON paths object
324+ / ^ \s * p a t h s \s * : / im, // YAML paths
325325 ] ;
326-
326+
327327 return openApiPatterns . some ( pattern => pattern . test ( trimmed ) ) ;
328328 } ;
329-
329+
330330 // Check if this is an old script service with content in the wrong place
331331 // Old structure: script content was in serviceDocByServiceId.content
332332 // New structure: script content should be in config.content, OpenAPI spec (if any) in serviceDocByServiceId.content
@@ -421,7 +421,7 @@ export class DfServiceDetailsComponent implements OnInit {
421421 this . isNetworkService = false ;
422422 this . isScriptService = false ;
423423 this . isFile = false ;
424-
424+
425425 // Find the service type to get its group
426426 const serviceType = this . serviceTypes . find ( st => st . name === type ) ;
427427 if ( serviceType && serviceType . group ) {
@@ -735,7 +735,8 @@ export class DfServiceDetailsComponent implements OnInit {
735735 related : 'service_doc_by_service_id' ,
736736 } ;
737737 // For script services, check if there's an OpenAPI spec
738- const openApiContent = this . getServiceDocByServiceIdControl ( 'content' ) ?. value ;
738+ const openApiContent =
739+ this . getServiceDocByServiceIdControl ( 'content' ) ?. value ;
739740 if ( openApiContent && openApiContent . trim ( ) ) {
740741 serviceDoc = {
741742 content : openApiContent ,
@@ -1003,7 +1004,8 @@ export class DfServiceDetailsComponent implements OnInit {
10031004 // Remove content from config as it's moved to service_doc_by_service_id
10041005 delete payload . config . content ;
10051006 } else if ( this . isScriptService ) {
1006- const openApiContent = this . getServiceDocByServiceIdControl ( 'content' ) ?. value ;
1007+ const openApiContent =
1008+ this . getServiceDocByServiceIdControl ( 'content' ) ?. value ;
10071009 if ( openApiContent && openApiContent . trim ( ) ) {
10081010 payload . service_doc_by_service_id = {
10091011 content : openApiContent ,
0 commit comments