Skip to content

Commit 2c85976

Browse files
committed
fix: update README for clarity and formatting; adjust generator arguments and caching logic
1 parent 9d2c918 commit 2c85976

File tree

9 files changed

+159
-137
lines changed

9 files changed

+159
-137
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"conventionalCommits.scopes": [
3+
"generator"
4+
]
5+
}

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,17 @@ sending your PRs.
145145

146146
## Features and bugs
147147

148-
###Note:
148+
### Note:
149149

150150
Some issues may originate from the base OpenAPI Generator library rather than this Dart/Flutter wrapper. This library provides Dart-specific configuration and tools, but the actual code generation is handled by the underlying OpenAPI Generator.
151151

152-
If you encounter problems with the generated code (such as incorrect imports, unexpected code structure, or type mismatches), these are often caused by the base generator, not this wrapper. You may be able to resolve some of these issues by customizing the @Openapi() annotation options:
153-
• template: Allows you to specify a custom code generation template, helping fix issues related to the structure or style of the generated code.
154-
• importMappings: Lets you map OpenAPI model names to custom Dart imports, which helps fix problems with incorrect or missing import statements in the generated code.
155-
• typeMappings: Allows you to map OpenAPI schema types to your own Dart types, which is useful for resolving issues where generated classes don’t match your project’s types or when you need to substitute types for better compatibility.
152+
If you encounter problems with the generated code (such as incorrect imports, unexpected code structure, or type mismatches), these are often caused by the base generator, not this wrapper. You may be able to resolve some of these issues by customizing the @Openapi() annotation options.
153+
154+
- **template**: Allows you to specify a custom code generation template, helping fix issues related to the structure or style of the generated code.
155+
156+
- **importMappings**: Lets you map OpenAPI model names to custom Dart imports, which helps fix problems with incorrect or missing import statements in the generated code.
157+
158+
- **typeMappings**: Allows you to map OpenAPI schema types to your own Dart types, which is useful for resolving issues where generated classes don’t match your project’s types or when you need to substitute types for better compatibility.
156159

157160
If the issue is specifically with the generated code, please open your issue in the original OpenAPI Generator repository.
158161

example/build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
targets:
2+
$default:
3+
sources:
4+
- $package$
5+
- lib/**
6+
- tictactoe.yaml

example/lib/main.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Openapi Generator last run: : 2025-03-07T19:34:28.647173
21
import 'package:flutter/material.dart';
32
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
43

0 commit comments

Comments
 (0)