Skip to content

Commit 4a3bf4c

Browse files
committed
update samples
1 parent 840720a commit 4a3bf4c

21 files changed

Lines changed: 21 additions & 21 deletions

File tree

samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
140140
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
141141
} else if contentType.hasPrefix("application/x-www-form-urlencoded") {
142142
encoding = FormURLEncoding()
143-
} else if contentType.hasPrefix("application/octet-stream"){
143+
} else if contentType.hasPrefix("application/octet-stream") || contentType.hasPrefix("image/") {
144144
encoding = OctetStreamEncoding()
145145
} else {
146146
fatalError("Unsupported Media Type - \(contentType)")

0 commit comments

Comments
 (0)