Expose Examples RESTler compile configuration options (#205)
Co-authored-by: stas <statis@microsoft.com>
This commit is contained in:
Родитель
f2ec419086
Коммит
a89f22c4d5
|
@ -4,9 +4,9 @@ variables:
|
|||
- name: version.minor
|
||||
value: 0
|
||||
- name: version.revision
|
||||
value: 0
|
||||
value: 1
|
||||
- name: imageTag
|
||||
value: 'v4.0.0'
|
||||
value: 'v4.0.1'
|
||||
- name: imageTagLatest
|
||||
value: 'v4.latest'
|
||||
- name: devRevision
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
"toolName": "RESTler",
|
||||
"outputFolder": "compile",
|
||||
"toolConfiguration": {
|
||||
"task": "Compile"
|
||||
"task": "Compile",
|
||||
"compileConfiguration" : {
|
||||
"discoverExamples" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -348,32 +348,32 @@ let createRESTlerCompilerConfiguration (workDirectory: string) (grammar: Grammar
|
|||
// If specified, update the engine settings with hints derived from the grammar.
|
||||
EngineSettingsFilePath = None
|
||||
|
||||
IncludeOptionalParameters = true
|
||||
IncludeOptionalParameters = compileConfig.IncludeOptionalParameters
|
||||
|
||||
UseQueryExamples = true
|
||||
UseQueryExamples = compileConfig.UseQueryExamples
|
||||
|
||||
UseBodyExamples = true
|
||||
UseBodyExamples = compileConfig.UseBodyExamples
|
||||
|
||||
/// When set to 'true', discovers examples and outputs them to a directory next to the grammar.
|
||||
/// If an existing directory exists, does not over-write it.
|
||||
DiscoverExamples = true
|
||||
DiscoverExamples = compileConfig.DiscoverExamples
|
||||
|
||||
/// The directory where the compiler should look for examples.
|
||||
/// If 'discoverExamples' is true, this directory will contain the
|
||||
/// example files that have been discovered.
|
||||
/// If 'discoverExamples' is false, every time an example is used in the
|
||||
/// Swagger file, RESTler will first look for it in this directory.
|
||||
ExamplesDirectory = workDirectory ++ "Examples"
|
||||
ExamplesDirectory = match compileConfig.ExamplesDirectory with None -> workDirectory ++ "Examples" | Some d -> d
|
||||
|
||||
/// Perform data fuzzing
|
||||
DataFuzzing = true
|
||||
DataFuzzing = compileConfig.DataFuzzing
|
||||
|
||||
// When true, only fuzz the GET requests
|
||||
ReadOnlyFuzz = compileConfig.ReadOnlyFuzz
|
||||
|
||||
ResolveQueryDependencies = true
|
||||
ResolveQueryDependencies = compileConfig.ResolveQueryDependencies
|
||||
|
||||
ResolveBodyDependencies = true
|
||||
ResolveBodyDependencies = compileConfig.ResolveBodyDependencies
|
||||
|
||||
UseRefreshableToken = compileConfig.UseRefreshableToken
|
||||
|
||||
|
|
|
@ -56,17 +56,35 @@ type CompileConfiguration =
|
|||
MutationsSeed : int64 option
|
||||
|
||||
CustomDictionary: CustomDictionary option
|
||||
|
||||
DiscoverExamples : bool
|
||||
ExamplesDirectory : string option
|
||||
|
||||
DataFuzzing : bool
|
||||
ResolveQueryDependencies: bool
|
||||
ResolveBodyDependencies : bool
|
||||
UseBodyExamples : bool
|
||||
UseQueryExamples : bool
|
||||
IncludeOptionalParameters : bool
|
||||
}
|
||||
|
||||
static member Empty : CompileConfiguration =
|
||||
{
|
||||
InputJsonGrammarPath = None;
|
||||
InputFolderPath = None;
|
||||
ReadOnlyFuzz = false;
|
||||
AllowGetProducers = false;
|
||||
UseRefreshableToken = false;
|
||||
InputJsonGrammarPath = None
|
||||
InputFolderPath = None
|
||||
ReadOnlyFuzz = false
|
||||
AllowGetProducers = false
|
||||
UseRefreshableToken = false
|
||||
MutationsSeed = None;
|
||||
CustomDictionary = None
|
||||
DiscoverExamples = true
|
||||
ExamplesDirectory = None
|
||||
DataFuzzing = true
|
||||
ResolveQueryDependencies = true
|
||||
ResolveBodyDependencies = true
|
||||
UseBodyExamples = true
|
||||
UseQueryExamples = true
|
||||
IncludeOptionalParameters = true
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче