ParserConfig class
The configuration that the OpenApiParser uses
Constructors
-
ParserConfig.new(String fileContent, {required bool isJson, String? name, String defaultContentType = 'application/json', bool pathMethodName = false, bool mergeClients = false, bool enumsParentPrefix = true, List<
String> skippedParameters = const <String>[], List<ReplacementRule> replacementRules = const [], bool useXNullable = false}) -
Creates a ParserConfig.
const
Properties
- defaultContentType → String
-
DART ONLY
Default content type for all requests and responses.
final
- enumsParentPrefix → bool
-
Set 'true' to set enum prefix from parent component.
final
- fileContent → String
-
Specification file content as String
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isJson → bool
-
Set
true
if your specification is json. Setfalse
if yaml.final - mergeClients → bool
-
Set
true
to merge all clients in single client.final - name → String?
-
Optional. Set API name for folder and export file.
If not specified, the file name is used.
final
- pathMethodName → bool
-
If
true
, use the endpoint path for the method name. iffalse
, useoperationId
.final -
replacementRules
→ List<
ReplacementRule> -
Optional. Set regex replacement rules for the names of the generated classes/enums.
All rules are applied in order.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
skippedParameters
→ List<
String> -
List of parameter names that should skip during parsing
final
- useXNullable → bool
-
Does the Schema use x-nullable to indicate nullable fields
Only used for OpenApi v2
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited