Skip to content

Commit 753a8ae

Browse files
authored
Merge branch 'master' into dio_serialization_lib
2 parents 9a97586 + 63e248e commit 753a8ae

File tree

24 files changed

+380
-24
lines changed

24 files changed

+380
-24
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Bug Report
2+
description: You have noticed a general issue or regression, and would like to report it
3+
labels: [bug]
4+
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for taking the time to fill out this bug report!
10+
Please note that contributor time is limited, and we might not get back to you immediately.
11+
Also make sure to check if [an existing issue](https://github.com/gibahjoe/openapi-generator-dart/issues) matches yours.
12+
- type: textarea
13+
attributes:
14+
label: Description of the bug
15+
description: Provide a clear and concise description of the bug.
16+
validations:
17+
required: true
18+
- type: textarea
19+
attributes:
20+
label: Steps to reproduce
21+
description: Explain how a maintainer can reliably reproduce the bug.
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: Expected behavior
27+
description: Provide a clear and concise description of what you expected to happen.
28+
validations:
29+
required: true
30+
- type: textarea
31+
attributes:
32+
label: Logs
33+
description: If relevant, provide **browser** logs indicating an error.
34+
render: text
35+
- type: textarea
36+
attributes:
37+
label: Screenshots
38+
description: If applicable, add screenshots to help explain your problem.
39+
- type: dropdown
40+
attributes:
41+
label: Platform
42+
options:
43+
- Linux
44+
- Windows
45+
- macOS
46+
- Android
47+
- iOS
48+
validations:
49+
required: true
50+
- type: input
51+
attributes:
52+
label: Library version
53+
placeholder: "10.7.6"
54+
validations:
55+
required: true
56+
- type: input
57+
attributes:
58+
label: Flutter version
59+
placeholder: "3.3"
60+
validations:
61+
required: true
62+
- type: input
63+
attributes:
64+
label: Flutter channel
65+
placeholder: stable
66+
validations:
67+
required: true
68+
- type: textarea
69+
attributes:
70+
label: Additional context
71+
description: If necessary, provide any further context or information.
72+
render: text

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/labeler.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'github actions':
2+
- '.github/workflows/*'
3+
generator:
4+
- 'openapi-generator/**/*'
5+
annotations:
6+
- 'openapi-generator-annotations/**/*'
7+
cli:
8+
- 'openapi-generator-cli/**/*'
9+
docs:
10+
- 'README.md'
11+
- 'CHANGELOG.md'
12+
- 'LICENSE'

.github/workflows/automation.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Automation 🤖
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
paths-ignore:
12+
- '**/*.md'
13+
pull_request_target:
14+
15+
jobs:
16+
label:
17+
name: Labeling 🏷️
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Label PR depending on modified files
21+
uses: actions/labeler@v4
22+
if: ${{ github.event_name == 'pull_request_target' }}
23+
continue-on-error: true
24+
with:
25+
repo-token: '${{ secrets.OG_BOT_TOKEN }}'
26+
27+
- name: Check all PRs for merge conflicts ⛔
28+
uses: eps1lon/[email protected]
29+
with:
30+
dirtyLabel: 'merge conflict'
31+
repoToken: ${{ secrets.OG_BOT_TOKEN }}

.github/workflows/code_quality.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Quality checks 👌🧪
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
paths-ignore:
10+
- '**/*.md'
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
name: Build example project 🛠️
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
defaults:
20+
run:
21+
working-directory: example
22+
23+
steps:
24+
- name: Checkout ⬇️
25+
uses: actions/checkout@v3
26+
27+
- name: Build Example Project 🛠
28+
uses: subosito/flutter-action@v2
29+
with:
30+
cache: true
31+
channel: 'stable'
32+
- run: flutter pub get
33+
- run: flutter pub run build_runner build --delete-conflicting-outputs
34+
- run: flutter build apk
35+
36+
# - name: Upload artifact (Client) ⬆️💻
37+
# uses: actions/[email protected]
38+
# with:
39+
# name: example
40+
# path: |
41+
# example/build/web
42+
43+
pr_context:
44+
name: Save PR context as artifact
45+
if: ${{ always() && !cancelled() && github.event_name == 'pull_request' }}
46+
runs-on: ubuntu-latest
47+
needs:
48+
# - dependency-review
49+
- build
50+
51+
steps:
52+
- name: Save PR context
53+
env:
54+
PR_NUMBER: ${{ github.event.number }}
55+
PR_SHA: ${{ github.sha }}
56+
run: |
57+
echo $PR_NUMBER > PR_number
58+
echo $PR_SHA > PR_sha
59+
60+
- name: Upload PR number as artifact
61+
uses: actions/[email protected]
62+
with:
63+
name: PR_context
64+
path: |
65+
PR_number
66+
PR_sha
67+
68+
conventional_commits:
69+
name: Conventional commits check 💬
70+
if: ${{ github.event_name == 'pull_request' }}
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- name: Checkout ⬇️
75+
uses: actions/[email protected]
76+
77+
- name: Check if all commits comply with the specification
78+
uses: webiny/[email protected]

.github/workflows/deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy 🏗️
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- Quality checks 👌🧪
7+
types:
8+
- completed
9+
10+
jobs:
11+
pr-context:
12+
name: Get PR context
13+
if: ${{ always() && github.event.workflow_run.event == 'pull_request' }}
14+
runs-on: ubuntu-latest
15+
outputs:
16+
commit: ${{ env.pr_sha }}
17+
pr_number: ${{ env.pr_number }}
18+
19+
steps:
20+
- name: Get PR context ⬇️
21+
uses: dawidd6/[email protected]
22+
id: pr_context
23+
with:
24+
run_id: ${{ github.event.workflow_run.id }}
25+
name: PR_context
26+
27+
- name: Set PR context environment variables
28+
if: ${{ steps.pr_context.conclusion == 'success' }}
29+
run: |
30+
echo "pr_number=$(cat PR_number)" >> $GITHUB_ENV
31+
echo "pr_sha=$(cat PR_sha)" >> $GITHUB_ENV
32+
33+
comment-status:
34+
name: Create comment status
35+
if: |
36+
always() &&
37+
github.event.workflow_run.event == 'pull_request' &&
38+
needs.pr-context.outputs.pr_number != ''
39+
runs-on: ubuntu-latest
40+
needs:
41+
- compose-comment
42+
- pr-context
43+
44+
steps:
45+
- name: Update job summary in PR comment
46+
uses: thollander/[email protected]
47+
with:
48+
GITHUB_TOKEN: ${{ secrets.OG_BOT_TOKEN }}
49+
message: ${{ needs.compose-comment.outputs.msg }}
50+
pr_number: ${{ needs.pr-context.outputs.pr_number }}
51+
comment_tag: ${{ needs.compose-comment.outputs.marker }}
52+
mode: recreate

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Stable release 🕊️📦
2+
3+
on:
4+
release:
5+
types:
6+
- released
7+
- prereleased
8+
9+
jobs:
10+
publish-cli:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
- name: Publish
18+
uses: sakebook/[email protected]
19+
with:
20+
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
21+
package_directory: ./openapi-generator-cli
22+
flutter_package: true
23+
skip_test: true
24+
dry_run: false
25+
26+
publish-annotation:
27+
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v1
33+
- name: Publish
34+
uses: sakebook/[email protected]
35+
with:
36+
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
37+
package_directory: ./openapi-generator-annotations
38+
flutter_package: true
39+
skip_test: true
40+
dry_run: false
41+
42+
publish-generator:
43+
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v1
49+
- name: Publish
50+
uses: sakebook/[email protected]
51+
with:
52+
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
53+
package_directory: ./openapi-generator
54+
flutter_package: true
55+
skip_test: true
56+
dry_run: false

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
## 1.0.0
1+
[openapi-generator-cli](openapi-generator-cli%2FCHANGELOG.md)
22

3-
- Initial version
3+
[openapi-generator-annotations](openapi-generator-annotations%2FCHANGELOG.md)
4+
5+
[openapi-generator](openapi-generator%2FCHANGELOG.md)

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
![pub package](https://img.shields.io/pub/v/openapi_generator.svg) ![Pub Likes](https://img.shields.io/pub/likes/openapi_generator?) ![Pub Points](https://img.shields.io/pub/points/openapi_generator) ![Pub Popularity](https://img.shields.io/pub/popularity/openapi_generator) ![GitHub Repo stars](https://img.shields.io/github/stars/gibahjoe/openapi-generator-dart)
2+
3+
### Do not forget to give a star or like if you like this library.
4+
15
This codebase houses the dart/flutter implementations of the openapi client sdk code generation libraries.
26

3-
With this project, you can generate openapi client sdk libraries for your openapi specification right in your flutter/dart projects. (see example)
7+
With this project, you can generate openapi client sdk libraries for your openapi specification right in your
8+
flutter/dart projects. (see example)
49

510
[license](https://github.com/gibahjoe/openapi-generator-dart/blob/master/openapi-generator-annotations/LICENSE).
611

7-
812
This repo contains the following dart libraries
913

10-
| Library | Description | latest version |
11-
|---------------|-------------|---------------|
12-
| openapi-generator |Dev dependency for generating openapi sdk via dart source gen [see here for usage](https://pub.dev/packages/openapi_generator)| [![pub package](https://img.shields.io/pub/v/openapi_generator.svg)](https://pub.dev/packages/openapi_generator)|
13-
| openapi-generator-annotations|Annotations for annotating dart class with instructions for generating openapi sdk [see here for usage](https://pub.dev/packages/openapi_generator_annotations)|[![pub package](https://img.shields.io/pub/v/openapi_generator_annotations.svg)](https://pub.dev/packages/openapi_generator)|
14-
| openapi-generator-cli |Cli code openapi sdk generator for dart [see here for usage](https://pub.dev/packages/openapi_generator_cli)|[![pub package](https://img.shields.io/pub/v/openapi_generator_cli.svg)](https://pub.dev/packages/openapi_generator_cli)|
14+
| Library | Description | latest version |
15+
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
16+
| openapi-generator | Dev dependency for generating openapi sdk via dart source gen [see here for usage](https://pub.dev/packages/openapi_generator) | [![pub package](https://img.shields.io/pub/v/openapi_generator.svg)](https://pub.dev/packages/openapi_generator) |
17+
| openapi-generator-annotations | Annotations for annotating dart class with instructions for generating openapi sdk [see here for usage](https://pub.dev/packages/openapi_generator_annotations) | [![pub package](https://img.shields.io/pub/v/openapi_generator_annotations.svg)](https://pub.dev/packages/openapi_generator) |
18+
| openapi-generator-cli | Cli code openapi sdk generator for dart [see here for usage](https://pub.dev/packages/openapi_generator_cli) | [![pub package](https://img.shields.io/pub/v/openapi_generator_cli.svg)](https://pub.dev/packages/openapi_generator_cli) |
1519

1620

1721

@@ -63,7 +67,11 @@ class Example extends OpenapiGeneratorConfig {}
6367
```
6468

6569
Run
66-
```cmd
70+
```shell
71+
dart run build_runner build --delete-conflicting-outputs
72+
```
73+
or
74+
```shell
6775
flutter pub run build_runner build --delete-conflicting-outputs
6876
```
6977
to generate open api client sdk from spec file specified in annotation.

example/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ app.*.map.json
4545
/android/app/profile
4646
/android/app/release
4747
api
48+
!api/petstore_api/pubspec.yaml

0 commit comments

Comments
 (0)