Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [dart] Invalid code generated (validation_error_loc_inner.dart) (openapi 3.1.0) #18913

Closed
4 of 6 tasks
Gigahawk opened this issue Jun 13, 2024 · 1 comment
Closed
4 of 6 tasks

Comments

@Gigahawk
Copy link

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Using the dart generator creates code that does not compile due to errors in validation_error_loc_inner.dart

...
class ValidationErrorLocInner {
  /// Returns a new [ValidationErrorLocInner] instance.
  ValidationErrorLocInner({
  });

  @override
  bool operator ==(Object other) => identical(this, other) || other is ValidationErrorLocInner &&

  @override
  int get hashCode =>
    // ignore: unnecessary_parenthesis
...

A screenshot to show highlighting of invalid syntax:
image

openapi-generator version
$ openapi-generator-cli version
7.6.0
OpenAPI declaration file content or url

https://gist.github.com/Gigahawk/a2e79529adb4206fd23c86e9c28a0380

Generation Details
Steps to reproduce
$ openapi-generator-cli generate -i openapi.json -g dart -o packages/openapi
Related issues/PRs

gibahjoe/openapi-generator-dart#135

Suggest a fix
@Gigahawk
Copy link
Author

Duplicate of #13302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant