SwaggerParserRunner class final
Runs the configured OpenAPI processing stages and generates Dart files.
Constructors
- SwaggerParserRunner({DartModelMapper mapper = const DartModelMapper(), ApiDefinitionExtractor extractor = const ApiDefinitionExtractor(), OpenApiParser parser = const OpenApiParser(), OpenApiValidator validator = const OpenApiValidator(), OpenApiReferenceResolver resolver = const OpenApiReferenceResolver(), ResolvedOperationValidator resolvedValidator = const ResolvedOperationValidator(), OpenApiNormalizer? normalizer, DartGenerator generator = const DartGenerator()})
-
Runs the supplied stages in parse-to-generation order.
const
Properties
- extractor → ApiDefinitionExtractor
-
Converts the document and reference graph into an API definition.
final
- generator → DartGenerator
-
Renders the mapped declarations into files.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- mapper → DartModelMapper
-
Maps the API definition to Dart declarations.
final
- normalizer → OpenApiNormalizer?
-
Optional transformation applied after initial validation.
final
- parser → OpenApiParser
-
Reads the input into a version-specific document.
final
- resolvedValidator → ResolvedOperationValidator
-
Checks effective operations after reference resolution.
final
- resolver → OpenApiReferenceResolver
-
Resolves references for extraction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- validator → OpenApiValidator
-
Checks the document before extraction.
final
Methods
-
generate(
SchemaSource source, {GenerationConfig config = const GenerationConfig(), ParseConfig? parseConfig, DocumentLoader? loader, void onValidationWarning(Diagnostic)?}) → Future< GenerationResult> -
Parses
sourceand generates Dart files.parseConfigapplies to the entry document and external references. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
SchemaSource source, {ParseConfig? parseConfig, DocumentLoader? loader}) → Future< List< Diagnostic> > -
Validates the document and its resolved operations.
parseConfigapplies to the entry document and external references.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited