forked from loafle/openapi-generator-original
Enable serialization of non-null negative values (array, false, etc) (#2032)
This commit is contained in:
parent
f56bc79db6
commit
f4088f8ee8
@ -178,7 +178,7 @@ class {{controllerName}} extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
|
@ -121,7 +121,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -207,7 +207,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -294,7 +294,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -378,7 +378,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -462,7 +462,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -555,7 +555,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -649,7 +649,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -742,7 +742,7 @@ class PetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
|
@ -109,7 +109,7 @@ class StoreController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -179,7 +179,7 @@ class StoreController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -260,7 +260,7 @@ class StoreController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -345,7 +345,7 @@ class StoreController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
|
@ -115,7 +115,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -199,7 +199,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -283,7 +283,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -359,7 +359,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -438,7 +438,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -524,7 +524,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -589,7 +589,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
@ -682,7 +682,7 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
$result?$this->serialize($result, $responseFormat):'',
|
$result !== null ?$this->serialize($result, $responseFormat):'',
|
||||||
$responseCode,
|
$responseCode,
|
||||||
array_merge(
|
array_merge(
|
||||||
$responseHeaders,
|
$responseHeaders,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user