Browse Source

test(dynamite): add openapi petstore as dynamite integration test

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/764/head
Nikolas Rimikis 1 year ago
parent
commit
77727e7ab0
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 7
      packages/dynamite/dynamite_end_to_end_test/.gitignore
  2. 5
      packages/dynamite/dynamite_end_to_end_test/analysis_options.yaml
  3. 1
      packages/dynamite/dynamite_end_to_end_test/lib/petstore.dart
  4. 1200
      packages/dynamite/dynamite_end_to_end_test/lib/src/petstore.openapi.dart
  5. 1933
      packages/dynamite/dynamite_end_to_end_test/lib/src/petstore.openapi.g.dart
  6. 1
      packages/dynamite/dynamite_end_to_end_test/lib/src/petstore.openapi.json
  7. 30
      packages/dynamite/dynamite_end_to_end_test/pubspec.yaml
  8. 8
      packages/dynamite/dynamite_end_to_end_test/pubspec_overrides.yaml
  9. 15
      tool/generate-dynamite-test.sh

7
packages/dynamite/dynamite_end_to_end_test/.gitignore vendored

@ -0,0 +1,7 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock

5
packages/dynamite/dynamite_end_to_end_test/analysis_options.yaml

@ -0,0 +1,5 @@
include: package:neon_lints/dart.yaml
analyzer:
exclude:
- '**.g.dart'

1
packages/dynamite/dynamite_end_to_end_test/lib/petstore.dart

@ -0,0 +1 @@
export 'src/petstore.openapi.dart';

1200
packages/dynamite/dynamite_end_to_end_test/lib/src/petstore.openapi.dart

File diff suppressed because it is too large Load Diff

1933
packages/dynamite/dynamite_end_to_end_test/lib/src/petstore.openapi.g.dart

File diff suppressed because it is too large Load Diff

1
packages/dynamite/dynamite_end_to_end_test/lib/src/petstore.openapi.json

File diff suppressed because one or more lines are too long

30
packages/dynamite/dynamite_end_to_end_test/pubspec.yaml

@ -0,0 +1,30 @@
name: dynamite_end_to_end_test
publish_to: none
description: Tests for dynamite. Not meant for publishing.
version: 1.0.0
environment:
sdk: '>=3.1.1 <4.0.0'
dependencies:
built_collection: ^5.1.1
built_value: ^8.6.2
dynamite_runtime:
git:
url: https://github.com/nextcloud/neon
path: packages/dynamite/dynamite_runtime
universal_io: ^2.2.2
dev_dependencies:
build_runner: ^2.4.6
built_value_generator: ^8.6.2
dynamite:
git:
url: https://github.com/nextcloud/neon
path: packages/dynamite/dynamite
lints: ^2.0.0
neon_lints:
git:
url: https://github.com/nextcloud/neon
path: packages/neon_lints
test: ^1.21.0

8
packages/dynamite/dynamite_end_to_end_test/pubspec_overrides.yaml

@ -0,0 +1,8 @@
# melos_managed_dependency_overrides: dynamite,dynamite_runtime,neon_lints
dependency_overrides:
dynamite:
path: ../dynamite
dynamite_runtime:
path: ../dynamite_runtime
neon_lints:
path: ../../neon_lints

15
tool/generate-dynamite-test.sh

@ -0,0 +1,15 @@
#!/bin/bash
set -euxo pipefail
cd "$(dirname "$0")/.."
(
cd packages/dynamite/dynamite_end_to_end_test
wget https://petstore3.swagger.io/api/v3/openapi.json -O lib/src/petstore.openapi.json
rm -rf .dart_tool/build
fvm dart pub run build_runner build --delete-conflicting-outputs
# For some reason we need to fix and format twice, otherwise not everything gets fixed
fvm dart fix --apply lib/src/
melos run format
fvm dart fix --apply lib/src/
melos run format
)
Loading…
Cancel
Save