Skip to content

Commit 1e46514

Browse files
committed
Revert "[swift][client] Remove old objc samples"
This reverts commit b501899.
1 parent fd06c79 commit 1e46514

207 files changed

Lines changed: 16285 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## Build generated
6+
build/
7+
DerivedData
8+
9+
## Various settings
10+
*.pbxuser
11+
!default.pbxuser
12+
*.mode1v3
13+
!default.mode1v3
14+
*.mode2v3
15+
!default.mode2v3
16+
*.perspectivev3
17+
!default.perspectivev3
18+
xcuserdata
19+
20+
## Other
21+
*.xccheckout
22+
*.moved-aside
23+
*.xcuserstate
24+
*.xcscmblueprint
25+
26+
## Obj-C/Swift specific
27+
*.hmap
28+
*.ipa
29+
30+
# CocoaPods
31+
#
32+
# We recommend against adding the Pods directory to your .gitignore. However
33+
# you should judge for yourself, the pros and cons are mentioned at:
34+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35+
#
36+
# Pods/
37+
38+
# Carthage
39+
#
40+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
41+
# Carthage/Checkouts
42+
43+
Carthage/Build
44+
45+
# fastlane
46+
#
47+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48+
# screenshots whenever they are needed.
49+
# For more information about the recommended setup visit:
50+
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
51+
52+
fastlane/report.xml
53+
fastlane/screenshots
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.gitignore
2+
README.md
3+
SwaggerClient.podspec
4+
SwaggerClient/Api/SWGPetApi.h
5+
SwaggerClient/Api/SWGPetApi.m
6+
SwaggerClient/Api/SWGStoreApi.h
7+
SwaggerClient/Api/SWGStoreApi.m
8+
SwaggerClient/Api/SWGUserApi.h
9+
SwaggerClient/Api/SWGUserApi.m
10+
SwaggerClient/Core/JSONValueTransformer+ISO8601.h
11+
SwaggerClient/Core/JSONValueTransformer+ISO8601.m
12+
SwaggerClient/Core/SWGApi.h
13+
SwaggerClient/Core/SWGApiClient.h
14+
SwaggerClient/Core/SWGApiClient.m
15+
SwaggerClient/Core/SWGBasicAuthTokenProvider.h
16+
SwaggerClient/Core/SWGBasicAuthTokenProvider.m
17+
SwaggerClient/Core/SWGConfiguration.h
18+
SwaggerClient/Core/SWGDefaultConfiguration.h
19+
SwaggerClient/Core/SWGDefaultConfiguration.m
20+
SwaggerClient/Core/SWGJSONRequestSerializer.h
21+
SwaggerClient/Core/SWGJSONRequestSerializer.m
22+
SwaggerClient/Core/SWGLogger.h
23+
SwaggerClient/Core/SWGLogger.m
24+
SwaggerClient/Core/SWGObject.h
25+
SwaggerClient/Core/SWGObject.m
26+
SwaggerClient/Core/SWGQueryParamCollection.h
27+
SwaggerClient/Core/SWGQueryParamCollection.m
28+
SwaggerClient/Core/SWGResponseDeserializer.h
29+
SwaggerClient/Core/SWGResponseDeserializer.m
30+
SwaggerClient/Core/SWGSanitizer.h
31+
SwaggerClient/Core/SWGSanitizer.m
32+
SwaggerClient/Model/SWGCategory.h
33+
SwaggerClient/Model/SWGCategory.m
34+
SwaggerClient/Model/SWGCategoryManagedObject.h
35+
SwaggerClient/Model/SWGCategoryManagedObject.m
36+
SwaggerClient/Model/SWGCategoryManagedObjectBuilder.h
37+
SwaggerClient/Model/SWGCategoryManagedObjectBuilder.m
38+
SwaggerClient/Model/SWGModel.xcdatamodeld/.xccurrentversion
39+
SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel/contents
40+
SwaggerClient/Model/SWGOrder.h
41+
SwaggerClient/Model/SWGOrder.m
42+
SwaggerClient/Model/SWGOrderManagedObject.h
43+
SwaggerClient/Model/SWGOrderManagedObject.m
44+
SwaggerClient/Model/SWGOrderManagedObjectBuilder.h
45+
SwaggerClient/Model/SWGOrderManagedObjectBuilder.m
46+
SwaggerClient/Model/SWGPet.h
47+
SwaggerClient/Model/SWGPet.m
48+
SwaggerClient/Model/SWGPetManagedObject.h
49+
SwaggerClient/Model/SWGPetManagedObject.m
50+
SwaggerClient/Model/SWGPetManagedObjectBuilder.h
51+
SwaggerClient/Model/SWGPetManagedObjectBuilder.m
52+
SwaggerClient/Model/SWGTag.h
53+
SwaggerClient/Model/SWGTag.m
54+
SwaggerClient/Model/SWGTagManagedObject.h
55+
SwaggerClient/Model/SWGTagManagedObject.m
56+
SwaggerClient/Model/SWGTagManagedObjectBuilder.h
57+
SwaggerClient/Model/SWGTagManagedObjectBuilder.m
58+
SwaggerClient/Model/SWGUser.h
59+
SwaggerClient/Model/SWGUser.m
60+
SwaggerClient/Model/SWGUserManagedObject.h
61+
SwaggerClient/Model/SWGUserManagedObject.m
62+
SwaggerClient/Model/SWGUserManagedObjectBuilder.h
63+
SwaggerClient/Model/SWGUserManagedObjectBuilder.m
64+
docs/SWGCategory.md
65+
docs/SWGOrder.md
66+
docs/SWGPet.md
67+
docs/SWGPetApi.md
68+
docs/SWGStoreApi.md
69+
docs/SWGTag.md
70+
docs/SWGUser.md
71+
docs/SWGUserApi.md
72+
git_push.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.19.0-SNAPSHOT
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# SwaggerClient
2+
3+
This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters
4+
5+
This ObjC package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
6+
7+
- API version: 1.0.0
8+
- Package version:
9+
- Generator version: 7.19.0-SNAPSHOT
10+
- Build package: org.openapitools.codegen.languages.ObjcClientCodegen
11+
12+
## Requirements
13+
14+
The SDK requires [**ARC (Automatic Reference Counting)**](http://stackoverflow.com/questions/7778356/how-to-enable-disable-automatic-reference-counting) to be enabled in the Xcode project.
15+
16+
## Installation & Usage
17+
### Install from Github using [CocoaPods](https://cocoapods.org/)
18+
19+
Add the following to the Podfile:
20+
21+
```ruby
22+
pod 'SwaggerClient', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
23+
```
24+
25+
To specify a particular branch, append `, :branch => 'branch-name-here'`
26+
27+
To specify a particular commit, append `, :commit => '11aa22'`
28+
29+
### Install from local path using [CocoaPods](https://cocoapods.org/)
30+
31+
Put the SDK under your project folder (e.g. /path/to/objc_project/Vendor/SwaggerClient) and then add the following to the Podfile:
32+
33+
```ruby
34+
pod 'SwaggerClient', :path => 'Vendor/SwaggerClient'
35+
```
36+
37+
### Usage
38+
39+
Import the following:
40+
41+
```objc
42+
#import <SwaggerClient/SWGApiClient.h>
43+
#import <SwaggerClient/SWGDefaultConfiguration.h>
44+
// load models
45+
#import <SwaggerClient/SWGCategory.h>
46+
#import <SwaggerClient/SWGOrder.h>
47+
#import <SwaggerClient/SWGPet.h>
48+
#import <SwaggerClient/SWGTag.h>
49+
#import <SwaggerClient/SWGUser.h>
50+
// load API classes for accessing endpoints
51+
#import <SwaggerClient/SWGPetApi.h>
52+
#import <SwaggerClient/SWGStoreApi.h>
53+
#import <SwaggerClient/SWGUserApi.h>
54+
55+
```
56+
57+
## Recommendation
58+
59+
It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issues.
60+
61+
## Getting Started
62+
63+
Please follow the [installation procedure](#installation--usage) and then run the following:
64+
65+
```objc
66+
67+
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
68+
69+
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
70+
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
71+
72+
73+
SWGPet* *pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
74+
75+
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
76+
77+
// Add a new pet to the store
78+
[apiInstance addPetWithPet:pet
79+
completionHandler: ^(NSError* error) {
80+
if (error) {
81+
NSLog(@"Error: %@", error);
82+
}
83+
}];
84+
85+
```
86+
87+
## Documentation for API Endpoints
88+
89+
All URIs are relative to *http://petstore.swagger.io/v2*
90+
91+
Class | Method | HTTP request | Description
92+
------------ | ------------- | ------------- | -------------
93+
*SWGPetApi* | [**addPet**](docs/SWGPetApi.md#addpet) | **POST** /pet | Add a new pet to the store
94+
*SWGPetApi* | [**deletePet**](docs/SWGPetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
95+
*SWGPetApi* | [**findPetsByStatus**](docs/SWGPetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
96+
*SWGPetApi* | [**findPetsByTags**](docs/SWGPetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
97+
*SWGPetApi* | [**getPetById**](docs/SWGPetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
98+
*SWGPetApi* | [**updatePet**](docs/SWGPetApi.md#updatepet) | **PUT** /pet | Update an existing pet
99+
*SWGPetApi* | [**updatePetWithForm**](docs/SWGPetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
100+
*SWGPetApi* | [**uploadFile**](docs/SWGPetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
101+
*SWGStoreApi* | [**deleteOrder**](docs/SWGStoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
102+
*SWGStoreApi* | [**getInventory**](docs/SWGStoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
103+
*SWGStoreApi* | [**getOrderById**](docs/SWGStoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
104+
*SWGStoreApi* | [**placeOrder**](docs/SWGStoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
105+
*SWGUserApi* | [**createUser**](docs/SWGUserApi.md#createuser) | **POST** /user | Create user
106+
*SWGUserApi* | [**createUsersWithArrayInput**](docs/SWGUserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
107+
*SWGUserApi* | [**createUsersWithListInput**](docs/SWGUserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
108+
*SWGUserApi* | [**deleteUser**](docs/SWGUserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
109+
*SWGUserApi* | [**getUserByName**](docs/SWGUserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
110+
*SWGUserApi* | [**loginUser**](docs/SWGUserApi.md#loginuser) | **GET** /user/login | Logs user into the system
111+
*SWGUserApi* | [**logoutUser**](docs/SWGUserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
112+
*SWGUserApi* | [**updateUser**](docs/SWGUserApi.md#updateuser) | **PUT** /user/{username} | Updated user
113+
114+
115+
## Documentation For Models
116+
117+
- [SWGCategory](docs/SWGCategory.md)
118+
- [SWGOrder](docs/SWGOrder.md)
119+
- [SWGPet](docs/SWGPet.md)
120+
- [SWGTag](docs/SWGTag.md)
121+
- [SWGUser](docs/SWGUser.md)
122+
123+
124+
## Documentation For Authorization
125+
126+
127+
Authentication schemes defined for the API:
128+
### api_key
129+
130+
- **Type**: API key
131+
- **API key parameter name**: api_key
132+
- **Location**: HTTP header
133+
134+
### petstore_auth
135+
136+
- **Type**: OAuth
137+
- **Flow**: implicit
138+
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
139+
- **Scopes**:
140+
- **write:pets**: modify pets in your account
141+
- **read:pets**: read your pets
142+
143+
144+
## Author
145+
146+
147+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# Be sure to run `pod lib lint SwaggerClient.podspec' to ensure this is a
3+
# valid spec and remove all comments before submitting the spec.
4+
#
5+
# Any lines starting with a # are optional, but encouraged
6+
#
7+
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
8+
#
9+
10+
Pod::Spec.new do |s|
11+
s.name = "SwaggerClient"
12+
s.version = "1.0.0"
13+
14+
s.summary = "OpenAPI Petstore"
15+
s.description = <<-DESC
16+
This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters
17+
DESC
18+
19+
s.platform = :ios, '7.0'
20+
s.requires_arc = true
21+
22+
s.frameworks = 'SystemConfiguration', 'CoreData'
23+
24+
s.homepage = "https://github.com/openapitools/openapi-generator"
25+
s.license = "Proprietary"
26+
s.source = { :git => "https://github.com/openapitools/openapi-generator.git", :tag => "#{s.version}" }
27+
s.author = { "OpenAPI" => "team@openapitools.org" }
28+
29+
s.source_files = 'SwaggerClient/**/*.{m,h}'
30+
s.public_header_files = 'SwaggerClient/**/*.h'
31+
s.resources = 'SwaggerClient/**/*.{xcdatamodeld,xcdatamodel}'
32+
33+
s.dependency 'AFNetworking', '~> 3'
34+
s.dependency 'JSONModel', '~> 1.2'
35+
s.dependency 'ISO8601', '~> 0.6'
36+
end

0 commit comments

Comments
 (0)