Skip to content

Commit 7b2b4b7

Browse files
committed
fix: updated analyzer and source_gen dependencies
- update contributing guidelines and add development setup - Add comprehensive development setup instructions including prerequisite tools - Include required setup commands: melos activation, bootstrap, and pub get - Emphasize requirement to run melos format before committing - Strengthen conventional commits requirement for all PRs and commits - Add clear step-by-step developer onboarding process Fixes #192
1 parent bc06852 commit 7b2b4b7

File tree

10 files changed

+40
-59
lines changed

10 files changed

+40
-59
lines changed

.github/workflows/code_quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
- run: flutter build apk
102102

103103
# - name: Upload artifact (Client) ⬆️💻
104-
# uses: actions/upload-artifact@v3.1.1
104+
# uses: actions/upload-artifact@v4
105105
# with:
106106
# name: example
107107
# path: |
@@ -126,7 +126,7 @@ jobs:
126126
echo $PR_SHA > PR_sha
127127
128128
- name: Upload PR number as artifact
129-
uses: actions/upload-artifact@v3.1.1
129+
uses: actions/upload-artifact@v4
130130
with:
131131
name: PR_context
132132
path: |

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# How to become a contributor
22

3+
## Development Setup
4+
5+
Before you begin making changes to the repository, ensure you have the following tools and have run the setup commands:
6+
7+
### Prerequisites
8+
- [Dart SDK](https://dart.dev/get-dart) (latest stable version)
9+
- [Flutter SDK](https://flutter.dev/docs/get-started/install) (if working with Flutter examples)
10+
- [Java](https://adoptium.net/) (version 8 or higher) - required for OpenAPI Generator CLI
11+
12+
### Setup Steps
13+
14+
1. **Activate Melos globally** (for monorepo management):
15+
```bash
16+
dart pub global activate melos
17+
```
18+
19+
2. **Bootstrap the workspace** (links local packages and sets up dependencies):
20+
```bash
21+
melos bootstrap
22+
```
23+
24+
3. **Get dependencies** for all packages:
25+
```bash
26+
melos exec dart pub get
27+
```
28+
29+
4. **Format code** before committing:
30+
```bash
31+
melos format
32+
```
33+
334
## Before submitting an issue
435

536
- Search the [open issue](https://github.com/gibahjoe/openapi-generator-dart/issues)
@@ -17,6 +48,7 @@
1748
1. Ensure that your code adheres to the existing style in the code to which
1849
you are contributing.
1950
1. Ensure that your code has an appropriate set of tests which all pass.
51+
1. **Always run `melos format` before committing** to ensure consistent code formatting across the repository.
2052
1. **Title your pull request as well as all your commits
2153
following [Conventional Commits](https://www.conventionalcommits.org/) styling.**
2254
1. Submit a pull request.

example/pubspec.lock

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -185,22 +185,6 @@ packages:
185185
url: "https://pub.dev"
186186
source: hosted
187187
version: "3.1.0"
188-
dio:
189-
dependency: transitive
190-
description:
191-
name: dio
192-
sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9"
193-
url: "https://pub.dev"
194-
source: hosted
195-
version: "5.8.0+1"
196-
dio_web_adapter:
197-
dependency: transitive
198-
description:
199-
name: dio_web_adapter
200-
sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78"
201-
url: "https://pub.dev"
202-
source: hosted
203-
version: "2.1.1"
204188
fake_async:
205189
dependency: transitive
206190
description:
@@ -387,22 +371,6 @@ packages:
387371
url: "https://pub.dev"
388372
source: hosted
389373
version: "2.0.0"
390-
one_of:
391-
dependency: transitive
392-
description:
393-
name: one_of
394-
sha256: "25fe0fcf181e761c6fcd604caf9d5fdf952321be17584ba81c72c06bdaa511f0"
395-
url: "https://pub.dev"
396-
source: hosted
397-
version: "1.5.0"
398-
one_of_serializer:
399-
dependency: transitive
400-
description:
401-
name: one_of_serializer
402-
sha256: "3f3dfb5c1578ba3afef1cb47fcc49e585e797af3f2b6c2cc7ed90aad0c5e7b83"
403-
url: "https://pub.dev"
404-
source: hosted
405-
version: "1.5.0"
406374
openapi_generator:
407375
dependency: "direct dev"
408376
description:
@@ -440,13 +408,6 @@ packages:
440408
url: "https://pub.dev"
441409
source: hosted
442410
version: "1.9.1"
443-
petstore_api:
444-
dependency: "direct main"
445-
description:
446-
path: "api/petstore_api"
447-
relative: true
448-
source: path
449-
version: "1.0.0"
450411
pool:
451412
dependency: transitive
452413
description:
@@ -471,14 +432,6 @@ packages:
471432
url: "https://pub.dev"
472433
source: hosted
473434
version: "1.5.0"
474-
quiver:
475-
dependency: transitive
476-
description:
477-
name: quiver
478-
sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2
479-
url: "https://pub.dev"
480-
source: hosted
481-
version: "3.2.2"
482435
shelf:
483436
dependency: transitive
484437
description:

example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ dependencies:
3131
flutter:
3232
sdk: flutter
3333
openapi_generator_annotations: ^6.0.0
34-
petstore_api:
35-
path: ./api/petstore_api
34+
# petstore_api:
35+
# path: ./api/petstore_api
3636

3737

3838
# The following adds the Cupertino Icons font to your application.

openapi-generator-annotations/lib/src/openapi_generator_annotations_base.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'dart:io';
44
import 'package:crypto/crypto.dart';
55
import 'package:meta/meta.dart';
66

7-
87
class Openapi {
98
/// Additional properties to pass to the compiler (CSV)
109
///
@@ -149,7 +148,6 @@ class Openapi {
149148
/// Defaults to [false].
150149
final bool forceAlwaysRun;
151150

152-
153151
const Openapi({
154152
this.additionalProperties,
155153
this.skipSpecValidation = false,

openapi-generator-annotations/test/openapi_generator_annotations_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ void main() {
389389
);
390390
expect(openapi.toString(), contains('forceAlwaysRun: true'));
391391
});
392-
393392
});
394393

395394
group('InputSpec.toString', () {

openapi-generator/lib/src/models/generator_arguments.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class GeneratorArguments {
2020
/// The default location is: .dart_tool/openapi-generator-cache.json
2121
final String cachePath;
2222

23-
2423
final bool isDebug;
2524

2625
/// Use a custom pubspec file when generating.

openapi-generator/lib/src/openapi_generator_runner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
206206
message: [
207207
':: Looks like you havent added the spec file [${args.inputSpec.path}] to your build.yaml.',
208208
':: This is needed for this package to monitor changes to the spec file.',
209-
':: Find out more here: https://dart.dev/tools/build_system#reading-files',
209+
':: Find out more here: ',
210210
'\n',
211211
].join('\n'),
212212
level: Level.WARNING,

openapi-generator/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ environment:
88

99
dependencies:
1010
build: '>=1.0.0 <=3.0.0'
11-
source_gen: '>=1.0.0 <=2.0.0'
11+
source_gen: '>=1.0.0 <=5.0.0'
1212
path: '>=1.0.0 <=2.0.0'
1313
openapi_generator_annotations: ^6.1.0
14-
analyzer: '>5.12.0 <8.0.0'
14+
analyzer: '>5.12.0 <9.0.0'
1515
openapi_generator_cli: ^6.1.0
1616
crypto: '>=3.0.6 <=4.0.0'
1717
meta: '>=1.15.0 <=2.0.0'

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ name: openapi_generator_dart
33
environment:
44
sdk: '>=3.0.0 <4.0.0'
55
dev_dependencies:
6-
melos: ^6.2.0
6+
melos:

0 commit comments

Comments
 (0)