openapi-generator/samples/client/petstore-security-test/objc
Jérémie Bresson 7ecd5f3566
Rename "swagger" to "openapi" (#191)
* Rename ".swagger-codegen-ignore" to ".openapi-generator-ignore"
* Rename setGenerateSwaggerMetadata(Boolean) to setGenerateMetadata(Boolean)
* Rename Metadata Folder to .openapi-generator
2018-04-22 21:28:17 +02:00
..
.openapi-generator Rename "swagger" to "openapi" (#191) 2018-04-22 21:28:17 +02:00
docs replaced SWG by classPrefix and ran tests (#4871) 2017-03-03 17:29:16 +08:00
SwaggerClient 7644 objc deprecated afnetworking datataskwithrequest (#7645) 2018-02-18 22:58:57 +08:00
.gitignore Add more security samples (#3344) 2016-07-12 19:51:28 +08:00
.openapi-generator-ignore Rename "swagger" to "openapi" (#191) 2018-04-22 21:28:17 +02:00
git_push.sh 7644 objc deprecated afnetworking datataskwithrequest (#7645) 2018-02-18 22:58:57 +08:00
LICENSE Add more security samples (#3344) 2016-07-12 19:51:28 +08:00
README.md replaced SWG by classPrefix and ran tests (#4871) 2017-03-03 17:29:16 +08:00
SwaggerClient.podspec replaced SWG by classPrefix and ran tests (#4871) 2017-03-03 17:29:16 +08:00

SwaggerClient

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \ *_/ ' " =end --

This ObjC package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0 *_/ ' " =end -- \r\n \n \r
  • Package version:
  • Build package: io.swagger.codegen.languages.ObjcClientCodegen

Requirements

The SDK requires ARC (Automatic Reference Counting) to be enabled in the Xcode project.

Installation & Usage

Install from Github using CocoaPods

Add the following to the Podfile:

pod 'SwaggerClient', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

To specify a particular branch, append , :branch => 'branch-name-here'

To specify a particular commit, append , :commit => '11aa22'

Install from local path using CocoaPods

Put the SDK under your project folder (e.g. /path/to/objc_project/Vendor/SwaggerClient) and then add the following to the Podfile:

pod 'SwaggerClient', :path => 'Vendor/SwaggerClient'

Usage

Import the following:

#import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGDefaultConfiguration.h>
// load models
#import <SwaggerClient/SWGReturn.h>
// load API classes for accessing endpoints
#import <SwaggerClient/SWGFakeApi.h>

Recommendation

It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issues.

Getting Started

Please follow the installation procedure and then run the following:



NSString* *testCodeInjectEndRnNR = @"testCodeInjectEndRnNR_example"; // To test code injection *_/ ' \" =end -- \\r\\n \\n \\r (optional)

SWGFakeApi *apiInstance = [[SWGFakeApi alloc] init];

// To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
[apiInstance testCodeInjectEndRnNRWithTestCodeInjectEndRnNR:testCodeInjectEndRnNR
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

Documentation for API Endpoints

All URIs are relative to *https://petstore.swagger.io / ' &quot; =end -- \r\n \n \r/v2 */ ' &quot; =end -- \r\n \n \r

Class Method HTTP request Description
SWGFakeApi testCodeInjectEndRnNR PUT /fake To test code injection *_/ ' &quot; =end -- \r\n \n \r

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key
  • API key parameter name: api_key */ ' " =end -- \r\n \n \r
  • Location: HTTP header

petstore_auth

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: http://petstore.swagger.io/api/oauth/dialog
  • Scopes:
  • write:pets: modify pets in your account *_/ ' " =end -- \r\n \n \r
  • read:pets: read your pets *_/ ' " =end -- \r\n \n \r

Author

apiteam@swagger.io *_/ ' &quot; =end -- \r\n \n \r