mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 18:56:13 +00:00
update php symfony petstore, remove spaces in empty line
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// AnotherfakeAPI.swift
|
||||
// AnotherFakeAPI.swift
|
||||
//
|
||||
// Generated by swagger-codegen
|
||||
// https://github.com/swagger-api/swagger-codegen
|
||||
@@ -10,7 +10,7 @@ import Alamofire
|
||||
|
||||
|
||||
|
||||
open class AnotherfakeAPI {
|
||||
open class AnotherFakeAPI {
|
||||
/**
|
||||
To test special tags
|
||||
|
||||
|
||||
@@ -404,6 +404,41 @@ open class FakeAPI {
|
||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
|
||||
}
|
||||
|
||||
/**
|
||||
test inline additionalProperties
|
||||
|
||||
- parameter param: (body) request body
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testInlineAdditionalProperties(param: Any, completion: @escaping ((_ error: Error?) -> Void)) {
|
||||
testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in
|
||||
completion(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
test inline additionalProperties
|
||||
- POST /fake/inline-additionalProperties
|
||||
-
|
||||
|
||||
- parameter param: (body) request body
|
||||
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testInlineAdditionalPropertiesWithRequestBuilder(param: Any) -> RequestBuilder<Void> {
|
||||
let path = "/fake/inline-additionalProperties"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param)
|
||||
|
||||
let url = NSURLComponents(string: URLString)
|
||||
|
||||
|
||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
||||
|
||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||
}
|
||||
|
||||
/**
|
||||
test json serialization of form data
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ open class EnumArrays: Codable {
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: String.self)
|
||||
|
||||
justSymbol = try container.decodeIfPresent(String.self, forKey: "just_symbol")
|
||||
justSymbol = try container.decodeIfPresent(JustSymbol.self, forKey: "just_symbol")
|
||||
arrayEnum = try container.decodeArrayIfPresent(String.self, forKey: "array_enum")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ open class EnumTest: Codable {
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: String.self)
|
||||
|
||||
enumString = try container.decodeIfPresent(String.self, forKey: "enum_string")
|
||||
enumInteger = try container.decodeIfPresent(Int.self, forKey: "enum_integer")
|
||||
enumNumber = try container.decodeIfPresent(Double.self, forKey: "enum_number")
|
||||
enumString = try container.decodeIfPresent(EnumString.self, forKey: "enum_string")
|
||||
enumInteger = try container.decodeIfPresent(EnumInteger.self, forKey: "enum_integer")
|
||||
enumNumber = try container.decodeIfPresent(EnumNumber.self, forKey: "enum_number")
|
||||
outerEnum = try container.decodeIfPresent(OuterEnum.self, forKey: "outerEnum")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ open class Order: Codable {
|
||||
petId = try container.decodeIfPresent(Int64.self, forKey: "petId")
|
||||
quantity = try container.decodeIfPresent(Int.self, forKey: "quantity")
|
||||
shipDate = try container.decodeIfPresent(Date.self, forKey: "shipDate")
|
||||
status = try container.decodeIfPresent(String.self, forKey: "status")
|
||||
status = try container.decodeIfPresent(Status.self, forKey: "status")
|
||||
complete = try container.decodeIfPresent(Bool.self, forKey: "complete")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ open class Pet: Codable {
|
||||
name = try container.decode(String.self, forKey: "name")
|
||||
photoUrls = try container.decodeArray(String.self, forKey: "photoUrls")
|
||||
tags = try container.decodeArrayIfPresent(Tag.self, forKey: "tags")
|
||||
status = try container.decodeIfPresent(String.self, forKey: "status")
|
||||
status = try container.decodeIfPresent(Status.self, forKey: "status")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +146,12 @@ class Controller
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!$this->container->get('kernel')->isDebug()) {
|
||||
return [
|
||||
'message' => $exception->getMessage(),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'message' => $exception->getMessage(),
|
||||
'type' => get_class($exception),
|
||||
|
||||
Reference in New Issue
Block a user