builder/helper library

Functions

assembleDartDocComment(List<String?> lineList) String
Assembles a Dart documentation comment from a list of strings.
extractRefsFromOperation(Map<String, SwaggerResponse> responses, List<SwaggerRequestParameter> parameters) Map<String, String>
Extracts $ref values from Swagger responses and parameters and maps them to readable strings.
formatDocument(String targetPath) Future<void>
Formats a Dart document using the dart format command.
getImportRelativePath(String from, String to) String
Gets the relative import path between two file paths and normalizes it for Dart imports.
resolveFileList(String rootPath) Future<List<TFileInfo>>
Resolves and processes a list of .swagger.json files in the specified directory.
safeWriteFileAsync(String targetPath, String content) Future<void>
Writes content to a file asynchronously, ensuring the parent directory exists.
verifyParameterList(List<SwaggerRequestParameter> parameterList) → void
Verifies the validity of a list of SwaggerRequestParameter objects based on their inParameter type.