Skip to content

dart: fix required params. add 'multi' query params. better deserialization.#3325

Merged
wing328 merged 6 commits intoswagger-api:masterfrom
d3v-cl:rmCrypto_fixRequiredParams_useAsyncAwait_addMultiQueryParams
Jul 13, 2016
Merged

dart: fix required params. add 'multi' query params. better deserialization.#3325
wing328 merged 6 commits intoswagger-api:masterfrom
d3v-cl:rmCrypto_fixRequiredParams_useAsyncAwait_addMultiQueryParams

Conversation

@d3v-cl
Copy link
Contributor

@d3v-cl d3v-cl commented Jul 8, 2016

see commit messages for more details

Christian Loitsch added 3 commits July 6, 2016 17:45
other features:
- remove crypto dependency.  base64 encoding is now part of
  dart.convert.
- port Java query param handling to dart. → allows us to use 'multi'
  collectionFormat for queryParams
- use async await where possible.
* added api_helper.dart for a helper function.
* defaultApiClient is now a variable instead of a static field inside
  ApiClient
* a lot of functions inside ApiClient are no longer static.
* optional params are now named params  (needed to introduce a
  justIgnoreFlag as hack)
* queryParams now support the multi format and are therefore no longer a
  Map<String, String>, but a List<QueryParam>
* renamed apiException.mustache to api_exception.mustache to conform
  with other file names.
* removed unused import: 'dart:html'
* removed 'package:crypto/crypto.dart' dependency.  'dart:convert' has a
  base64 converter now.
* use null-aware operator for apiClient assignment in xxxApi
  constructors.
* enable testStoreApi (which returned a Future nobody waited for)
* fix types in tests.  Some ids were passed as Strings instead of ints.
* adapt tests to use the optional named arguments (for optional query
  args)
* generate random ids in tests.  Otherwise insertion will always succeed
  if the test has been called once.
@wing328
Copy link
Contributor

wing328 commented Jul 8, 2016

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/swagger-api/swagger-codegen/graphs/contributors.

Let me know if you need help fixing it.

Ref: http://stackoverflow.com/questions/3042437/change-commit-author-at-one-specific-commit


# for dart vm lib generation:
#ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l dart -o samples/client/petstore/dart --additional-properties browserClient=false"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to create another dart petstore shell script (e.g. dart-vmlib-petstore.sh) for the --additional-properties browserClient=false option (similar to what we've done for other langauges, e.g. java)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you may consider later adding a CLI option (e.g. dartBrowserClient) instead of using additional properties.

@close2
Copy link
Contributor

close2 commented Jul 11, 2016

Hi,

(from another account) I don't really care about being listed in the contributers file.

I have opened an issue for the cli option and dartvm shell script.

d3v-cl added 3 commits July 12, 2016 17:18
Changing the basePath is pretty annoying otherwise, because
you would need to set the basePath for every Api.
Otherwise projects may not use different apis generated by swagger,
because library names must be unique.
@wing328
Copy link
Contributor

wing328 commented Jul 13, 2016

@close2 the commit authorship is fixed. Thanks for the PR, which has been merged into master.

@wing328 wing328 merged commit c873a52 into swagger-api:master Jul 13, 2016
@d3v-cl d3v-cl deleted the rmCrypto_fixRequiredParams_useAsyncAwait_addMultiQueryParams branch July 13, 2016 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants