This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,7 @@ You have two choices when specifying your settings:
382
382
| paramApiLoggerId | No | Set to "true" will parameterize all logger ids in all apis (within api templates) |
383
383
| paramLogResourceId | No | Set to "true" will parameterize all loggers' resource ids (within logger template)|
384
384
| serviceBaseUrl | No | Specify the base url where you want to run your extractor |
385
+ | notIncludeNamedValue | No | Set to "true" will not generate Named Value Templates|
385
386
386
387
#### Note
387
388
* Can not use "splitAPIs" and "apiName" at the same time, since using "apiName" only extract one API
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ public async Task<string> GetPropertyDetailsAsync(string ApiManagementName, stri
31
31
32
32
public async Task < Template > GenerateNamedValuesTemplateAsync ( string singleApiName , List < TemplateResource > apiTemplateResources , Extractor exc )
33
33
{
34
+ if ( exc . notIncludeNamedValue == true )
35
+ {
36
+ Console . WriteLine ( "------------------------------------------" ) ;
37
+ Console . WriteLine ( "Skipping extracting named values from service" ) ;
38
+ return GenerateEmptyPropertyTemplateWithParameters ( exc ) ;
39
+ }
40
+
34
41
Console . WriteLine ( "------------------------------------------" ) ;
35
42
Console . WriteLine ( "Extracting named values from service" ) ;
36
43
Template armTemplate = GenerateEmptyPropertyTemplateWithParameters ( exc ) ;
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ public class ExtractorConfig
46
46
public string paramLogResourceId { get ; set ; }
47
47
[ Description ( "Specify the the base url for calling api management" ) ]
48
48
public string serviceBaseUrl { get ; set ; }
49
+ [ Description ( "Should not include named values template" ) ]
50
+ public string notIncludeNamedValue { get ; set ; }
51
+
49
52
public void Validate ( )
50
53
{
51
54
if ( string . IsNullOrEmpty ( sourceApimName ) ) throw new ArgumentException ( "Missing parameter <sourceApimName>." ) ;
@@ -104,6 +107,7 @@ public class Extractor
104
107
public bool paramNamedValue { get ; private set ; }
105
108
public bool paramApiLoggerId { get ; private set ; }
106
109
public bool paramLogResourceId { get ; private set ; }
110
+ public bool notIncludeNamedValue { get ; private set ; }
107
111
108
112
public Extractor ( ExtractorConfig exc , string dirName )
109
113
{
@@ -123,6 +127,7 @@ public Extractor(ExtractorConfig exc, string dirName)
123
127
this . paramNamedValue = exc . paramNamedValue != null && exc . paramNamedValue . Equals ( "true" ) ;
124
128
this . paramApiLoggerId = exc . paramApiLoggerId != null && exc . paramApiLoggerId . Equals ( "true" ) ;
125
129
this . paramLogResourceId = exc . paramLogResourceId != null && exc . paramLogResourceId . Equals ( "true" ) ;
130
+ this . notIncludeNamedValue = exc . notIncludeNamedValue != null && exc . notIncludeNamedValue . Equals ( "true" ) ;
126
131
}
127
132
128
133
public Extractor ( ExtractorConfig exc ) : this ( exc , exc . fileFolder )
You can’t perform that action at this time.
0 commit comments