ParserConfig class

The configuration that the OpenApiParser uses

Constructors

ParserConfig(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 [], List<ReplacementRule> replacementRulesForRawSchema = const [], bool useXNullable = false, List<String> excludeTags = const <String>[], List<String> includeTags = const <String>[], List<String>? includePaths, String fallbackClient = 'fallback', bool inferRequiredFromNullable = false, bool preserveSchemaCasing = 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
excludeTags → List<String>
Optional. Set excluded tags.
final
fallbackClient → String
DART ONLY Optional. Fallback client name for endpoints without tags.
final
fileContent → String
Specification file content as String
final
hashCode → int
The hash code for this object.
no setterinherited
includePaths → List<String>?
Optional. Set included paths.
final
includeTags → List<String>
Optional. Set included tags.
final
inferRequiredFromNullable → bool
When true, infer required properties from nullability. Properties without nullable: true in schema are marked as required. Only applies when schema has no explicit required array.
final
isJson → bool
Set true if your specification is json. Set false 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. if false, use operationId.
final
preserveSchemaCasing → bool
When true, schema and enum names are projected by stripping separator characters while preserving the casing of every other character.
final
replacementRules → List<ReplacementRule>
Optional. Set regex replacement rules for the names of the generated classes/enums. All rules are applied in order.
final
replacementRulesForRawSchema → List<ReplacementRule>
Optional. Set raw regex replacement rules for the names of the raw schema objects.
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