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 3cc91802f3f..21adffc59c5 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 @@ -4086,7 +4086,43 @@ public class DefaultCodegen implements CodegenConfig { CodegenParameter codegenParameter = CodegenModelFactory.newInstance(CodegenModelType.PARAMETER); // key => property name // value => property schema - codegenParameter = fromFormProperty(entry.getKey(), entry.getValue(), imports); + String collectionFormat = null; + Schema s = entry.getValue(); + // array of schema + if (ModelUtils.isArraySchema(s)) { + final ArraySchema arraySchema = (ArraySchema) s; + Schema inner = arraySchema.getItems(); + if (inner == null) { + LOGGER.warn("warning! No inner type supplied for array parameter \"" + s.getName() + "\", using String"); + inner = new StringSchema().description("//TODO automatically added by openapi-generator due to missing iner type definition in the spec"); + arraySchema.setItems(inner); + } + + //TODO fix collectformat for form parameters + //collectionFormat = getCollectionFormat(s); + // default to csv: + collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat; + codegenParameter = fromFormProperty(entry.getKey(), inner, imports); + + CodegenProperty codegenProperty = fromProperty("inner", inner); + codegenParameter.items = codegenProperty; + codegenParameter.baseType = codegenProperty.datatype; + codegenParameter.isContainer = true; + codegenParameter.isListContainer = true; + codegenParameter.description = s.getDescription(); + + // recursively add import + while (codegenProperty != null) { + imports.add(codegenProperty.baseType); + codegenProperty = codegenProperty.items; + } + + } else if (ModelUtils.isMapSchema(s)) { + LOGGER.error("Map of form parameters not supported. Please report the issue to https://github.com/openapitools/openapi-generator if you need help."); + continue; + } else { + codegenParameter = fromFormProperty(entry.getKey(), entry.getValue(), imports); + } // Set 'required' flag defined in the schema element if (!codegenParameter.required && schema.getRequired() != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 349727895ea..4305ea8d4a3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -476,8 +476,16 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { } @Override - public String toDefaultValue(Schema prop) { - // nil + public String toDefaultValue(Schema p) { + if (ModelUtils.isIntegerSchema(p) || ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) { + if (p.getDefault() != null) { + return p.getDefault().toString(); + } + } else if (ModelUtils.isStringSchema(p)) { + if (p.getDefault() != null) { + return "\"" + escapeText((String) p.getDefault()) + "\""; + } + } return null; } @@ -621,7 +629,12 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { @Override public String toEnumValue(String value, String datatype) { - return String.valueOf(value); + // for string, array of string + if ("String".equals(datatype) || "[String]".equals(datatype) || "[String:String]".equals(datatype)) { + return "\"" + String.valueOf(value) + "\""; + } else { + return String.valueOf(value); + } } @Override diff --git a/modules/openapi-generator/src/main/resources/swift4/api.mustache b/modules/openapi-generator/src/main/resources/swift4/api.mustache index 4a505596c60..3285a62ff1b 100644 --- a/modules/openapi-generator/src/main/resources/swift4/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/api.mustache @@ -23,8 +23,12 @@ open class {{classname}} { /** * enum for parameter {{paramName}} */ - public enum {{enumName}}_{{operationId}}: {{^isContainer}}{{{dataType}}}{{/isContainer}}{{#isContainer}}String{{/isContainer}} { {{#allowableValues}}{{#enumVars}} - case {{name}} = {{#isContainer}}"{{/isContainer}}{{#isString}}"{{/isString}}{{{value}}}{{#isString}}"{{/isString}}{{#isContainer}}"{{/isContainer}}{{/enumVars}}{{/allowableValues}} + public enum {{enumName}}_{{operationId}}: {{^isContainer}}{{{dataType}}}{{/isContainer}}{{#isContainer}}String{{/isContainer}} { + {{#allowableValues}} + {{#enumVars}} + case {{name}} = {{{value}}} + {{/enumVars}} + {{/allowableValues}} } {{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache b/modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache index 0b5bebe0ebd..91c2efd54af 100644 --- a/modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache @@ -1,4 +1,7 @@ public enum {{classname}}: {{dataType}}, Codable { -{{#allowableValues}}{{#enumVars}} case {{name}} = "{{{value}}}" -{{/enumVars}}{{/allowableValues}} +{{#allowableValues}} +{{#enumVars}} + case {{name}} = {{{value}}} +{{/enumVars}} +{{/allowableValues}} } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache b/modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache index c713edb31e2..f64aa4b1648 100644 --- a/modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache @@ -1,3 +1,7 @@ - public enum {{enumName}}: {{^isContainer}}{{datatype}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, Codable { {{#allowableValues}}{{#enumVars}} - case {{name}} = {{#isContainer}}"{{/isContainer}}{{#isString}}"{{/isString}}{{{value}}}{{#isString}}"{{/isString}}{{#isContainer}}"{{/isContainer}}{{/enumVars}}{{/allowableValues}} + public enum {{enumName}}: {{^isContainer}}{{datatype}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, Codable { + {{#allowableValues}} + {{#enumVars}} + case {{name}} = {{{value}}} + {{/enumVars}} + {{/allowableValues}} } \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIHelper.swift index 81e7286d6d4..3c7b53f8149 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIHelper.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIHelper.swift @@ -1,7 +1,7 @@ // APIHelper.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs.swift index 2c2fc3157de..8cae3aacfe5 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs.swift @@ -1,7 +1,7 @@ // APIs.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift index 1b380fcd9dd..26be37655d4 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift @@ -1,8 +1,8 @@ // // AnotherFakeAPI.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -28,6 +28,9 @@ open class AnotherFakeAPI { To test special tags - PATCH /another-fake/dummy - To test special tags + - examples: [{contentType=application/json, example={ + "client" : "client" +}}] - parameter client: (body) client model - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift index 3222c7fbc2e..00215dc0325 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift @@ -1,8 +1,8 @@ // // FakeAPI.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -26,6 +26,7 @@ open class FakeAPI { /** - POST /fake/outer/boolean - Test serialization of outer boolean types + - examples: [{contentType=*/*, example=null}] - parameter body: (body) Input boolean as post body (optional) - returns: RequestBuilder */ @@ -56,6 +57,7 @@ open class FakeAPI { /** - POST /fake/outer/composite - Test serialization of object with outer number type + - examples: [{contentType=*/*, example={ }}] - parameter outerComposite: (body) Input composite as post body (optional) - returns: RequestBuilder */ @@ -86,6 +88,7 @@ open class FakeAPI { /** - POST /fake/outer/number - Test serialization of outer number types + - examples: [{contentType=*/*, example=null}] - parameter body: (body) Input number as post body (optional) - returns: RequestBuilder */ @@ -116,6 +119,7 @@ open class FakeAPI { /** - POST /fake/outer/string - Test serialization of outer string types + - examples: [{contentType=*/*, example=null}] - parameter body: (body) Input string as post body (optional) - returns: RequestBuilder */ @@ -186,6 +190,9 @@ open class FakeAPI { To test \"client\" model - PATCH /fake - To test \"client\" model + - examples: [{contentType=application/json, example={ + "client" : "client" +}}] - parameter client: (body) client model - returns: RequestBuilder */ @@ -287,7 +294,7 @@ open class FakeAPI { /** * enum for parameter enumHeaderStringArray */ - public enum EnumHeaderStringArray_testEnumParameters: String { + public enum EnumHeaderStringArray_testEnumParameters: String { case greaterThan = ">" case dollar = "$" } @@ -295,7 +302,7 @@ open class FakeAPI { /** * enum for parameter enumHeaderString */ - public enum EnumHeaderString_testEnumParameters: String { + public enum EnumHeaderString_testEnumParameters: String { case abc = "_abc" case efg = "-efg" case xyz = "(xyz)" @@ -304,7 +311,7 @@ open class FakeAPI { /** * enum for parameter enumQueryStringArray */ - public enum EnumQueryStringArray_testEnumParameters: String { + public enum EnumQueryStringArray_testEnumParameters: String { case greaterThan = ">" case dollar = "$" } @@ -312,7 +319,7 @@ open class FakeAPI { /** * enum for parameter enumQueryString */ - public enum EnumQueryString_testEnumParameters: String { + public enum EnumQueryString_testEnumParameters: String { case abc = "_abc" case efg = "-efg" case xyz = "(xyz)" @@ -321,7 +328,7 @@ open class FakeAPI { /** * enum for parameter enumQueryInteger */ - public enum EnumQueryInteger_testEnumParameters: Int { + public enum EnumQueryInteger_testEnumParameters: Int { case _1 = 1 case number2 = -2 } @@ -329,7 +336,7 @@ open class FakeAPI { /** * enum for parameter enumQueryDouble */ - public enum EnumQueryDouble_testEnumParameters: Double { + public enum EnumQueryDouble_testEnumParameters: Double { case _11 = 1.1 case number12 = -1.2 } @@ -337,15 +344,15 @@ open class FakeAPI { /** * enum for parameter enumFormStringArray */ - public enum EnumFormStringArray_testEnumParameters: [String] { - case greaterThan = > - case dollar = $ + public enum EnumFormStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" } /** * enum for parameter enumFormString */ - public enum EnumFormString_testEnumParameters: String { + public enum EnumFormString_testEnumParameters: String { case abc = "_abc" case efg = "-efg" case xyz = "(xyz)" @@ -355,16 +362,16 @@ open class FakeAPI { To test enum parameters - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to -efg) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to "-efg") - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to "-efg") - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional) - - parameter enumFormString: (form) Form parameter enum test (string) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to "$") + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to "-efg") - parameter completion: completion handler to receive the data and the error objects */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [EnumFormStringArray]_testEnumParameters? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: String? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if error == nil { completion((), error) @@ -380,20 +387,20 @@ open class FakeAPI { - GET /fake - To test enum parameters - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to -efg) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to "-efg") - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to "-efg") - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional) - - parameter enumFormString: (form) Form parameter enum test (string) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to "$") + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to "-efg") - returns: RequestBuilder */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [EnumFormStringArray]_testEnumParameters? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: String? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String:Any?] = [ - "enum_form_string_array": enumFormStringArray?.rawValue, + "enum_form_string_array": enumFormStringArray, "enum_form_string": enumFormString?.rawValue ] diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift index 5f2b60e4663..b86a3faa7e3 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift @@ -1,8 +1,8 @@ // // FakeClassnameTags123API.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -31,6 +31,9 @@ open class FakeClassnameTags123API { - API Key: - type: apiKey api_key_query (QUERY) - name: api_key_query + - examples: [{contentType=application/json, example={ + "client" : "client" +}}] - parameter client: (body) client model - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index c85e3fc87da..baa8d6da4f3 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -1,8 +1,8 @@ // // PetAPI.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -99,7 +99,7 @@ open class PetAPI { /** * enum for parameter status */ - public enum Status_findPetsByStatus: String { + public enum Status_findPetsByStatus: String { case available = "available" case pending = "pending" case sold = "sold" @@ -125,6 +125,32 @@ open class PetAPI { - OAuth: - type: oauth2 - name: petstore_auth + - examples: [{contentType=application/json, example={ + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" +}}, {contentType=application/xml, example= + 123456789 + doggie + + aeiou + + + + aeiou +}] - parameter status: (query) Status values that need to be considered for filter - returns: RequestBuilder<[Pet]> */ @@ -163,6 +189,32 @@ open class PetAPI { - OAuth: - type: oauth2 - name: petstore_auth + - examples: [{contentType=application/json, example={ + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" +}}, {contentType=application/xml, example= + 123456789 + doggie + + aeiou + + + + aeiou +}] - parameter tags: (query) Tags to filter by - returns: RequestBuilder<[Pet]> */ @@ -201,6 +253,32 @@ open class PetAPI { - API Key: - type: apiKey api_key - name: api_key + - examples: [{contentType=application/json, example={ + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" +}}, {contentType=application/xml, example= + 123456789 + doggie + + aeiou + + + + aeiou +}] - parameter petId: (path) ID of pet to return - returns: RequestBuilder */ @@ -329,6 +407,11 @@ open class PetAPI { - OAuth: - type: oauth2 - name: petstore_auth + - examples: [{contentType=application/json, example={ + "code" : 0, + "type" : "type", + "message" : "message" +}}] - parameter petId: (path) ID of pet to update - parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter file: (form) file to upload (optional) diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 783f8725e8c..6b259aa56ab 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -1,8 +1,8 @@ // // StoreAPI.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -100,6 +100,21 @@ open class StoreAPI { Find purchase order by ID - GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - examples: [{contentType=application/json, example={ + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" +}}, {contentType=application/xml, example= + 123456789 + 123456789 + 123 + 2000-01-23T04:56:07.000Z + aeiou + true +}] - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ @@ -134,6 +149,21 @@ open class StoreAPI { /** Place an order for a pet - POST /store/order + - examples: [{contentType=application/json, example={ + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" +}}, {contentType=application/xml, example= + 123456789 + 123456789 + 123 + 2000-01-23T04:56:07.000Z + aeiou + true +}] - parameter order: (body) order placed for purchasing the pet - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index 73dd93c6782..f486d34b517 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -1,8 +1,8 @@ // // UserAPI.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -172,6 +172,25 @@ open class UserAPI { /** Get user by user name - GET /user/{username} + - examples: [{contentType=application/json, example={ + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" +}}, {contentType=application/xml, example= + 123456789 + aeiou + aeiou + aeiou + aeiou + aeiou + aeiou + 123 +}] - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift index 381fddcc81f..280b4e53389 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift @@ -1,7 +1,7 @@ // AlamofireImplementations.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift index 323715c5f94..2d50e463ae1 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift @@ -1,8 +1,8 @@ // // CodableHelper.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Configuration.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Configuration.swift index c03a10b930c..f8180752b67 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Configuration.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Configuration.swift @@ -1,7 +1,7 @@ // Configuration.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Extensions.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Extensions.swift index f9c33ea7e2d..abe218b4e7a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Extensions.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Extensions.swift @@ -1,7 +1,7 @@ // Extensions.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodableEncoding.swift index 472e955ee8e..ca05906d420 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodableEncoding.swift @@ -1,8 +1,8 @@ // // JSONDataEncoding.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodingHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodingHelper.swift index 19ee06b1f48..70449515842 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/JSONEncodingHelper.swift @@ -1,8 +1,8 @@ // // JSONEncodingHelper.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models.swift index 4962405f029..42f8186ae4a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models.swift @@ -1,7 +1,7 @@ // Models.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift index 6c1e6653b6f..4e018486ad7 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift @@ -1,8 +1,8 @@ // // AdditionalPropertiesClass.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift index ba2da30fedd..7221a1be099 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift @@ -1,8 +1,8 @@ // // Animal.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -12,7 +12,7 @@ import Foundation public struct Animal: Codable { public var className: String - public var color: String? + public var color: String? = "red" public init(className: String, color: String?) { self.className = className diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AnimalFarm.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AnimalFarm.swift index 68308364894..e7bea63f8ed 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AnimalFarm.swift @@ -1,8 +1,8 @@ // // AnimalFarm.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift index 3fd872dcd26..a22e9aaebbb 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift @@ -1,8 +1,8 @@ // // ApiResponse.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift index ac59328a279..4e5a5ca1445 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift @@ -1,8 +1,8 @@ // // ArrayOfArrayOfNumberOnly.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift index 1132638458f..7d059d36833 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift @@ -1,8 +1,8 @@ // // ArrayOfNumberOnly.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift index 14335a75053..9c56fed50c2 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift @@ -1,8 +1,8 @@ // // ArrayTest.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift index 71ba400a9d7..98cda23dac9 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift @@ -1,8 +1,8 @@ // // Capitalization.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift index 7687f52d477..a116d964ea8 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift @@ -1,8 +1,8 @@ // // Cat.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -12,7 +12,7 @@ import Foundation public struct Cat: Codable { public var className: String - public var color: String? + public var color: String? = "red" public var declawed: Bool? public init(className: String, color: String?, declawed: Bool?) { diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift index fa0786832c6..77fba95c1d7 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift @@ -1,8 +1,8 @@ // // Category.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift index 3a38128215a..f673ed127cd 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift @@ -1,8 +1,8 @@ // // ClassModel.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift index 0c4fc0d559a..51390b6c4ea 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift @@ -1,8 +1,8 @@ // // Client.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift index 9ba84f7f8cc..239ce74dcc2 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift @@ -1,8 +1,8 @@ // // Dog.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -12,7 +12,7 @@ import Foundation public struct Dog: Codable { public var className: String - public var color: String? + public var color: String? = "red" public var breed: String? public init(className: String, color: String?, breed: String?) { diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift index 084a9ab8383..8713961520e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift @@ -1,8 +1,8 @@ // // EnumArrays.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -11,11 +11,11 @@ import Foundation public struct EnumArrays: Codable { - public enum JustSymbol: String, Codable { + public enum JustSymbol: String, Codable { case greaterThanOrEqualTo = ">=" case dollar = "$" } - public enum ArrayEnum: String, Codable { + public enum ArrayEnum: String, Codable { case fish = "fish" case crab = "crab" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumClass.swift index d0889a3520a..7280a621fec 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumClass.swift @@ -1,8 +1,8 @@ // // EnumClass.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -12,5 +12,4 @@ public enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" case xyz = "(xyz)" - } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift index 6374df494a3..0f546c76a21 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift @@ -1,8 +1,8 @@ // // EnumTest.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -11,21 +11,21 @@ import Foundation public struct EnumTest: Codable { - public enum EnumString: String, Codable { + public enum EnumString: String, Codable { case upper = "UPPER" case lower = "lower" case empty = "" } - public enum EnumStringRequired: String, Codable { + public enum EnumStringRequired: String, Codable { case upper = "UPPER" case lower = "lower" case empty = "" } - public enum EnumInteger: Int, Codable { + public enum EnumInteger: Int, Codable { case _1 = 1 case number1 = -1 } - public enum EnumNumber: Double, Codable { + public enum EnumNumber: Double, Codable { case _11 = 1.1 case number12 = -1.2 } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift index 7d47198c063..faa091b0658 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift @@ -1,8 +1,8 @@ // // FormatTest.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift index 3626846919f..554aee1081a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift @@ -1,8 +1,8 @@ // // HasOnlyReadOnly.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift index a199bfd8133..8997340ff4b 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift @@ -1,8 +1,8 @@ // // List.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift index ded3f7b1dde..dfbbee8428e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift @@ -1,8 +1,8 @@ // // MapTest.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -11,7 +11,7 @@ import Foundation public struct MapTest: Codable { - public enum MapOfEnumString: String, Codable { + public enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 962b7fe65bc..7116108fd7a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -1,8 +1,8 @@ // // MixedPropertiesAndAdditionalPropertiesClass.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift index f539cd888ab..fc1d0606b7b 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift @@ -1,8 +1,8 @@ // // Model200Response.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift index 1d3fa85f858..cc165d767d9 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift @@ -1,8 +1,8 @@ // // Name.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift index 06db22e9c3a..e6fb206093a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift @@ -1,8 +1,8 @@ // // NumberOnly.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift index b6c0cc0cb5a..5cad29458b7 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift @@ -1,8 +1,8 @@ // // Order.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -11,7 +11,7 @@ import Foundation public struct Order: Codable { - public enum Status: String, Codable { + public enum Status: String, Codable { case placed = "placed" case approved = "approved" case delivered = "delivered" @@ -22,7 +22,7 @@ public struct Order: Codable { public var shipDate: Date? /** Order Status */ public var status: Status? - public var complete: Bool? + public var complete: Bool? = false public init(_id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { self._id = _id diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift index 6d0e5ebb6ca..edc4523d9f0 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift @@ -1,8 +1,8 @@ // // OuterComposite.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterEnum.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterEnum.swift index d6222d2b1c4..bd1643d279e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterEnum.swift @@ -1,8 +1,8 @@ // // OuterEnum.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -12,5 +12,4 @@ public enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" case delivered = "delivered" - } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift index 73985167c96..3773bf53317 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift @@ -1,8 +1,8 @@ // // Pet.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation @@ -11,7 +11,7 @@ import Foundation public struct Pet: Codable { - public enum Status: String, Codable { + public enum Status: String, Codable { case available = "available" case pending = "pending" case sold = "sold" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift index 6e984760cd6..48b655a5b0a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift @@ -1,8 +1,8 @@ // // ReadOnlyFirst.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift index 9502f08130c..de4b218999b 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift @@ -1,8 +1,8 @@ // // Return.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift index f94741a854a..213d896ba98 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift @@ -1,8 +1,8 @@ // // SpecialModelName.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift index 7dd17159a73..20f50efd3ac 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift @@ -1,8 +1,8 @@ // // Tag.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift index 09b68da4f8f..d9c564d2a1f 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift @@ -1,8 +1,8 @@ // // User.swift // -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen +// Generated by openapi-generator +// https://openapi-generator.tech // import Foundation diff --git a/samples/client/petstore/swift4/default/git_push.sh b/samples/client/petstore/swift4/default/git_push.sh index ae01b182ae9..8442b80bb44 100644 --- a/samples/client/petstore/swift4/default/git_push.sh +++ b/samples/client/petstore/swift4/default/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" git_user_id=$1 git_repo_id=$2