Establish the Koi Swagger parser release
Prepare the OpenAPI parser and Dart generator as a publishable Koi package with CLI entrypoint, docs, examples, tests, and pub.dev release metadata. Constraint: Initial GitHub import follows koi_blueprint_flutter identity mr.koi <i@mrkoi.is>. Rejected: Keep local runtime state in the initial repository | .dart_tool, .omx, and pubspec.lock are ignored for a reusable package source tree. Confidence: high Scope-risk: moderate Directive: Keep generated-output behavior covered by parser and generator tests before changing rendering rules. Tested: dart analyze; dart test; PUB_HOSTED_URL=https://pub.dev dart pub publish --dry-run Not-tested: End-to-end downstream build_runner compilation of generated Retrofit/Freezed output.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import 'package:koi_swagger_parser/src/util/utils.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('toSnakeCase', () {
|
||||
test('保持常见缩写合并后的文件名可读性', () {
|
||||
expect(toSnakeCase('IoTDeviceResponse'), 'iot_device_response');
|
||||
expect(
|
||||
toSnakeCase('ApiResponse_IoTDeviceListResponse_'),
|
||||
'api_response_iot_device_list_response',
|
||||
);
|
||||
expect(toSnakeCase('HTTPValidationError'), 'http_validation_error');
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user