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

feat(dynamite_petstore_example): Init #1137

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .cspell/tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ enduml
euxo
exiftool
extglob
fehguy
freedesktop
fullpath
gboolean
Expand All @@ -45,9 +46,12 @@ libsqlite
mipmap
ndebug
nodoc
nonintegers
nproc
openrelay
openrelayprojectsecret
palo
petstore
plantuml
precache
puml
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Submodules
run: git submodule update --init --depth 0

- name: Install dart
uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1
Expand All @@ -48,6 +50,14 @@ jobs:
exit 1
fi

- name: Generate dynamite petstore example
run: |
./tool/generate-dynamite-petstore-example.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi

- name: Generate nextcloud
run: |
./tool/generate-nextcloud.sh
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
[submodule "external/nextcloud-notes"]
path = external/nextcloud-notes
url = https://github.com/nextcloud/notes
[submodule "external/openapi-specification"]
path = external/openapi-specification
url = https://github.com/OAI/OpenAPI-Specification.git
1 change: 1 addition & 0 deletions commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rules:
- tool
- app
- dynamite
- dynamite_petstore_example
- dynamite_runtime
- dynamite_end_to_end_test
- file_icons
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"**/assets",
"**/l10n/!(en.arb)",
"external",
"packages/dynamite/dynamite_petstore_example/lib",
"packages/file_icons/lib/src/data.dart",
"packages/neon_lints/lib",
"tool/dev/static"
Expand Down
1 change: 1 addition & 0 deletions external/openapi-specification
Submodule openapi-specification added at f73731
1 change: 1 addition & 0 deletions packages/dynamite/dynamite_petstore_example/LICENSE
5 changes: 5 additions & 0 deletions packages/dynamite/dynamite_petstore_example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# dynamite petstore example

An example showcasing the [dynamite generator](../dynamite) for OpenAPI using the [Swagger Petstore](https://github.com/swagger-api/swagger-petstore).

Because dynamite does not support dynamic authentication yet a [patch](patch.json) is applied to the specification to make it work. It will be removed once dynamite supports API key and Oauth 2.0 authentication.
18 changes: 18 additions & 0 deletions packages/dynamite/dynamite_petstore_example/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
targets:
$default:
builders:
built_value_generator|built_value:
enabled: true
dynamite:
options:
pageWidth: 120
analyzer_ignores:
- camel_case_types
- discarded_futures
- public_member_api_docs
- unreachable_switch_case
coverage_ignores:
- 'const .*\._\(\);'
- 'factory .*\.fromJson\(Map<String, dynamic> json\) => _jsonSerializers\.deserializeWith\(serializer, json\)!;'
- 'Map<String, dynamic> toJson\(\) => _jsonSerializers\.serializeWith\(serializer, this\)! as Map<String, dynamic>;'
- 'static BuiltSet<.*> get values => _\$.*Values;'
Loading