Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #13818
Closed
Open
Issue created Oct 25, 2022 by Administrator@rootContributor

[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

OpenAPI sample

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.

Assignee
Assign to
Time tracking