Commit Graph

241 Commits

Author SHA1 Message Date
wing328
9e0911b376 [ObjC] fix NPE when getting swagger type (#6465)
* fix npe in swagger type (objc)

* remove trailing spaces
2017-09-11 17:39:12 +08:00
wing328
e3a1e308c4 update smaples, skip ts angular test. 2017-07-22 17:27:10 +08:00
Alex Nolasco
93415af92d [Objc] Class not identified due to Circular imports (#6069)
* [Objc] Class not identified due to Circular imports

* Pet store generated sample
2017-07-17 17:14:05 +08:00
wing328
c988afa766 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-19 11:23:58 +08:00
wing328
1f1e92d964 update run xcodebuild command for objc client to reduce log 2017-06-16 17:28:57 +08:00
wing328
6183960d86 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-06 17:11:49 +08:00
wing328
0b998f0684 add xcpretty to objc test output 2017-06-06 15:23:15 +08:00
wing328
87bbbc1a1b Merge remote-tracking branch 'origin/master' into 230_merge_master 2017-06-05 23:27:11 +08:00
wing328
faf082589d Enable Travis CI tests for Swift, ObjC clients and move some tests to CircleCI (#5687)
* enable travis CI tests for swift, objc, move some tests to circleci

* fix comment in xml file

* use xcode8.3

* use ruby 2.2.5

* fix objc core data pom.xml

* use cocoapods 1.2.1

* use xcpretty for clearer test results

* fix pom with relative path to script

* comment out objc test

* fix xcpretty exit code

* add && exit ${PIPESTATUS[0]} for swift3 xcodebuild script

* use xcode 8.2

* update promisekit version for swift 2x, 3x

* add pod repo update

* remove Pods directory

* update swift dependencies to the latest version

* update podfile.lock

* rollback Alamofire to 4.0 for swift3

* fix swift3 rxswift api cliiet

* fix testDeletePet test in Swift3 rxswift petstore

* update clojure petstore

* comment out clojure test in travis (already covered in circleci)

* run pestore server locally

* use wing328/swagger-samples to run petstore

* run petstore server in the background

* test ruby petstore client

* add /Users/travis/.cocoapods/repos/master to cache

* add back ruby test, use public pestore server

* add back bash client test

* add npm config set registry to avoid time out

* use docker branch in swagger samples

* remove bash test

* show go version, reorder

* debug go petstore client

* reinstall go

* comment out pod repo update

* uncomment pod repo update

* test go in circleci

* remove go from travis test

* brew install sbt
2017-06-05 15:43:20 +08:00
wing328
40163b26d2 update objc petstore to use petstore.json 2017-06-05 12:25:51 +08:00
wing328
bd2f03f1c0 update objc, swift2,3 petstore samples 2017-05-18 17:22:20 +08:00
wing328
fdbd13b368 update objc, swift2,3 petstore samples 2017-05-18 17:18:43 +08:00
wing328
e1e5ac4d37 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-17 22:00:06 +08:00
Benjamin Douglas
34d9dca5e7 Update samples to current code/scripts
This is the result of

  - `$ git checkout master`
  - `$ bin/run-all-petstore`

No change was made to the code, just ran the aggregate sample generation
script.
2017-05-02 10:33:06 -07:00
Paŭlo Ebermann
8c575b0f0c Update samples for ObjC&core-data. (#5202) 2017-03-26 22:44:18 +08:00
Paul Ebermann
5bb0f7a933 Update all samples. 2017-03-15 18:25:40 +01:00
Paŭlo Ebermann
9be178b26a Merge branch 'master' into new-sync-master-to-2.3.0 2017-03-13 21:42:41 +01:00
wing328
4fe79f0078 Remove default format (JSON) from API operations (#4987)
* remove default format (json) and update ruby petstore

* update python petstore sample

* update php petstore sample

* update android petstore sample

* update java petstore sample

* update objc sample

* remove default format (json) from perl
2017-03-09 11:12:01 +08:00
Paŭlo Ebermann
a91cbbe387 Update samples after 2.2.2 (#4901)
* Update petstore samples for Groovy.

* Update samples for JaxRS.

* Update samples for cpprest.

* Update samples for dart.

* Update samples for flash.

* Update samples for go.

* Update samples for html2.

* Update samples for lumen.

* Update samples for nancxfx.

* Update samples for objc.

* Update samples for sinatra.

* Update samples for tizen.

* Update samples for java-inflector.
2017-03-06 00:33:57 +08:00
patulacci
e23a24c138 replaced SWG by classPrefix and ran tests (#4871) 2017-03-03 17:29:16 +08:00
wing328
acd10318f7 Merge remote-tracking branch 'origin' into sync_master_230 2017-02-10 23:31:36 +08:00
wing328
ae8a123484 [WIP][Scala] Finch generator (#3905)
* Feature/objc tasks 2.3.0 (#3522)

* 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

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

* add finch generator and resource

* update license, add errros

* Fix problem with multitheard api client

* fix some errors for finch

* [finch] Remove license header

* [finch] Remove finatra stuff, fix a few issues

* WIP: Finch server generator

* [finch] WIP: server generator impl

This puts parameters (input/output) in the right format. Currently, this
is done in the generator class using vendorExtensions, but should be
refactored to imported templates to clean up.

Previous commits of the server generator output to appropriate
models/api directories. I've made no changes to this logic, but code
currently generates to the root scala package directory. This will need
to be fixed.

There's also an issue with circe's and Option[Date] in the Order type.
This issue will need to be resolved. As well, there's some unused
imports to clean up.

Initial implementation lacks support for custom imports, type mappings,
etc.

* [finch] Update api/model package and imports

* [finch] Explicit import/type mappings

* [finch] Regenerate example
2017-01-29 12:15:39 +08:00
William Cheng
ce899e3776 Merge remote-tracking branch 'origin/master' into 2.3.0
Conflicts:
	appveyor.yml
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java
	modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache
	modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
	modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache
	modules/swagger-codegen/src/main/resources/go/api.mustache
	modules/swagger-codegen/src/main/resources/objc/api-body.mustache
	modules/swagger-codegen/src/main/resources/objc/api-header.mustache
	modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache
	modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache
	modules/swagger-codegen/src/test/java/io/swagger/codegen/swift/SwiftModelTest.java
	modules/swagger-codegen/src/test/java/io/swagger/codegen/swift3/Swift3ModelTest.java
	modules/swagger-codegen/src/test/java/io/swagger/codegen/typescript/typescriptangular2/TypeScriptAngular2ModelTest.java
	samples/client/petstore-security-test/typescript-angular2/configuration.ts
	samples/client/petstore/go/go-petstore/docs/FakeApi.md
	samples/client/petstore/go/go-petstore/fake_api.go
	samples/client/petstore/go/go-petstore/pet_api.go
	samples/client/petstore/java/feign/pom.xml
	samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/RFC3339DateFormat.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
	samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m
	samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h
	samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m
	samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h
	samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h
	samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h
	samples/client/petstore/qt5cpp/client/SWGPetApi.h
	samples/client/petstore/qt5cpp/client/SWGStoreApi.h
	samples/client/petstore/qt5cpp/client/SWGUserApi.h
	samples/client/petstore/typescript-angular2/default/configuration.ts
	samples/client/petstore/typescript-angular2/npm/README.md
	samples/client/petstore/typescript-angular2/npm/configuration.ts
	samples/client/petstore/typescript-angular2/npm/package.json
	samples/client/petstore/typescript-angular2/npm/tsconfig.json
	samples/client/petstore/typescript-fetch/builds/default/api.ts
	samples/client/petstore/typescript-fetch/builds/es6-target/api.ts
	samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts
	samples/client/petstore/typescript-fetch/tests/default/test/PetApiFactory.ts
	samples/client/petstore/typescript-fetch/tests/default/test/StoreApiFactory.ts
	samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java
	samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java
	samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java
	samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java
	samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java
	samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java
	samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApiController.java
2017-01-05 17:44:39 +08:00
wing328
204c05442d [ObjC] minor code style enhancement to ObjC API client (#4437)
* minor code style enhancement to objc api client

* update petstore sample

* remove datatype from docstring (objc)
2016-12-20 19:13:03 +08:00
Greg Rashkevitch
36b97c22af Fix warning docs return type (#4429)
* Objective C: Fix compilation warnings

If returnType is not provided, set the @return as void

* Run the `./bin/objc-petstore.sh`

* OBJECTIVE C SDK: Remove the return line for methods that return nothing all together

* obj-c sdk: Updated petstore sample
2016-12-20 16:10:47 +08:00
wing328
6ad38874c5 [ObjC] version update for ISO8601 (#4220)
* remove php apache license

* update iso8601 version for objc client
2016-11-21 00:43:41 +08:00
wing328
90512e6326 Remove Apache license from API client generators (#4197)
* remove php apache license

* remove apache license from C#

* remove apache license in objc code

* remove license from swift 3 code

* remove apache license from perl code

* remove license from scala code

* remove license from ts, go, android, cpp, scala

* remove license from java api client

* restore clojure petstore files

* remove license from travis file

* clean up apache-related terms in php, ruby, python mustache tempaltes

* remove license from JS API cilent
2016-11-16 21:44:49 +08:00
wing328
43af07a2d4 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-11-16 16:44:39 +08:00
wing328
97924c78a0 update objc samples 2016-11-15 16:16:20 +08:00
wing328
255bc02b83 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-11-09 16:37:11 +08:00
Roman Truba
73276fd63a Merge branch 'master' into afnetworking-pinned-certificates-fix 2016-11-08 15:48:46 +03:00
Roman Truba
a1cd01916e [ObjC] Fix deprecated JSONModel API usage (#4133)
* Fixed deprecated usage -[JSONKeyMapper initWithDictionary:]

* Petstore regenerated

* Change minimal required version of JSONModel
2016-11-07 23:47:09 +08:00
Roman Truba
0c7ab63912 Petstore updated 2016-11-05 22:11:09 +03:00
Roman Truba
1a2b345c57 [Obj-c] Generated code documentation fixes (#4130)
* Fixed missing parameters names for obj-c generated code

* Obj-c sample regenerated
2016-11-05 23:13:51 +08:00
wing328
a70321e47f Merge pull request #3893 from 0xced/objc-no-custom-security-policy
[objc] Remove the custom security policy
2016-10-12 17:53:24 +08:00
wing328
59ec339679 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-10-09 12:26:29 +08:00
sylvain-abadie
94cd2cb6a0 [Objc] Added support for lower case discriminator (#3927)
* [Objc] Added support for lower case discriminator

* Updated Objc petstore samples

* Fixed code style
2016-10-06 23:29:55 +08:00
Cédric Luthi
4325e5cca1 [objc] Remove the custom security policy
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.
2016-09-29 00:23:22 +02:00
Mateusz Maćkowiak
4bb288c253 [Objc] Remove interface method duplicate 2016-09-14 16:10:19 +02:00
Mateusz Maćkowiak
086ee13e90 [Objc] CoreData builders remove old array data (#3787) 2016-09-14 18:46:30 +08:00
wing328
766b04a2bd Merge remote-tracking branch 'origin/master' into 2.3.0 2016-09-12 23:30:15 +08:00
Mateusz Maćkowiak
9ca27a760e [Objc] Fix core data unordered array content 2016-09-06 10:38:06 +02:00
wing328
da45cb7ff5 remove unnecessary changes for php codegen 2016-08-31 16:38:30 +08:00
Ville Skyttä
2fbec6d9eb Spelling fixes 2016-08-28 17:05:34 +03:00
Ville Skyttä
b4c139f19b Spelling fixes 2016-08-27 02:34:33 +03:00
Mateusz Maćkowiak
e40f9abdbb Fix problem with multitheard api client 2016-08-23 14:12:58 +02:00
Mateusz Maćkowiak
a893168291 [ObjC] Add version define and share default headers of each client 2016-08-17 10:21:24 +02:00
Wolfgang Berger
500f41902e Feature/objc tasks 2.3.0 (#3522)
* 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
2016-08-16 21:15:23 +08:00
wing328
37404909bf to set a default description if none is provided 2016-07-19 16:55:39 +08:00
wing328
3f6f4bfd86 fix objc readme doc 2016-07-03 21:49:33 +08:00