Skip to content

Commit d47b16f

Browse files
committed
refactor!: make openapi fields required, fix api mismatch with osrm
1 parent 806c7b1 commit d47b16f

19 files changed

+398
-232
lines changed

lib/api_codegen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Openapi Generator last run: : 2024-10-27T09:35:12.173044
1+
// Openapi Generator last run: : 2024-10-27T12:36:50.500431
22
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
33

44
@Openapi(

packages/flowmotion_api/.openapi-generator/FILES

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,3 @@ lib/src/model/route_get_request_dest.dart
3939
lib/src/model/route_get_request_src.dart
4040
lib/src/serializers.dart
4141
pubspec.yaml
42-
test/route_get200_response_routes_inner_steps_inner_test.dart
43-
test/route_get200_response_routes_inner_test.dart
44-
test/route_get200_response_test.dart
45-
test/route_get_request_dest_test.dart
46-
test/route_get_request_src_test.dart
47-
test/route_get_request_test.dart

packages/flowmotion_api/doc/RouteGet200ResponseRoutesInner.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import 'package:flowmotion_api/api.dart';
88
## Properties
99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11-
**geometry** | **String** | Polyline (precision 5) for drawing the entire route on a map | [optional]
12-
**duration** | **double** | Estimated travel duration in seconds | [optional]
13-
**distance** | **double** | Total travel distance in meters | [optional]
14-
**steps** | [**BuiltList<RouteGet200ResponseRoutesInnerStepsInner>**](RouteGet200ResponseRoutesInnerStepsInner.md) | | [optional]
11+
**geometry** | **String** | Polyline (precision 5) for drawing the entire route on a map |
12+
**duration** | **double** | Estimated travel duration in seconds |
13+
**distance** | **double** | Total travel distance in meters |
14+
**steps** | [**BuiltList<RouteGet200ResponseRoutesInnerStepsInner>**](RouteGet200ResponseRoutesInnerStepsInner.md) | |
1515

1616
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1717

packages/flowmotion_api/doc/RouteGet200ResponseRoutesInnerStepsInner.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import 'package:flowmotion_api/api.dart';
88
## Properties
99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11-
**name** | **String** | Name of the road | [optional]
12-
**duration** | **double** | Estimated duration of the step in seconds | [optional]
13-
**distance** | **double** | Travel distance of the step in meters | [optional]
14-
**geometry** | **String** | Polyline (precision 5) for drawing this step on a map | [optional]
15-
**direction** | **String** | Direction to take for the step | [optional]
16-
**maneuver** | **String** | The type of maneuver to perform | [optional]
17-
**instruction** | **String** | OSRM-style text instructions for this step | [optional]
18-
**congestion** | [**Congestion**](Congestion.md) | | [optional]
11+
**name** | **String** | Name of the road |
12+
**duration** | **double** | Estimated duration of the step in seconds |
13+
**distance** | **double** | Travel distance of the step in meters |
14+
**geometry** | **String** | Polyline (precision 5) for drawing this step on a map |
15+
**direction** | **String** | Direction to take for the step |
16+
**maneuver** | **String** | The type of maneuver to perform |
17+
**instruction** | **String** | OSRM-style text instructions for this step |
18+
**congestion** | [**Congestion**](Congestion.md) | |
1919

2020
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2121

packages/flowmotion_api/doc/RouteGetRequest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import 'package:flowmotion_api/api.dart';
88
## Properties
99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11-
**src** | [**RouteGetRequestSrc**](RouteGetRequestSrc.md) | | [optional]
12-
**dest** | [**RouteGetRequestDest**](RouteGetRequestDest.md) | | [optional]
11+
**src** | [**RouteGetRequestSrc**](RouteGetRequestSrc.md) | |
12+
**dest** | [**RouteGetRequestDest**](RouteGetRequestDest.md) | |
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

packages/flowmotion_api/doc/RouteGetRequestDest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:flowmotion_api/api.dart';
88
## Properties
99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11-
**kind** | **String** | Specifies if the destination is an address or a location | [optional]
11+
**kind** | **String** | Specifies if the destination is an address or a location |
1212
**address** | [**Address**](Address.md) | | [optional]
1313
**location** | [**Location**](Location.md) | | [optional]
1414

packages/flowmotion_api/doc/RouteGetRequestSrc.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import 'package:flowmotion_api/api.dart';
88
## Properties
99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11-
**kind** | [**Address**](Address.md) | | [optional]
11+
**kind** | **String** | Specifies if the source is an address or a location |
12+
**address** | [**Address**](Address.md) | | [optional]
1213
**location** | [**Location**](Location.md) | | [optional]
1314

1415
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

packages/flowmotion_api/lib/src/model/route_get200_response_routes_inner.dart

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ abstract class RouteGet200ResponseRoutesInner
2424
RouteGet200ResponseRoutesInnerBuilder> {
2525
/// Polyline (precision 5) for drawing the entire route on a map
2626
@BuiltValueField(wireName: r'geometry')
27-
String? get geometry;
27+
String get geometry;
2828

2929
/// Estimated travel duration in seconds
3030
@BuiltValueField(wireName: r'duration')
31-
double? get duration;
31+
double get duration;
3232

3333
/// Total travel distance in meters
3434
@BuiltValueField(wireName: r'distance')
35-
double? get distance;
35+
double get distance;
3636

3737
@BuiltValueField(wireName: r'steps')
38-
BuiltList<RouteGet200ResponseRoutesInnerStepsInner>? get steps;
38+
BuiltList<RouteGet200ResponseRoutesInnerStepsInner> get steps;
3939

4040
RouteGet200ResponseRoutesInner._();
4141

@@ -67,35 +67,27 @@ class _$RouteGet200ResponseRoutesInnerSerializer
6767
RouteGet200ResponseRoutesInner object, {
6868
FullType specifiedType = FullType.unspecified,
6969
}) sync* {
70-
if (object.geometry != null) {
71-
yield r'geometry';
72-
yield serializers.serialize(
73-
object.geometry,
74-
specifiedType: const FullType(String),
75-
);
76-
}
77-
if (object.duration != null) {
78-
yield r'duration';
79-
yield serializers.serialize(
80-
object.duration,
81-
specifiedType: const FullType(double),
82-
);
83-
}
84-
if (object.distance != null) {
85-
yield r'distance';
86-
yield serializers.serialize(
87-
object.distance,
88-
specifiedType: const FullType(double),
89-
);
90-
}
91-
if (object.steps != null) {
92-
yield r'steps';
93-
yield serializers.serialize(
94-
object.steps,
95-
specifiedType: const FullType(
96-
BuiltList, [FullType(RouteGet200ResponseRoutesInnerStepsInner)]),
97-
);
98-
}
70+
yield r'geometry';
71+
yield serializers.serialize(
72+
object.geometry,
73+
specifiedType: const FullType(String),
74+
);
75+
yield r'duration';
76+
yield serializers.serialize(
77+
object.duration,
78+
specifiedType: const FullType(double),
79+
);
80+
yield r'distance';
81+
yield serializers.serialize(
82+
object.distance,
83+
specifiedType: const FullType(double),
84+
);
85+
yield r'steps';
86+
yield serializers.serialize(
87+
object.steps,
88+
specifiedType: const FullType(
89+
BuiltList, [FullType(RouteGet200ResponseRoutesInnerStepsInner)]),
90+
);
9991
}
10092

10193
@override

packages/flowmotion_api/lib/src/model/route_get200_response_routes_inner.g.dart

Lines changed: 27 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)