[BUG][dart-dio] Deprecations on Schema Properties are disregarded
Created by: ma-pe
Description
Schema Deprecations on property level are not regarded when generating the Dart Dio Client. The resulting model property does not contain the @Deprecated
annotation.
openapi-generator version
6.2.0
OpenAPI declaration file content or url
Steps to reproduce
Just run
~/bin/openapi-generator-cli generate -i open_api.json -g dart-dio -o .
flutter pub run build_runner build --delete-conflicting-outputs
Then see the lib/model/product.dart
.
It says:
@BuiltValue()
abstract class Product implements Built<Product, ProductBuilder> {
@BuiltValueField(wireName: r'id')
int? get id;
@BuiltValueField(wireName: r'title')
String? get title;
While it should say:
@BuiltValue()
abstract class Product implements Built<Product, ProductBuilder> {
@BuiltValueField(wireName: r'id')
int? get id;
@Deprecated
@BuiltValueField(wireName: r'title')
String? get title;
Suggest a fix
I'll further look into it and will add details if I find something.