Complete OpenAPI 3.0/3.1 generation, diagnostics, lifecycle safety, enum and naming mappings, bilingual documentation, examples, and pub.dev release validation.
3.7 KiB
3.7 KiB
Changelog
All notable changes to this package are documented in this file.
English | Chinese (Simplified)
0.2.0 - 2026-07-31
Breaking changes
- The primary library no longer exports parser IR implementation types such as
DartType,ModelSpec,ApiOperation,GeneratedFile, andGeneratedBundle. UseKoiSwaggerParserand its documentedGenerationResultinstead. KoiSwaggerConfigLoaderis no longer exported. UseKoiSwaggerConfig.load()to load configuration programmatically.
Added
- Structured configuration, OpenAPI, filtering, and lifecycle diagnostics; errors no longer silently produce known-invalid code.
- Local, relative, file, and HTTP(S)
$refresolution with caching, cycle detection, dependency tracking, external component bundling, and deterministic multi-source conflict handling. enum_mappings, legacyenum_key_mappings, commonx-enumextensions, descriptions, and optional unknown enum fallback.- Model, property, parameter, operation, schema, type, and import mappings with collision validation.
- OpenAPI path, query, header, and cookie parameter serialization, including
supported matrix, label, form, simple, space-delimited, pipe-delimited,
deep-object, explode, and
allowReservedcombinations. - JSON, text, multipart, form-urlencoded, and binary uploads; byte and stream downloads.
- Multiple successful responses, 204,
2XX,default, error models, response headers, andHttpResponse<T>mode. - Required, nullable, and absent-value semantics; read-only/write-only
projections; root
propertiesplusadditionalPropertiesround trips. allOf, discriminator unions, and supported primitive, container, and objectoneOf/anyOfunions.- Server variables, security schemes, and operation OR/AND security metadata.
- Exact, glob, and regular-expression filters for tags, paths, operations, and models.
- A locked manifest, spec/config/content SHA-256 hashes, unchanged generation skipping, safe stale cleanup, atomic writes, and dry-run change plans.
- Built-in build_runner build/watch integration, reviewed golden output, OpenAPI 3.0/3.1 fixtures, and temporary generated-package verification.
- English canonical documentation with a complete Simplified Chinese mirror, a configuration reference, compatibility matrix, diagnostics reference, and migration guide.
Changed
GenerationResult.writtenFilesnow contains only files actually written;generatedFilescontains the complete target set. Dry runs usewouldWriteFilesandwouldDeleteFiles.- When a configuration file is passed explicitly and neither
workingDirectorynor--cwdis set, its directory becomes the host project working directory. - A
defaultresponse is no longer treated as successful. XML, Protobuf, and other response media types without a safe decoder now produce diagnostics. dart fixanddart formatoperate only on primary generated files changed by the current run.- All non-test Dart declarations now satisfy
public_member_api_docswithout file-level exclusions, including internal IR and lifecycle types.
Fixed
- Made
formatting.run_dart_fixandoutput.extract_version_from_urleffective. - Avoided Dio/Retrofit
Headersimport conflicts, missing Freezed customtoJsonmethods, and parameter, field, and method mapping collisions. - Synchronized the generator version recorded in lifecycle manifests with the
package's
0.2.0version.
0.1.0 - 2026-06-02
- Initial release of
koi_swagger_parser. - Added common OpenAPI 3.1/FastAPI parsing, Koi-style Retrofit API generation, and Freezed model generation.
- Added compatibility loading for legacy
generator_config.yamlfiles.