Skip to content

Commit

Permalink
feat(dynamite_petstore_example): Init
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <[email protected]>
  • Loading branch information
provokateurin committed Nov 14, 2023
1 parent 353fd72 commit c47789f
Show file tree
Hide file tree
Showing 14 changed files with 5,055 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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/swagger-petstore"]
path = external/swagger-petstore
url = https://github.com/swagger-api/swagger-petstore.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

Check warning on line 16 in commitlint.yaml

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (petstore)
- dynamite_runtime
- dynamite_end_to_end_test
- file_icons
Expand Down
1 change: 1 addition & 0 deletions external/swagger-petstore
Submodule swagger-petstore added at b8e2f3
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

0 comments on commit c47789f

Please sign in to comment.