diff --git a/bin/objc-petstore.sh b/bin/objc-petstore.sh index b5aec9abe8c..75c64341895 100755 --- a/bin/objc-petstore.sh +++ b/bin/objc-petstore.sh @@ -26,6 +26,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc/default -D appName=PetstoreClient" +ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc/default -D appName=PetstoreClient $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/objc-petstore-coredata.sh b/bin/openapi3/objc-petstore-coredata.sh new file mode 100755 index 00000000000..ed6b41e00ab --- /dev/null +++ b/bin/openapi3/objc-petstore-coredata.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +SCRIPT="$0" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="$@ generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -l objc -D apiDocs=false -D modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true -D appName=PetstoreClient" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/objc-petstore.sh b/bin/openapi3/objc-petstore.sh new file mode 100755 index 00000000000..593eae5a96f --- /dev/null +++ b/bin/openapi3/objc-petstore.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +SCRIPT="$0" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -l objc -o samples/client/petstore/objc/default -D appName=PetstoreClient $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e6397bc1b2b..248ff099e3a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2435,32 +2435,16 @@ public class DefaultCodegen implements CodegenConfig { LOGGER.info("JSON schema: " + codegenParameter.jsonSchema); } - // TODO need to revise the logic below - // move the defaultValue for headers, forms and params - /* - if (param instanceof QueryParameter) { - QueryParameter qp = (QueryParameter) parameter; - if (qp.getDefaultValue() != null) { - codegenParameter.defaultValue = qp.getDefaultValue().toString(); - } - } else if (param instanceof HeaderParameter) { - HeaderParameter hp = (HeaderParameter) parameter; - if (hp.getDefaultValue() != null) { - codegenParameter.defaultValue = hp.getDefaultValue().toString(); - } - } else if (param instanceof FormParameter) { - FormParameter fp = (FormParameter) parameter; - if (fp.getDefaultValue() != null) { - codegenParameter.defaultValue = fp.getDefaultValue().toString(); - } - }*/ - if (parameter.getExtensions() != null && !parameter.getExtensions().isEmpty()) { codegenParameter.vendorExtensions.putAll(parameter.getExtensions()); } if (parameter.getSchema() != null) { Schema parameterSchema = parameter.getSchema(); + // set default value + if (parameterSchema.getDefault() != null) { + codegenParameter.defaultValue = (String) parameterSchema.getDefault(); + } // TDOO revise collectionFormat String collectionFormat = null; if (ModelUtils.isArraySchema(parameterSchema)) { // for array parameter diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index b6c3bbdaa63..cc5a0a6314e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -531,6 +531,10 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { name = escapeSpecialWord(name); } + if (name.startsWith(classPrefix)) { + name = name.replaceFirst(classPrefix, ""); //remove the class prefix, e.g. SWGPet => Pet + } + // camelize (lower first character) the variable name // e.g. `pet_id` to `petId` name = camelize(name, true); @@ -685,12 +689,12 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { type = p.dataType; } - if ("NSString*".equalsIgnoreCase(type)) { + if ("NSString*".equalsIgnoreCase(type) || "NSString".equalsIgnoreCase(type)) { if (example == null) { example = p.paramName + "_example"; } example = "@\"" + escapeText(example) + "\""; - } else if ("NSNumber*".equals(type)) { + } else if ("NSNumber*".equalsIgnoreCase(type) || "NSNumber".equalsIgnoreCase(type)) { if (example == null) { example = "56"; } @@ -704,7 +708,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { if (example == null) { example = "True"; } - } else if ("NSURL*".equalsIgnoreCase(type)) { + } else if ("NSURL*".equalsIgnoreCase(type) || "NSURL".equalsIgnoreCase(type)) { if (example == null) { example = "/path/to/file"; } @@ -728,7 +732,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { // e.g. [[SWGPet alloc] init example = "[[" + type + " alloc] init]"; } else { - LOGGER.warn("Type " + type + " not handled properly in setParameterExampleValue"); + LOGGER.warn("Example value for " + type + " not handled properly in setParameterExampleValue"); } if (example == null) { diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore.json b/modules/openapi-generator/src/test/resources/3_0/petstore.json new file mode 100644 index 00000000000..cd75f402fe9 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/petstore.json @@ -0,0 +1,1005 @@ +{ + "openapi": "3.0.0", + "servers": [ + { + "url": "http://petstore.swagger.io/v2" + } + ], + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters", + "version": "1.0.0", + "title": "Swagger Petstore", + "termsOfService": "http://helloreverb.com/terms/", + "contact": { + "email": "apiteam@wordnik.com" + }, + "license": { + "name": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "paths": { + "/pet": { + "post": { + "tags": [ + "pet" + ], + "summary": "Add a new pet to the store", + "description": "", + "operationId": "addPet", + "responses": { + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Pet" + } + }, + "put": { + "tags": [ + "pet" + ], + "summary": "Update an existing pet", + "description": "", + "operationId": "updatePet", + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + }, + "405": { + "description": "Validation exception" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Pet" + } + } + }, + "/pet/findByStatus": { + "get": { + "tags": [ + "pet" + ], + "summary": "Finds Pets by status", + "description": "Multiple status values can be provided with comma separated strings", + "operationId": "findPetsByStatus", + "parameters": [ + { + "name": "status", + "in": "query", + "description": "Status values that need to be considered for filter", + "required": false, + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "available", + "pending", + "sold" + ] + }, + "default": "available" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + }, + "examples": { + "response": { + "value": { + "name": "Puma", + "type": "Dog", + "color": "Black", + "gender": "Female", + "breed": "Mixed" + } + } + } + }, + "application/xml": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + } + }, + "/pet/findByTags": { + "get": { + "tags": [ + "pet" + ], + "summary": "Finds Pets by tags", + "description": "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId": "findPetsByTags", + "parameters": [ + { + "name": "tags", + "in": "query", + "description": "Tags to filter by", + "required": false, + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/xml": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "400": { + "description": "Invalid tag value" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "deprecated": true + } + }, + "/pet/{petId}": { + "get": { + "tags": [ + "pet" + ], + "summary": "Find pet by ID", + "description": "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", + "operationId": "getPetById", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet that needs to be fetched", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + } + }, + "security": [ + { + "api_key": [] + }, + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + }, + "post": { + "tags": [ + "pet" + ], + "summary": "Updates a pet in the store with form data", + "description": "", + "operationId": "updatePetWithForm", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet that needs to be updated", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Updated name of the pet", + "type": "string" + }, + "status": { + "description": "Updated status of the pet", + "type": "string" + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "pet" + ], + "summary": "Deletes a pet", + "description": "", + "operationId": "deletePet", + "parameters": [ + { + "name": "api_key", + "in": "header", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "petId", + "in": "path", + "description": "Pet id to delete", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "400": { + "description": "Invalid pet value" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + } + }, + "/pet/{petId}/uploadImage": { + "post": { + "tags": [ + "pet" + ], + "summary": "uploads an image", + "description": "", + "operationId": "uploadFile", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet to update", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "default": { + "description": "successful operation" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "additionalMetadata": { + "description": "Additional data to pass to server", + "type": "string" + }, + "file": { + "description": "file to upload", + "type": "string", + "format": "binary" + } + } + } + } + } + } + } + }, + "/store/inventory": { + "get": { + "tags": [ + "store" + ], + "summary": "Returns pet inventories by status", + "description": "Returns a map of status codes to quantities", + "operationId": "getInventory", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + } + }, + "application/xml": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/store/order": { + "post": { + "tags": [ + "store" + ], + "summary": "Place an order for a pet", + "description": "", + "operationId": "placeOrder", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Invalid Order" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + }, + "description": "order placed for purchasing the pet" + } + } + }, + "/store/order/{orderId}": { + "get": { + "tags": [ + "store" + ], + "summary": "Find purchase order by ID", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId": "getOrderById", + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "ID of pet that needs to be fetched", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Order not found" + } + } + }, + "delete": { + "tags": [ + "store" + ], + "summary": "Delete purchase order by ID", + "description": "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId": "deleteOrder", + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "ID of the order that needs to be deleted", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Order not found" + } + } + } + }, + "/user": { + "post": { + "tags": [ + "user" + ], + "summary": "Create user", + "description": "This can only be done by the logged in user.", + "operationId": "createUser", + "responses": { + "default": { + "description": "successful operation" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "Created user object" + } + } + }, + "/user/createWithArray": { + "post": { + "tags": [ + "user" + ], + "summary": "Creates list of users with given input array", + "description": "", + "operationId": "createUsersWithArrayInput", + "responses": { + "default": { + "description": "successful operation" + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/UserArray" + } + } + }, + "/user/createWithList": { + "post": { + "tags": [ + "user" + ], + "summary": "Creates list of users with given input array", + "description": "", + "operationId": "createUsersWithListInput", + "responses": { + "default": { + "description": "successful operation" + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/UserArray" + } + } + }, + "/user/login": { + "get": { + "tags": [ + "user" + ], + "summary": "Logs user into the system", + "description": "", + "operationId": "loginUser", + "parameters": [ + { + "name": "username", + "in": "query", + "description": "The user name for login", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "description": "The password for login in clear text", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "string" + } + }, + "application/xml": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Invalid username/password supplied" + } + } + } + }, + "/user/logout": { + "get": { + "tags": [ + "user" + ], + "summary": "Logs out current logged in user session", + "description": "", + "operationId": "logoutUser", + "responses": { + "default": { + "description": "successful operation" + } + } + } + }, + "/user/{username}": { + "get": { + "tags": [ + "user" + ], + "summary": "Get user by user name", + "description": "", + "operationId": "getUserByName", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "The name that needs to be fetched. Use user1 for testing. ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Invalid username supplied" + }, + "404": { + "description": "User not found" + } + } + }, + "put": { + "tags": [ + "user" + ], + "summary": "Updated user", + "description": "This can only be done by the logged in user.", + "operationId": "updateUser", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "name that need to be deleted", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Invalid user supplied" + }, + "404": { + "description": "User not found" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "Updated user object" + } + }, + "delete": { + "tags": [ + "user" + ], + "summary": "Delete user", + "description": "This can only be done by the logged in user.", + "operationId": "deleteUser", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "The name that needs to be deleted", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Invalid username supplied" + }, + "404": { + "description": "User not found" + } + } + } + } + }, + "components": { + "requestBodies": { + "UserArray": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "description": "List of user object" + }, + "Pet": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "description": "Pet object that needs to be added to the store" + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + }, + "petstore_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + } + }, + "schemas": { + "User": { + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "password": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "userStatus": { + "type": "integer", + "format": "int32", + "description": "User Status" + } + }, + "xml": { + "name": "User" + } + }, + "Category": { + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Category" + } + }, + "Pet": { + "required": [ + "name", + "photoUrls" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "category": { + "$ref": "#/components/schemas/Category" + }, + "name": { + "type": "string", + "example": "doggie" + }, + "photoUrls": { + "type": "array", + "xml": { + "name": "photoUrl", + "wrapped": true + }, + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "xml": { + "name": "tag", + "wrapped": true + }, + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "status": { + "type": "string", + "description": "pet status in the store", + "enum": [ + "available", + "pending", + "sold" + ] + } + }, + "xml": { + "name": "Pet" + } + }, + "Tag": { + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Tag" + } + }, + "Order": { + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "petId": { + "type": "integer", + "format": "int64" + }, + "quantity": { + "type": "integer", + "format": "int32" + }, + "shipDate": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "description": "Order Status", + "enum": [ + "placed", + "approved", + "delivered" + ] + }, + "complete": { + "type": "boolean" + } + }, + "xml": { + "name": "Order" + } + } + } + } +} diff --git a/samples/client/petstore/objc/core-data/.swagger-codegen/VERSION b/samples/client/petstore/objc/core-data/.swagger-codegen/VERSION index f9f7450d135..096bf47efe3 100644 --- a/samples/client/petstore/objc/core-data/.swagger-codegen/VERSION +++ b/samples/client/petstore/objc/core-data/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/README.md b/samples/client/petstore/objc/core-data/README.md index aca3b5b6e33..5be7ae7a20a 100644 --- a/samples/client/petstore/objc/core-data/README.md +++ b/samples/client/petstore/objc/core-data/README.md @@ -1,12 +1,12 @@ # SwaggerClient -This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 1.0.0 - Package version: -- Build package: io.swagger.codegen.languages.ObjcClientCodegen +- Build package: org.openapitools.codegen.languages.ObjcClientCodegen ## Requirements @@ -69,12 +69,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet *pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi *apiInstance = [[SWGPetApi alloc] init]; // Add a new pet to the store -[apiInstance addPetWithBody:body +[apiInstance addPetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); diff --git a/samples/client/petstore/objc/core-data/SwaggerClient.podspec b/samples/client/petstore/objc/core-data/SwaggerClient.podspec index d00714358b1..f5df65fcbb0 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient.podspec +++ b/samples/client/petstore/objc/core-data/SwaggerClient.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.summary = "Swagger Petstore" s.description = <<-DESC - This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters + This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters DESC s.platform = :ios, '7.0' diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h index 2764ca12956..22552170850 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com @@ -26,12 +26,12 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Add a new pet to the store /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:405 message:"Invalid input" /// /// @return void --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler; @@ -92,14 +92,14 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Update an existing pet /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:400 message:"Invalid ID supplied", /// code:404 message:"Pet not found", /// code:405 message:"Validation exception" /// /// @return void --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index 805608667d5..5562c1051d6 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -52,11 +52,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Add a new pet to the store /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -66,7 +66,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -75,7 +75,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; // Authentication setting NSArray *authSettings = @[@"petstore_auth"]; @@ -83,7 +83,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -141,7 +141,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; headerParams[@"api_key"] = apiKey; } // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -363,11 +363,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Update an existing pet /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -377,7 +377,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -386,7 +386,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; // Authentication setting NSArray *authSettings = @[@"petstore_auth"]; @@ -394,7 +394,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"PUT" @@ -452,7 +452,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -532,7 +532,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h index b7289e68f14..61f4f6cd387 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com @@ -64,13 +64,13 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// Place an order for a pet /// /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// code:200 message:"successful operation", /// code:400 message:"Invalid Order" /// /// @return SWGOrder* --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m index ebf27ab982a..5e8c26fc5e0 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m @@ -80,7 +80,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -240,11 +240,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// Place an order for a pet /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// @returns SWGOrder* /// --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; @@ -263,7 +263,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -271,7 +271,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = order; return [self.apiClient requestWithPath: resourcePath method: @"POST" diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h index 02ef99a19a6..67853af1ecf 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com @@ -26,36 +26,36 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// Create user /// This can only be done by the logged in user. /// -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; @@ -116,14 +116,14 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// This can only be done by the logged in user. /// /// @param username name that need to be deleted -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// code:400 message:"Invalid user supplied", /// code:404 message:"User not found" /// /// @return void -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m index 2a1c4ecda81..67adcd9cd87 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m @@ -52,11 +52,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Create user /// This can only be done by the logged in user. -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; @@ -66,7 +66,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -75,7 +75,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -83,7 +83,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -107,11 +107,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; @@ -121,7 +121,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -138,7 +138,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -162,11 +162,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; @@ -176,7 +176,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -193,7 +193,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -245,7 +245,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -428,7 +428,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -470,12 +470,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// This can only be done by the logged in user. /// @param username name that need to be deleted /// -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// @returns void /// -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -499,7 +499,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -508,7 +508,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -516,7 +516,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"PUT" diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h index d5b3e9291bc..994eb898095 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/JSONValueTransformer+ISO8601.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h index bdc690332f5..cab67b1c7e4 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h index 099fb88c335..884ed8d27e9 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h @@ -5,7 +5,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com @@ -66,7 +66,7 @@ extern NSString *const SWGResponseObjectErrorKey; /** * Updates header parameters and query parameters for authentication * - * @param headers The header parameter will be udpated, passed by pointer to pointer. + * @param headers The header parameter will be updated, passed by pointer to pointer. * @param querys The query parameters will be updated, passed by pointer to pointer. * @param authSettings The authentication names NSArray. */ diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m index 4b1d014d2bc..8fa7fbf394d 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m @@ -90,7 +90,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { - (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { - NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + NSURLSessionDataTask *task = [self dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { SWGDebugLogResponse(response, responseObject,request,error); if(!error) { completionBlock(responseObject, nil); @@ -112,7 +112,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { __block NSString * tempFolderPath = [self.configuration.tempFolderPath copy]; - NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + NSURLSessionDataTask* task = [self dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { SWGDebugLogResponse(response, responseObject,request,error); if(error) { diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h index 195b8192494..b08437f663a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h index bd56b94f4e6..7cc874de9f9 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGJSONRequestSerializer.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGJSONRequestSerializer.h index 6307790a23b..ab0d3cefb28 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGJSONRequestSerializer.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGJSONRequestSerializer.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.h index 40c11c52c0d..fdf2b3f02d6 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGLogger.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.h index 1cfb88daf0b..f7ed953cb64 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.h index 72a14a6e68b..43109ac49d2 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h index 3ee3c90569c..0e9ad7c9175 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h index a896caea209..2f97f8c5372 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGSanitizer.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategory.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategory.h index 160295b0f3a..ca9ab0b7482 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategory.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategory.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObject.h index 07b9a6a3544..30a9d5df7f5 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObject.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObject.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObjectBuilder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObjectBuilder.h index 2b2bf631551..a788b6e6e2a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObjectBuilder.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGCategoryManagedObjectBuilder.h @@ -7,7 +7,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrder.h index c0321482a09..d88d311797a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrder.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrder.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObject.h index 99d6149fb35..02a6d5dcc03 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObject.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObject.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObjectBuilder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObjectBuilder.h index 54233ce98b7..2947698148b 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObjectBuilder.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGOrderManagedObjectBuilder.h @@ -7,7 +7,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPet.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPet.h index 4b026d071c1..665a61618a3 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPet.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPet.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObject.h index 8e7564d2248..2a8012e63aa 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObject.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObject.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObjectBuilder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObjectBuilder.h index 350924cfa2a..f3e2030b645 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObjectBuilder.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGPetManagedObjectBuilder.h @@ -9,7 +9,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTag.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTag.h index 6a742d3c9dd..7b3620f456a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTag.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTag.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObject.h index f6724495b37..d8fda20fdee 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObject.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObject.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObjectBuilder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObjectBuilder.h index 04d9a0a13e9..d705018da78 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObjectBuilder.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGTagManagedObjectBuilder.h @@ -7,7 +7,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUser.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUser.h index 31a524dc7f0..09cd3b24cfa 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUser.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUser.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObject.h index 75b8f477d48..06c926f9d7a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObject.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObject.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObjectBuilder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObjectBuilder.h index 23d83e0e603..49b2f7a1963 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObjectBuilder.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGUserManagedObjectBuilder.h @@ -7,7 +7,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/core-data/git_push.sh b/samples/client/petstore/objc/core-data/git_push.sh index ed374619b13..ae01b182ae9 100644 --- a/samples/client/petstore/objc/core-data/git_push.sh +++ b/samples/client/petstore/objc/core-data/git_push.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/samples/client/petstore/objc/default/.swagger-codegen/VERSION b/samples/client/petstore/objc/default/.swagger-codegen/VERSION index f9f7450d135..096bf47efe3 100644 --- a/samples/client/petstore/objc/default/.swagger-codegen/VERSION +++ b/samples/client/petstore/objc/default/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/README.md b/samples/client/petstore/objc/default/README.md index aca3b5b6e33..5be7ae7a20a 100644 --- a/samples/client/petstore/objc/default/README.md +++ b/samples/client/petstore/objc/default/README.md @@ -1,12 +1,12 @@ # SwaggerClient -This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 1.0.0 - Package version: -- Build package: io.swagger.codegen.languages.ObjcClientCodegen +- Build package: org.openapitools.codegen.languages.ObjcClientCodegen ## Requirements @@ -69,12 +69,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet *pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi *apiInstance = [[SWGPetApi alloc] init]; // Add a new pet to the store -[apiInstance addPetWithBody:body +[apiInstance addPetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); diff --git a/samples/client/petstore/objc/default/SwaggerClient.podspec b/samples/client/petstore/objc/default/SwaggerClient.podspec index e43cdfd5a09..541e786c4bc 100644 --- a/samples/client/petstore/objc/default/SwaggerClient.podspec +++ b/samples/client/petstore/objc/default/SwaggerClient.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.summary = "Swagger Petstore" s.description = <<-DESC - This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters + This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters DESC s.platform = :ios, '7.0' diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h index 2764ca12956..22552170850 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com @@ -26,12 +26,12 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Add a new pet to the store /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:405 message:"Invalid input" /// /// @return void --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler; @@ -92,14 +92,14 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Update an existing pet /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:400 message:"Invalid ID supplied", /// code:404 message:"Pet not found", /// code:405 message:"Validation exception" /// /// @return void --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index 805608667d5..5562c1051d6 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -52,11 +52,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Add a new pet to the store /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -66,7 +66,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -75,7 +75,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; // Authentication setting NSArray *authSettings = @[@"petstore_auth"]; @@ -83,7 +83,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -141,7 +141,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; headerParams[@"api_key"] = apiKey; } // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -363,11 +363,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Update an existing pet /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -377,7 +377,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -386,7 +386,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; // Authentication setting NSArray *authSettings = @[@"petstore_auth"]; @@ -394,7 +394,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"PUT" @@ -452,7 +452,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -532,7 +532,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h index b7289e68f14..61f4f6cd387 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com @@ -64,13 +64,13 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// Place an order for a pet /// /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// code:200 message:"successful operation", /// code:400 message:"Invalid Order" /// /// @return SWGOrder* --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m index ebf27ab982a..5e8c26fc5e0 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m @@ -80,7 +80,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -240,11 +240,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// Place an order for a pet /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// @returns SWGOrder* /// --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; @@ -263,7 +263,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -271,7 +271,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = order; return [self.apiClient requestWithPath: resourcePath method: @"POST" diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h index 02ef99a19a6..67853af1ecf 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com @@ -26,36 +26,36 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// Create user /// This can only be done by the logged in user. /// -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; @@ -116,14 +116,14 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// This can only be done by the logged in user. /// /// @param username name that need to be deleted -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// code:400 message:"Invalid user supplied", /// code:404 message:"User not found" /// /// @return void -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m index 2a1c4ecda81..67adcd9cd87 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m @@ -52,11 +52,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Create user /// This can only be done by the logged in user. -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; @@ -66,7 +66,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -75,7 +75,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -83,7 +83,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -107,11 +107,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; @@ -121,7 +121,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -138,7 +138,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -162,11 +162,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; @@ -176,7 +176,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -193,7 +193,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -245,7 +245,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -428,7 +428,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -470,12 +470,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// This can only be done by the logged in user. /// @param username name that need to be deleted /// -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// @returns void /// -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -499,7 +499,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; // HTTP header `Accept` - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]]; + NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]]; if(acceptHeader.length > 0) { headerParams[@"Accept"] = acceptHeader; } @@ -508,7 +508,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -516,7 +516,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"PUT" diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h b/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h index d5b3e9291bc..994eb898095 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/JSONValueTransformer+ISO8601.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h index bdc690332f5..cab67b1c7e4 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApi.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h index 4d219d8131c..884ed8d27e9 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h @@ -5,7 +5,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h index 195b8192494..b08437f663a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h @@ -4,7 +4,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h index bd56b94f4e6..7cc874de9f9 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONRequestSerializer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONRequestSerializer.h index 6307790a23b..ab0d3cefb28 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONRequestSerializer.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONRequestSerializer.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.h index 40c11c52c0d..fdf2b3f02d6 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGLogger.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.h index 1cfb88daf0b..f7ed953cb64 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.h index 72a14a6e68b..43109ac49d2 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h index 3ee3c90569c..0e9ad7c9175 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h index a896caea209..2f97f8c5372 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGSanitizer.h @@ -2,7 +2,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h index 160295b0f3a..ca9ab0b7482 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h index c0321482a09..d88d311797a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h index 4b026d071c1..665a61618a3 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h index 6a742d3c9dd..7b3620f456a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h index 31a524dc7f0..09cd3b24cfa 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h @@ -3,7 +3,7 @@ /** * Swagger Petstore -* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 * Contact: apiteam@wordnik.com diff --git a/samples/client/petstore/objc/default/docs/SWGPetApi.md b/samples/client/petstore/objc/default/docs/SWGPetApi.md index 8740be886b3..4299cfc54ab 100644 --- a/samples/client/petstore/objc/default/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/default/docs/SWGPetApi.md @@ -16,14 +16,12 @@ Method | HTTP request | Description # **addPet** ```objc --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler; ``` Add a new pet to the store - - ### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -32,12 +30,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; // Add a new pet to the store -[apiInstance addPetWithBody:body +[apiInstance addPetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGPetApi->addPet: %@", error); @@ -49,7 +47,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] + **pet** | [**SWGPet**](SWGPet.md)| Pet object that needs to be added to the store | [optional] ### Return type @@ -61,8 +59,8 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: application/json, application/xml + - **Content-Type**: Not defined + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -75,8 +73,6 @@ void (empty response body) Deletes a pet - - ### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -118,7 +114,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -294,14 +290,12 @@ Name | Type | Description | Notes # **updatePet** ```objc --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet completionHandler: (void (^)(NSError* error)) handler; ``` Update an existing pet - - ### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -310,12 +304,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; // Update an existing pet -[apiInstance updatePetWithBody:body +[apiInstance updatePetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGPetApi->updatePet: %@", error); @@ -327,7 +321,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] + **pet** | [**SWGPet**](SWGPet.md)| Pet object that needs to be added to the store | [optional] ### Return type @@ -339,8 +333,8 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: application/json, application/xml + - **Content-Type**: Not defined + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -354,8 +348,6 @@ void (empty response body) Updates a pet in the store with form data - - ### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -400,7 +392,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -414,8 +406,6 @@ void (empty response body) uploads an image - - ### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -426,7 +416,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; NSNumber* petId = @789; // ID of pet to update NSString* additionalMetadata = @"additionalMetadata_example"; // Additional data to pass to server (optional) -NSURL* file = [NSURL fileURLWithPath:@"/path/to/file.txt"]; // file to upload (optional) +NSURL* file = [NSURL fileURLWithPath:@"/path/to/file"]; // file to upload (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; @@ -447,7 +437,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **NSNumber***| ID of pet to update | **additionalMetadata** | **NSString***| Additional data to pass to server | [optional] - **file** | **NSURL***| file to upload | [optional] + **file** | **NSURL*****NSURL***| file to upload | [optional] ### Return type @@ -460,7 +450,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/objc/default/docs/SWGStoreApi.md b/samples/client/petstore/objc/default/docs/SWGStoreApi.md index 83e22f3b42e..c461724b876 100644 --- a/samples/client/petstore/objc/default/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/default/docs/SWGStoreApi.md @@ -53,7 +53,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -162,23 +162,21 @@ No authorization required # **placeOrder** ```objc --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; ``` Place an order for a pet - - ### Example ```objc -SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) +SWGOrder order = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; // Place an order for a pet -[apiInstance placeOrderWithBody:body +[apiInstance placeOrderWithOrder:order completionHandler: ^(SWGOrder* output, NSError* error) { if (output) { NSLog(@"%@", output); @@ -193,7 +191,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional] + **order** | [**SWGOrder**](SWGOrder.md)| order placed for purchasing the pet | [optional] ### Return type @@ -205,7 +203,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/xml [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/objc/default/docs/SWGUserApi.md b/samples/client/petstore/objc/default/docs/SWGUserApi.md index 108f6b6aa54..e72f9f1ab90 100644 --- a/samples/client/petstore/objc/default/docs/SWGUserApi.md +++ b/samples/client/petstore/objc/default/docs/SWGUserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** ```objc --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -27,12 +27,12 @@ This can only be done by the logged in user. ### Example ```objc -SWGUser* body = [[SWGUser alloc] init]; // Created user object (optional) +SWGUser user = [[SWGUser alloc] init]; // Created user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Create user -[apiInstance createUserWithBody:body +[apiInstance createUserWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUser: %@", error); @@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGUser***](SWGUser.md)| Created user object | [optional] + **user** | [**SWGUser**](SWGUser.md)| Created user object | [optional] ### Return type @@ -56,30 +56,28 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Content-Type**: application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **createUsersWithArrayInput** ```objc --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; ``` Creates list of users with given input array - - ### Example ```objc -NSArray* body = @[[[SWGUser alloc] init]]; // List of user object (optional) +NSArray* user = @[[[SWGUser alloc] init]]; // List of user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Creates list of users with given input array -[apiInstance createUsersWithArrayInputWithBody:body +[apiInstance createUsersWithArrayInputWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUsersWithArrayInput: %@", error); @@ -91,7 +89,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] + **user** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] ### Return type @@ -104,29 +102,27 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **createUsersWithListInput** ```objc --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; ``` Creates list of users with given input array - - ### Example ```objc -NSArray* body = @[[[SWGUser alloc] init]]; // List of user object (optional) +NSArray* user = @[[[SWGUser alloc] init]]; // List of user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Creates list of users with given input array -[apiInstance createUsersWithListInputWithBody:body +[apiInstance createUsersWithListInputWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUsersWithListInput: %@", error); @@ -138,7 +134,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] + **user** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] ### Return type @@ -151,7 +147,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -198,7 +194,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -210,8 +206,6 @@ No authorization required Get user by user name - - ### Example ```objc @@ -261,8 +255,6 @@ No authorization required Logs user into the system - - ### Example ```objc @@ -314,8 +306,6 @@ No authorization required Logs out current logged in user session - - ### Example ```objc @@ -345,14 +335,14 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updateUser** ```objc -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -364,13 +354,13 @@ This can only be done by the logged in user. ```objc NSString* username = @"username_example"; // name that need to be deleted -SWGUser* body = [[SWGUser alloc] init]; // Updated user object (optional) +SWGUser user = [[SWGUser alloc] init]; // Updated user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Updated user [apiInstance updateUserWithUsername:username - body:body + user:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->updateUser: %@", error); @@ -383,7 +373,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **NSString***| name that need to be deleted | - **body** | [**SWGUser***](SWGUser.md)| Updated user object | [optional] + **user** | [**SWGUser**](SWGUser.md)| Updated user object | [optional] ### Return type @@ -395,8 +385,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json, application/xml + - **Content-Type**: application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)