@@ -29,7 +29,7 @@ void main() {
29
29
outputDirectory: 'api/petstore_api')
30
30
''' ),
31
31
contains (
32
- 'generate -o api/petstore_api -i ${ Directory . current . parent . path } /openapi-spec.yaml -g dart-dio --type-mappings=Pet=ExamplePet --additional-properties=allowUnicodeIdentifiers=false,ensureUniqueParams=true,useEnumExtension=true,prependFormOrBodyParameters=false,pubAuthor=Johnny dep...,pubName=petstore_api,legacyDiscriminatorBehavior=true,sortModelPropertiesByRequiredFlag=true,sortParamsByRequiredFlag=true,wrapper=none,dateLibrary=core,serializationLibrary=built_value' ));
32
+ 'generate -o api/petstore_api -i .. /openapi-spec.yaml -g dart-dio --type-mappings=Pet=ExamplePet --additional-properties=allowUnicodeIdentifiers=false,ensureUniqueParams=true,useEnumExtension=true,prependFormOrBodyParameters=false,pubAuthor=Johnny dep...,pubName=petstore_api,legacyDiscriminatorBehavior=true,sortModelPropertiesByRequiredFlag=true,sortParamsByRequiredFlag=true,wrapper=none,dateLibrary=core,serializationLibrary=built_value' ));
33
33
});
34
34
35
35
test ('to generate command with import and type mappings' , () async {
@@ -42,7 +42,7 @@ void main() {
42
42
generatorName: Generator.dio)
43
43
''' ),
44
44
contains (
45
- 'generate -o ${Directory .current .path } -i ${ Directory . current . parent . path } /openapi-spec.yaml -g dart-dio --import-mappings=IntOrString=./int_or_string.dart --type-mappings=int-or-string=IntOrString' ));
45
+ 'generate -o ${Directory .current .path } -i .. /openapi-spec.yaml -g dart-dio --import-mappings=IntOrString=./int_or_string.dart --type-mappings=int-or-string=IntOrString' ));
46
46
});
47
47
48
48
test ('to generate command with inline schema mappings' , () async {
@@ -55,7 +55,7 @@ void main() {
55
55
generatorName: Generator.dio)
56
56
''' ),
57
57
contains ('''
58
- generate -o ${Directory .current .path } -i ${ Directory . current . parent . path } /openapi-spec.yaml -g dart-dio --inline-schema-name-mappings=inline_object_2=SomethingMapped,inline_object_4=nothing_new --type-mappings=int-or-string=IntOrString
58
+ generate -o ${Directory .current .path } -i .. /openapi-spec.yaml -g dart-dio --inline-schema-name-mappings=inline_object_2=SomethingMapped,inline_object_4=nothing_new --type-mappings=int-or-string=IntOrString
59
59
'''
60
60
.trim ()));
61
61
});
@@ -87,7 +87,7 @@ void main() {
87
87
outputDirectory: 'api/petstore_api')
88
88
''' ),
89
89
contains ('''
90
- generate -o api/petstore_api -i ${ Directory . current . parent . path } /openapi-spec.yaml -g dart-dio --type-mappings=Pet=ExamplePet --additional-properties=allowUnicodeIdentifiers=false,ensureUniqueParams=true,useEnumExtension=true,prependFormOrBodyParameters=false,pubAuthor=Johnny dep...,pubName=petstore_api,legacyDiscriminatorBehavior=true,sortModelPropertiesByRequiredFlag=true,sortParamsByRequiredFlag=true,wrapper=none,dateLibrary=core,serializationLibrary=built_value
90
+ generate -o api/petstore_api -i .. /openapi-spec.yaml -g dart-dio --type-mappings=Pet=ExamplePet --additional-properties=allowUnicodeIdentifiers=false,ensureUniqueParams=true,useEnumExtension=true,prependFormOrBodyParameters=false,pubAuthor=Johnny dep...,pubName=petstore_api,legacyDiscriminatorBehavior=true,sortModelPropertiesByRequiredFlag=true,sortParamsByRequiredFlag=true,wrapper=none,dateLibrary=core,serializationLibrary=built_value
91
91
'''
92
92
.trim ()));
93
93
});
@@ -103,7 +103,7 @@ void main() {
103
103
generatorName: Generator.dioAlt)
104
104
''' ),
105
105
contains (
106
- 'generate -o ${Directory .current .path } -i ${ Directory . current . parent . path } /openapi-spec.yaml -g dart2-api --import-mappings=IntOrString=./int_or_string.dart --type-mappings=int-or-string=IntOrString' ));
106
+ 'generate -o ${Directory .current .path } -i .. /openapi-spec.yaml -g dart2-api --import-mappings=IntOrString=./int_or_string.dart --type-mappings=int-or-string=IntOrString' ));
107
107
});
108
108
});
109
109
0 commit comments