@@ -38,7 +38,7 @@ import { OpenApiExtensionKey } from '@netcracker/qubership-apihub-api-unifier'
3838import { isRestDocument , isTextDocument } from '../apitypes'
3939
4040function extractTypeAndSubtype ( type : string ) : string {
41- return type . split ( '. ' ) [ 0 ]
41+ return type . split ( '; ' ) [ 0 ]
4242}
4343
4444async function prepareData ( file : File ) : Promise < ZippableDocument [ 'data' ] > {
@@ -107,15 +107,17 @@ export class ExportVersionStrategy implements BuilderStrategy {
107107
108108 buildResult . exportDocuments . push ( ...transformedDocuments )
109109
110- if ( buildResult . exportDocuments . length === 1 ) {
111- buildResult . exportFileName = createSingleFileExportName ( packageId , version , getDocumentTitle ( buildResult . exportDocuments [ 0 ] . fileId ) , format )
112- return buildResult
113- }
114-
115110 if ( format === HTML_EXPORT_GROUP_FORMAT ) {
116111 const readme = buildResult . exportDocuments . find ( ( { fileId} ) => fileId . toLowerCase ( ) === 'readme.md' ) ?. description
117112 buildResult . exportDocuments . push ( createExportDocument ( 'index.html' , await generateIndexHtmlPage ( packageId , version , generatedHtmlExportDocuments , readme ) ) )
118113 buildResult . exportDocuments . push ( ...await createCommonStaticExportDocuments ( packageId , version ) )
114+ buildResult . exportFileName = `${ packageId } _${ version } .zip`
115+ return buildResult
116+ }
117+
118+ if ( buildResult . exportDocuments . length === 1 ) {
119+ buildResult . exportFileName = createSingleFileExportName ( packageId , version , getDocumentTitle ( buildResult . exportDocuments [ 0 ] . fileId ) , format )
120+ return buildResult
119121 }
120122
121123 buildResult . exportFileName = `${ packageId } _${ version } .zip`
0 commit comments