Files
mr.koi 454e6c51d7 Release 0.2.0
Complete OpenAPI 3.0/3.1 generation, diagnostics, lifecycle safety, enum and naming mappings, bilingual documentation, examples, and pub.dev release validation.
2026-07-31 16:47:39 +08:00

81 lines
3.7 KiB
Markdown

# Changelog
All notable changes to this package are documented in this file.
[English](CHANGELOG.md) | [Chinese (Simplified)](doc/zh-CN/CHANGELOG.md)
## 0.2.0 - 2026-07-31
### Breaking changes
- The primary library no longer exports parser IR implementation types such as
`DartType`, `ModelSpec`, `ApiOperation`, `GeneratedFile`, and
`GeneratedBundle`. Use `KoiSwaggerParser` and its documented
`GenerationResult` instead.
- `KoiSwaggerConfigLoader` is no longer exported. Use
`KoiSwaggerConfig.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) `$ref` resolution with caching, cycle
detection, dependency tracking, external component bundling, and
deterministic multi-source conflict handling.
- `enum_mappings`, legacy `enum_key_mappings`, common `x-enum` extensions,
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 `allowReserved` combinations.
- JSON, text, multipart, form-urlencoded, and binary uploads; byte and stream
downloads.
- Multiple successful responses, 204, `2XX`, `default`, error models, response
headers, and `HttpResponse<T>` mode.
- Required, nullable, and absent-value semantics; read-only/write-only
projections; root `properties` plus `additionalProperties` round trips.
- `allOf`, discriminator unions, and supported primitive, container, and object
`oneOf`/`anyOf` unions.
- 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.writtenFiles` now contains only files actually written;
`generatedFiles` contains the complete target set. Dry runs use
`wouldWriteFiles` and `wouldDeleteFiles`.
- When a configuration file is passed explicitly and neither
`workingDirectory` nor `--cwd` is set, its directory becomes the host project
working directory.
- A `default` response is no longer treated as successful. XML, Protobuf, and
other response media types without a safe decoder now produce diagnostics.
- `dart fix` and `dart format` operate only on primary generated files changed
by the current run.
- All non-test Dart declarations now satisfy `public_member_api_docs` without
file-level exclusions, including internal IR and lifecycle types.
### Fixed
- Made `formatting.run_dart_fix` and `output.extract_version_from_url`
effective.
- Avoided Dio/Retrofit `Headers` import conflicts, missing Freezed custom
`toJson` methods, and parameter, field, and method mapping collisions.
- Synchronized the generator version recorded in lifecycle manifests with the
package's `0.2.0` version.
## 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.yaml` files.