@@ -7,19 +7,22 @@ public class FileNameGenerator
7
7
8
8
public FileNames GenerateFileNames ( string baseFileName )
9
9
{
10
+ if ( baseFileName . Length > 0 )
11
+ baseFileName += "-" ;
12
+
10
13
// generate useable object with file names for consistency throughout project
11
14
return new FileNames ( )
12
15
{
13
- apiVersionSets = $@ "/{ baseFileName } - apiVersionSets.template.json",
14
- authorizationServers = $@ "/{ baseFileName } - authorizationServers.template.json",
15
- backends = $@ "/{ baseFileName } - backends.template.json",
16
- globalServicePolicy = $@ "/{ baseFileName } - globalServicePolicy.template.json",
17
- loggers = $@ "/{ baseFileName } - loggers.template.json",
18
- namedValues = $@ "/{ baseFileName } - namedValues.template.json",
19
- tags = $@ "/{ baseFileName } - tags.template.json",
20
- products = $@ "/{ baseFileName } - products.template.json",
21
- parameters = $@ "/{ baseFileName } - parameters.json",
22
- linkedMaster = $@ "/{ baseFileName } - master.template.json",
16
+ apiVersionSets = $@ "/{ baseFileName } apiVersionSets.template.json",
17
+ authorizationServers = $@ "/{ baseFileName } authorizationServers.template.json",
18
+ backends = $@ "/{ baseFileName } backends.template.json",
19
+ globalServicePolicy = $@ "/{ baseFileName } globalServicePolicy.template.json",
20
+ loggers = $@ "/{ baseFileName } loggers.template.json",
21
+ namedValues = $@ "/{ baseFileName } namedValues.template.json",
22
+ tags = $@ "/{ baseFileName } tags.template.json",
23
+ products = $@ "/{ baseFileName } products.template.json",
24
+ parameters = $@ "/{ baseFileName } parameters.json",
25
+ linkedMaster = $@ "/{ baseFileName } master.template.json",
23
26
apis = "/Apis" ,
24
27
splitAPIs = "/SplitAPIs" ,
25
28
versionSetMasterFolder = "/VersionSetMasterFolder" ,
@@ -29,23 +32,27 @@ public FileNames GenerateFileNames(string baseFileName)
29
32
} ;
30
33
}
31
34
32
- public string GenerateCreatorAPIFileName ( string apiName , bool isSplitAPI , bool isInitialAPI , string apimServiceName )
35
+ public string GenerateCreatorAPIFileName ( string apiName , bool isSplitAPI , bool isInitialAPI )
33
36
{
34
37
// in case the api name has been appended with ;rev={revisionNumber}, take only the api name initially provided by the user in the creator config
35
38
string sanitizedAPIName = GenerateOriginalAPIName ( apiName ) ;
39
+
36
40
if ( isSplitAPI == true )
37
41
{
38
- return isInitialAPI == true ? $@ "/{ apimServiceName } - { sanitizedAPIName } -initial.api.template.json" : $@ "/{ apimServiceName } - { sanitizedAPIName } -subsequent.api.template.json";
42
+ return isInitialAPI == true ? $@ "/{ sanitizedAPIName } -initial.api.template.json" : $@ "/{ sanitizedAPIName } -subsequent.api.template.json";
39
43
}
40
44
else
41
45
{
42
- return $@ "/{ apimServiceName } - { sanitizedAPIName } .api.template.json";
46
+ return $@ "/{ sanitizedAPIName } .api.template.json";
43
47
}
44
48
}
45
49
46
50
public string GenerateExtractorAPIFileName ( string singleAPIName , string baseFileName )
47
51
{
48
- return singleAPIName == null ? $@ "/{ baseFileName } -apis.template.json" : $@ "/{ baseFileName } -{ singleAPIName } -api.template.json";
52
+ if ( baseFileName . Length > 0 )
53
+ baseFileName += "-" ;
54
+
55
+ return singleAPIName == null ? $@ "/{ baseFileName } apis.template.json" : $@ "/{ baseFileName } { singleAPIName } -api.template.json";
49
56
}
50
57
51
58
public string GenerateOriginalAPIName ( string apiName )
0 commit comments