diff --git a/bin/configs/swift5-rxswiftLibrary.yaml b/bin/configs/swift5-rxswiftLibrary.yaml index f564ac3340cf..49d0e24cca5b 100644 --- a/bin/configs/swift5-rxswiftLibrary.yaml +++ b/bin/configs/swift5-rxswiftLibrary.yaml @@ -9,3 +9,4 @@ additionalProperties: podSummary: PetstoreClient projectName: PetstoreClient podHomepage: https://github.com/openapitools/openapi-generator + useBacktickEscapes: true diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 3c557e4b015c..dc3e27cdecef 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -14,7 +14,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| -|library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
|urlsession| +|library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
**vapor**
HTTP client: Vapor
|urlsession| |nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| |objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| |podAuthors|Authors used for Podspec| |null| @@ -35,6 +35,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftPackagePath|Set a custom source path instead of OpenAPIClient/Classes/OpenAPIs.| |null| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| +|useBacktickEscapes|Escape reserved words using backticks (default: false)| |false| |useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index a21123c10181..18e0058f245a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -63,6 +63,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig public static final String LENIENT_TYPE_CAST = "lenientTypeCast"; public static final String USE_SPM_FILE_STRUCTURE = "useSPMFileStructure"; public static final String SWIFT_PACKAGE_PATH = "swiftPackagePath"; + public static final String USE_BACKTICK_ESCAPES = "useBacktickEscapes"; protected static final String LIBRARY_ALAMOFIRE = "alamofire"; protected static final String LIBRARY_URLSESSION = "urlsession"; protected static final String RESPONSE_LIBRARY_PROMISE_KIT = "PromiseKit"; @@ -78,6 +79,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig protected boolean swiftUseApiNamespace = false; protected boolean useSPMFileStructure = false; protected String swiftPackagePath = "Classes" + File.separator + "OpenAPIs"; + protected boolean useBacktickEscapes = false; protected String[] responseAs = new String[0]; protected String sourceFolder = swiftPackagePath; protected HashSet objcReservedWords; @@ -201,7 +203,6 @@ public Swift5ClientCodegen() { typeMapping = new HashMap<>(); typeMapping.put("array", "Array"); - typeMapping.put("List", "Array"); typeMapping.put("map", "Dictionary"); typeMapping.put("set", "Set"); typeMapping.put("date", "Date"); @@ -263,6 +264,9 @@ public Swift5ClientCodegen() { "Accept and cast values for simple types (string->bool, " + "string->int, int->string)") .defaultValue(Boolean.FALSE.toString())); + cliOptions.add(new CliOption(USE_BACKTICK_ESCAPES, + "Escape reserved words using backticks (default: false)") + .defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(CodegenConstants.API_NAME_PREFIX, CodegenConstants.API_NAME_PREFIX_DESC)); cliOptions.add(new CliOption(USE_SPM_FILE_STRUCTURE, "Use SPM file structure" @@ -432,6 +436,10 @@ public void processOpts() { sourceFolder = swiftPackagePath; } + if (additionalProperties.containsKey(USE_BACKTICK_ESCAPES)) { + setUseBacktickEscapes(convertPropertyToBooleanAndWriteBack(USE_BACKTICK_ESCAPES)); + } + setLenientTypeCast(convertPropertyToBooleanAndWriteBack(LENIENT_TYPE_CAST)); // make api and model doc path available in mustache template @@ -519,7 +527,7 @@ public String escapeReservedWord(String name) { if (this.reservedWordsMappings().containsKey(name)) { return this.reservedWordsMappings().get(name); } - return "_" + name; // add an underscore to the name + return useBacktickEscapes && !objcCompatible ? "`" + name + "`" : "_" + name; } @Override @@ -738,11 +746,16 @@ public String toVarName(String name) { // pet_id => petId name = camelize(name, true); - // for reserved word or word starting with number, append _ - if (isReservedWord(name) || name.matches("^\\d.*")) { + // for reserved words surround with `` or append _ + if (isReservedWord(name)) { name = escapeReservedWord(name); } + // for words starting with number, append _ + if (name.matches("^\\d.*")) { + name = "_" + name; + } + return name; } @@ -763,11 +776,16 @@ public String toParamName(String name) { // pet_id => petId name = camelize(name, true); - // for reserved word or word starting with number, append _ - if (isReservedWord(name) || name.matches("^\\d.*")) { + // for reserved words surround with `` + if (isReservedWord(name)) { name = escapeReservedWord(name); } + // for words starting with number, append _ + if (name.matches("^\\d.*")) { + name = "_" + name; + } + return name; } @@ -832,6 +850,10 @@ public void setSwiftPackagePath(String swiftPackagePath) { this.swiftPackagePath = swiftPackagePath; } + public void setUseBacktickEscapes(boolean useBacktickEscapes) { + this.useBacktickEscapes = useBacktickEscapes; + } + @Override public String toEnumValue(String value, String datatype) { // for string, array of string diff --git a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache index 9956f81794dc..715fa3dcd093 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache @@ -11,17 +11,17 @@ {{#isEnum}} {{#description}}/** {{description}} */ {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.") - {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} + {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} {{/isEnum}} {{^isEnum}} {{#description}}/** {{description}} */ {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.") - {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{name}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} + {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} {{#objcCompatible}} {{#vendorExtensions.x-swift-optional-scalar}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}Num: NSNumber? { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{{name}}}Num: NSNumber? { get { - return {{name}} as NSNumber? + return {{{name}}} as NSNumber? } } {{/vendorExtensions.x-swift-optional-scalar}} @@ -30,9 +30,9 @@ {{/allVars}} {{#hasVars}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}{{^required}} = nil{{/required}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allVars}}) { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}{{^required}} = nil{{/required}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allVars}}) { {{#allVars}} - self.{{name}} = {{name}} + self.{{{name}}} = {{{name}}} {{/allVars}} } {{/hasVars}} @@ -70,7 +70,7 @@ let container = try decoder.container(keyedBy: String.self) {{#allVars}} - {{name}} = try container.decode{{#required}}{{#isNullable}}IfPresent{{/isNullable}}{{/required}}{{^required}}IfPresent{{/required}}({{{datatypeWithEnum}}}.self, forKey: "{{{baseName}}}") + {{{name}}} = try container.decode{{#required}}{{#isNullable}}IfPresent{{/isNullable}}{{/required}}{{^required}}IfPresent{{/required}}({{{datatypeWithEnum}}}.self, forKey: "{{{baseName}}}") {{/allVars}} var nonAdditionalPropertyKeys = Set() {{#allVars}} @@ -82,7 +82,7 @@ {{^additionalPropertiesType}}{{#vendorExtensions.x-codegen-has-escaped-property-names}} {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum CodingKeys: String, CodingKey, CaseIterable { {{#allVars}} - case {{name}}{{#vendorExtensions.x-codegen-escaped-property-name}} = "{{{baseName}}}"{{/vendorExtensions.x-codegen-escaped-property-name}} + case {{{name}}}{{#vendorExtensions.x-codegen-escaped-property-name}} = "{{{baseName}}}"{{/vendorExtensions.x-codegen-escaped-property-name}} {{/allVars}} } {{/vendorExtensions.x-codegen-has-escaped-property-names}}{{/additionalPropertiesType}} diff --git a/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache b/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache index d3e4ecf5c760..6b68575707a6 100644 --- a/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java index 54bc03f40d2d..9e2a4a3b36fd 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java @@ -46,6 +46,7 @@ public class Swift5OptionsProvider implements OptionsProvider { public static final String POD_DOCUMENTATION_URL_VALUE = "podDocumentationURL"; public static final String READONLY_PROPERTIES_VALUE = "false"; public static final String SWIFT_USE_API_NAMESPACE_VALUE = "swiftUseApiNamespace"; + public static final String USE_BACKTICKS_ESCAPES_VALUE = "false"; public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; public static final String LIBRARY_VALUE = "alamofire"; @@ -80,6 +81,7 @@ public Map createOptions() { .put(Swift5ClientCodegen.POD_DOCUMENTATION_URL, POD_DOCUMENTATION_URL_VALUE) .put(Swift5ClientCodegen.READONLY_PROPERTIES, READONLY_PROPERTIES_VALUE) .put(Swift5ClientCodegen.SWIFT_USE_API_NAMESPACE, SWIFT_USE_API_NAMESPACE_VALUE) + .put(Swift5ClientCodegen.USE_BACKTICK_ESCAPES, USE_BACKTICKS_ESCAPES_VALUE) .put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true") .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 58c4b8a093ce..6b678868877a 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -321,7 +321,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -355,7 +355,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 5cd3629127bf..8da810c254e8 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -373,7 +373,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -431,7 +431,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -453,7 +453,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f09cb471b360..51518d6cf95c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public var double: Double? public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md index 543869c0d2e0..e5c4e3bb035f 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md index 27efe0833476..76a34913c823 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -428,7 +428,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index b90460ea41ac..8bb72f685435 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -361,7 +361,7 @@ open class FakeAPI { */ #if canImport(Combine) @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { return Future.init { promise in testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { @@ -398,7 +398,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index b4226ff4aa1d..ca7e7e2c70bd 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -413,7 +413,7 @@ open class PetAPI { */ #if canImport(Combine) @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { return Future.init { promise in uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { @@ -438,7 +438,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -476,7 +476,7 @@ open class PetAPI { */ #if canImport(Combine) @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { return Future.init { promise in uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { @@ -501,7 +501,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f09cb471b360..51518d6cf95c 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public var double: Double? public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md index 543869c0d2e0..e5c4e3bb035f 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md index 27efe0833476..76a34913c823 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -428,7 +428,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 58c4b8a093ce..6b678868877a 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -321,7 +321,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -355,7 +355,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 5cd3629127bf..8da810c254e8 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -373,7 +373,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -431,7 +431,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -453,7 +453,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f09cb471b360..51518d6cf95c 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public var double: Double? public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md index 543869c0d2e0..e5c4e3bb035f 100644 --- a/samples/client/petstore/swift5/default/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/default/docs/FormatTest.md b/samples/client/petstore/swift5/default/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/default/docs/FormatTest.md +++ b/samples/client/petstore/swift5/default/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/default/docs/PetAPI.md b/samples/client/petstore/swift5/default/docs/PetAPI.md index 27efe0833476..76a34913c823 100644 --- a/samples/client/petstore/swift5/default/docs/PetAPI.md +++ b/samples/client/petstore/swift5/default/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -428,7 +428,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index f46c7ac57ea3..ceb6aeaea6f4 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -373,7 +373,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/deprecated/docs/PetAPI.md b/samples/client/petstore/swift5/deprecated/docs/PetAPI.md index 3dd174824793..37ce9aac8f02 100644 --- a/samples/client/petstore/swift5/deprecated/docs/PetAPI.md +++ b/samples/client/petstore/swift5/deprecated/docs/PetAPI.md @@ -364,7 +364,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -376,7 +376,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -397,7 +397,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 03fd8a8ca150..a5ae51463258 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -321,7 +321,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { testEndpointParametersWithRequestBuilder(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -355,7 +355,7 @@ internal class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - internal class func testEndpointParametersWithRequestBuilder(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + internal class func testEndpointParametersWithRequestBuilder(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 658ef61ddc07..aa43407da598 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -373,7 +373,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ internal class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - internal class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + internal class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -431,7 +431,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: Data, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -453,7 +453,7 @@ internal class PetAPI { - parameter requiredFile: (form) file to upload - returns: RequestBuilder */ - internal class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL) -> RequestBuilder { + internal class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, requiredFile: Data) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 1f5b70fc6c0a..9525abb9c377 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ internal struct FormatTest: Codable, Hashable { internal var double: Double? internal var string: String? internal var byte: Data - internal var binary: URL? + internal var binary: Data? internal var date: Date internal var dateTime: Date? internal var uuid: UUID? internal var password: String - internal init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + internal init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md index 3b14781480ff..d87ab32309de 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let double = 987 // Double | None let string = "string_example" // String | None (optional) let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None let byte = 987 // Data | None -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **string** | **String** | None | [optional] **patternWithoutDelimiter** | **String** | None | **byte** | **Data** | None | - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md b/samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md index 8fd9872c0e9a..8cc01d2f30ba 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: Data, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -429,7 +429,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload // uploads an image (required) PetAPI.uploadFileWithRequiredFile(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile) { (response, error) in @@ -450,7 +450,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | ### Return type diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 0af3b8d55a8c..0960e6bec63a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -321,7 +321,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -355,7 +355,7 @@ import Foundation - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 7dc0f6ecde4e..d2deeb82cd64 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -373,7 +373,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ import Foundation - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -431,7 +431,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -453,7 +453,7 @@ import Foundation - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 84f419103a41..bc176c759b78 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -42,13 +42,13 @@ import Foundation } public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md index 712fa591f2f4..95f2338fd6a9 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md b/samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md index c03e60bc084e..bc9ffab82d3d 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -428,7 +428,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index b87b809198bc..49c31cd3f69a 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -336,7 +336,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { @@ -372,7 +372,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index e60028960c8b..d272755f7ca3 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -388,7 +388,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { @@ -412,7 +412,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -448,7 +448,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { @@ -472,7 +472,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f09cb471b360..51518d6cf95c 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public var double: Double? public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md index f2b3e2abe1e1..579c4ef79645 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md @@ -343,7 +343,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise + open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -364,7 +364,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -393,7 +393,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md index e767ea772f89..2decebaf14e7 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md @@ -344,7 +344,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise + open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> Promise ``` uploads an image @@ -356,7 +356,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file).then { @@ -374,7 +374,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -393,7 +393,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise + open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> Promise ``` uploads an image (required) @@ -404,7 +404,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -422,7 +422,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 58c4b8a093ce..6b678868877a 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -321,7 +321,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -355,7 +355,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 5cd3629127bf..8da810c254e8 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -373,7 +373,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -431,7 +431,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -453,7 +453,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index fce99baa8f02..88c1092bcbe0 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public private(set) var double: Double? public private(set) var string: String? public private(set) var byte: Data - public private(set) var binary: URL? + public private(set) var binary: Data? public private(set) var date: Date public private(set) var dateTime: Date? public private(set) var uuid: UUID? public private(set) var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md index 543869c0d2e0..e5c4e3bb035f 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/FormatTest.md b/samples/client/petstore/swift5/readonlyProperties/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/FormatTest.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md index 27efe0833476..76a34913c823 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -428,7 +428,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 642370b2bc1c..4a6cf9e009b8 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -321,7 +321,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -355,7 +355,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index fd4c8fb152ad..a397aa036b96 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -373,7 +373,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -431,7 +431,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -453,7 +453,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f09cb471b360..51518d6cf95c 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public var double: Double? public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md index 543869c0d2e0..e5c4e3bb035f 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md index 27efe0833476..76a34913c823 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -428,7 +428,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index f76577526ec8..1901beb22e01 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -350,7 +350,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Observable */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { @@ -388,7 +388,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index e1152e64add8..37992042fcb4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -402,7 +402,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Observable */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { @@ -428,7 +428,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -464,7 +464,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Observable */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { @@ -490,7 +490,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 5c8e8882831f..ea377bceb252 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -10,10 +10,14 @@ import Foundation /** Model for testing model with \"_class\" property */ public struct ClassModel: Codable, Hashable { - public var _class: String? + public var `class`: String? - public init(_class: String? = nil) { - self._class = _class + public init(`class`: String? = nil) { + self.`class` = `class` + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case `class` = "_class" } } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f09cb471b360..51518d6cf95c 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public var double: Double? public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index d36d4e27352a..31c1c142e54a 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,16 +11,16 @@ import Foundation public struct Model200Response: Codable, Hashable { public var name: Int? - public var _class: String? + public var `class`: String? - public init(name: Int? = nil, _class: String? = nil) { + public init(name: Int? = nil, `class`: String? = nil) { self.name = name - self._class = _class + self.`class` = `class` } public enum CodingKeys: String, CodingKey, CaseIterable { case name - case _class = "class" + case `class` = "class" } } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 5f539f461843..40591ab2fb8c 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -10,14 +10,14 @@ import Foundation /** Model for testing reserved words */ public struct Return: Codable, Hashable { - public var _return: Int? + public var `return`: Int? - public init(_return: Int? = nil) { - self._return = _return + public init(`return`: Int? = nil) { + self.`return` = `return` } public enum CodingKeys: String, CodingKey, CaseIterable { - case _return = "return" + case `return` = "return" } } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md index e3912fdf0fd5..60989bb6b64e 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_class** | **String** | | [optional] +**`class`** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md index 9ca07180e074..1885346e940f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md @@ -300,7 +300,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -321,7 +321,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -343,7 +343,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md index 5865ea690cc3..e064d9d01117 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | [optional] -**_class** | **String** | | [optional] +**`class`** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md index c0ec8a91fb4c..12885aa977fc 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md @@ -295,7 +295,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Observable + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> Observable ``` uploads an image @@ -307,7 +307,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via https://github.com/OpenAPITools/openapi-generator/issues/new ``` @@ -318,7 +318,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -337,7 +337,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Observable + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> Observable ``` uploads an image (required) @@ -348,7 +348,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via https://github.com/OpenAPITools/openapi-generator/issues/new @@ -359,7 +359,7 @@ let additionalMetadata = "additionalMetadata_example" // String | Additional dat Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md index 66d17c27c887..e310b15bb5b7 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_return** | **Int** | | [optional] +**`return`** | **Int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift index 58c4b8a093ce..6b678868877a 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift @@ -321,7 +321,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -355,7 +355,7 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: RequestBuilder */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path let formParams: [String: Any?] = [ diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift index 5cd3629127bf..8da810c254e8 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift @@ -373,7 +373,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -395,7 +395,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder { var path = "/pet/{petId}/uploadImage" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -431,7 +431,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -453,7 +453,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: RequestBuilder */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder { var path = "/fake/{petId}/uploadImageWithRequiredFile" let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift index f09cb471b360..51518d6cf95c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable { public var double: Double? public var string: String? public var byte: Data - public var binary: URL? + public var binary: Data? public var date: Date public var dateTime: Date? public var uuid: UUID? public var password: String - public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { self.integer = integer self.int32 = int32 self.int64 = int64 diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md index 543869c0d2e0..e5c4e3bb035f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md @@ -364,7 +364,7 @@ No authorization required # **testEndpointParameters** ```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) ``` Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional) let int64 = 987 // Int64 | None (optional) let float = 987 // Float | None (optional) let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) +let binary = 987 // Data | None (optional) let date = Date() // Date | None (optional) let dateTime = Date() // Date | None (optional) let password = "password_example" // String | None (optional) @@ -417,7 +417,7 @@ Name | Type | Description | Notes **int64** | **Int64** | None | [optional] **float** | **Float** | None | [optional] **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] + **binary** | **Data** | None | [optional] **date** | **Date** | None | [optional] **dateTime** | **Date** | None | [optional] **password** | **String** | None | [optional] diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md index f74d94f6c46a..04e7113e3dc6 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **double** | **Double** | | [optional] **string** | **String** | | [optional] **byte** | **Data** | | -**binary** | **URL** | | [optional] +**binary** | **Data** | | [optional] **date** | **Date** | | **dateTime** | **Date** | | [optional] **uuid** | **UUID** | | [optional] diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md index 27efe0833476..76a34913c823 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md @@ -365,7 +365,7 @@ Void (empty response body) # **uploadFile** ```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image @@ -377,7 +377,7 @@ import PetstoreClient let petId = 987 // Int64 | ID of pet to update let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) +let file = 987 // Data | file to upload (optional) // uploads an image PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in @@ -398,7 +398,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] + **file** | **Data** | file to upload | [optional] ### Return type @@ -417,7 +417,7 @@ Name | Type | Description | Notes # **uploadFileWithRequiredFile** ```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) ``` uploads an image (required) @@ -428,7 +428,7 @@ uploads an image (required) import PetstoreClient let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let requiredFile = 987 // Data | file to upload let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) // uploads an image (required) @@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | + **requiredFile** | **Data** | file to upload | **additionalMetadata** | **String** | Additional data to pass to server | [optional] ### Return type