Skip to content

[Swift 3] Defend against reserved words as enum values#4217

Closed
jgavris wants to merge 59 commits intoswagger-api:masterfrom
ButterflyNetwork:swift-3-reserved-word
Closed

[Swift 3] Defend against reserved words as enum values#4217
jgavris wants to merge 59 commits intoswagger-api:masterfrom
ButterflyNetwork:swift-3-reserved-word

Conversation

@jgavris
Copy link
Copy Markdown
Contributor

@jgavris jgavris commented Nov 18, 2016

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

  • Defend against reserved word enum's in Swift 3 codegen

wing328 and others added 30 commits August 9, 2016 18:56
…curityscope-newline-error

[JAVA][SPRING-MVC]Top enum  and securityscope newline cause invalid auto-generated java code during springmvc code generation
* change api and ApiClient to return cancellable NSURLSessionTasks instead of NSNumber

* define a configuration protocol for custom configurations, which can be passed to api clients instead of a global configuration, provide a default implementation with a singleton option

* integrate a workaround for a current JSONModel concurrency bug

* update to new ISO8601 pod

* add missing call to super

* integrate new templates into codegen

* updates documentation templates

* updates petstore objc generated code

* fixes objc client tests
…c/apiversion

[ObjC] Add version define and share default headers of each client
…ltit_thread_apiclient

Objc/fix/multit thread apiclient
… Code

Updated Tizen Client Codegen to remove calls to obsolete/deprecated system APIs.
The new templates are based on json-glib and libcurl.
The produced code also contains scripts for auto-generation of the documentation of the produced client library using Doxygen.
Included test cases for Petstore in /samples/client/petstore/tizen/PetStoreTest/

Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
[Issue swagger-api#3076] [Tizen] Updating the Tizen Client Generation Code
…re_data_ordered_set

[Objc] Fix core data unordered array content
Bump version of pom to 2.3.0-SNAPSHOT for the 2.3.x release
this allows to remove a lot of code in the ApiClient.
Tests for the ApiClient thus have been move to JSONTest.
Also allow to configure the date formatter of all date types individually.
An assertion in testCreateAndGetPetAsync() is removed because it's useless and makes the test fail randomly.

See swagger-api#3727
…move_interface_method_duplicate

[Objc] Remove interface method duplicate
Java: Fix UUID mapping to a UUID instead of a string
* [PHP] Change APIException to expect headers as array

* Update petstore PHP
…ptional-parameters

add optional parameters to init when unwrapRequired is true
There are several issues with the security policy:

* The security policy is created with `AFSSLPinningModeNone` which means that even if pinned certificates are set (if config.sslCaCert is not nil), they will be ignored. Pinning will not work at all with this security policy.

* The configuration wrapper for the security policy is a bad idea.
  * `verifySSL` controls both invalid certificates and domain validation. A vanilla `AFSecurityPolicy` clearly exposes both `allowInvalidCertificates` and `validatesDomainName`.
  * `sslCaCert` only allows for a single pinned certificate. A vanilla `AFSecurityPolicy` clearly exposes a set of pinned certificates and makes it very convenient to load them with either `+[AFSecurityPolicy policyWithPinningMode:]` or `+[AFSecurityPolicy certificatesInBundle:]`

Since the security policy does not work at all and adds confusion, it is better to just remove it and let the user configure a security policy that fits their needs.
…wagger-api#3924)

* Update JavaJaxRS/resteasy/api.mustache to have swagger annotations

The annotations should now appear on generated resteasy API classes.

* Re-generate resteasy petstore sample

* Add swagger-annotations to rest-easy samples as a dependency

* Regenerat pom.xml and build.gradle files for resteasy
wing328 and others added 20 commits October 14, 2016 17:01
* fix tag with underscore for python

* remove log
…agger-api#3981)

* Actually use the model name prefix

* Update the petstore sample
…er-api#4008)

* add configuration to typescript fetch

* fix issues reported by the CI

* fix header parameters in ts fetch client

* add new configuration file for ts fetch

* skip if check for configuration in ts fetch

* Fix `this.configuration` issue in paramsCreator

* update ts fetch samples

* Fix typescript fetch tests to work with Configuration

* Add dictionary to store apikeys (swagger-api#8)

* Add dictionary to store apikeys

* Type apikey with expected params rather than Dictionary - typescript-fetch

* Update test samples to new typescript-fetch api

* Fix tests for typesript-fetch api

* update typescript sample using petstore.yaml
There was a typo, just changing `FetchParamCreactor` to `FetchParamCreator`
* [feign] add threetenbp support for feign clients

* [okhttp] add threetenbp support for okhttp clients

* [jersey] add threetenbp support for jersey clients

* [retrofit2] add threetenbp support for retrofit2 clients

* [spring] add threetenbp support for spring generators

* add a workaround in tests for a bug in the petstore

The petstore doesn't manage fractional digits of dates correctly when there are less than 3
@jaz-ah
Copy link
Copy Markdown
Contributor

jaz-ah commented Nov 18, 2016

it looks like we already pulled a PR for this one - could you retry w/ latest @jgavris

@jgavris
Copy link
Copy Markdown
Contributor Author

jgavris commented Nov 18, 2016

Ah, indeed. Mine comes with a test though :)

@jaz-ah
Copy link
Copy Markdown
Contributor

jaz-ah commented Nov 18, 2016

lol ok could you reintegrate that change into this PR and we'll merge this one through?

@jgavris
Copy link
Copy Markdown
Contributor Author

jgavris commented Nov 18, 2016

That was merged into master. I suppose this belongs on master as well.

@jgavris jgavris changed the base branch from 2.3.0 to master November 18, 2016 19:49
@jgavris jgavris closed this Nov 18, 2016
@jgavris jgavris deleted the swift-3-reserved-word branch November 18, 2016 19:51
@jgavris
Copy link
Copy Markdown
Contributor Author

jgavris commented Jan 4, 2017

@jaz-ah @wing328 When might the next merge of master into 2.3.0 happen? We need a few bugfixes from there.

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Jan 5, 2017

@jgavris I've sync'd master into 2.3.0 via #4497

Please pull the latest master to give it a try.

Moving forward, I'll try to ensure the master is sync'd into 2.3.0 on a weekly basis.

@jgavris
Copy link
Copy Markdown
Contributor Author

jgavris commented Jan 5, 2017

👍 Looks good, thanks @wing328 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.