Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
$asserts[] = new Assert\Type("\{{modelPackage}}\{{dataType}}");
{{/isEnumRef}}
{{^isEnumRef}}
$asserts[] = new Assert\Type("{{dataType}}");
$asserts[] = new Assert\Type('{{dataType}}');
{{^isPrimitiveType}}
$asserts[] = new Assert\Valid();
{{/isPrimitiveType}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function addPetAction(Request $request)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\Pet");
$asserts[] = new Assert\Type('OpenAPI\Server\Model\Pet');
$asserts[] = new Assert\Valid();
$response = $this->validate($pet, $asserts);
if ($response instanceof Response) {
Expand Down Expand Up @@ -170,13 +170,13 @@ public function deletePetAction(Request $request, $petId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$response = $this->validate($petId, $asserts);
if ($response instanceof Response) {
return $response;
}
$asserts = [];
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($apiKey, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -250,7 +250,7 @@ public function downloadFileAction(Request $request, $petId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$response = $this->validate($petId, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -496,7 +496,7 @@ public function getPetByIdAction(Request $request, $petId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$response = $this->validate($petId, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -573,7 +573,7 @@ public function petAgeAction(Request $request, $petId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$response = $this->validate($petId, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -646,7 +646,7 @@ public function petAvailableForSaleAction(Request $request, $petId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$response = $this->validate($petId, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -731,7 +731,7 @@ public function updatePetAction(Request $request)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\Pet");
$asserts[] = new Assert\Type('OpenAPI\Server\Model\Pet');
$asserts[] = new Assert\Valid();
$response = $this->validate($pet, $asserts);
if ($response instanceof Response) {
Expand Down Expand Up @@ -808,19 +808,19 @@ public function updatePetWithFormAction(Request $request, $petId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$response = $this->validate($petId, $asserts);
if ($response instanceof Response) {
return $response;
}
$asserts = [];
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($name, $asserts);
if ($response instanceof Response) {
return $response;
}
$asserts = [];
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($status, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -900,13 +900,13 @@ public function uploadFileAction(Request $request, $petId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$response = $this->validate($petId, $asserts);
if ($response instanceof Response) {
return $response;
}
$asserts = [];
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($additionalMetadata, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function deleteOrderAction(Request $request, $orderId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($orderId, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -212,7 +212,7 @@ public function getOrderByIdAction(Request $request, $orderId)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\Type('int');
$asserts[] = new Assert\GreaterThanOrEqual(1);
$asserts[] = new Assert\LessThanOrEqual(5);
$response = $this->validate($orderId, $asserts);
Expand Down Expand Up @@ -298,7 +298,7 @@ public function placeOrderAction(Request $request)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\Order");
$asserts[] = new Assert\Type('OpenAPI\Server\Model\Order');
$asserts[] = new Assert\Valid();
$response = $this->validate($order, $asserts);
if ($response instanceof Response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function createUserAction(Request $request)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\User");
$asserts[] = new Assert\Type('OpenAPI\Server\Model\User');
$asserts[] = new Assert\Valid();
$response = $this->validate($user, $asserts);
if ($response instanceof Response) {
Expand Down Expand Up @@ -316,7 +316,7 @@ public function deleteUserAction(Request $request, $username)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($username, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -391,7 +391,7 @@ public function getUserByNameAction(Request $request, $username)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($username, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -469,15 +469,15 @@ public function loginUserAction(Request $request)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$asserts[] = new Assert\Regex("/^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$/");
$response = $this->validate($username, $asserts);
if ($response instanceof Response) {
return $response;
}
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($password, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down Expand Up @@ -609,14 +609,14 @@ public function updateUserAction(Request $request, $username)
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("string");
$asserts[] = new Assert\Type('string');
$response = $this->validate($username, $asserts);
if ($response instanceof Response) {
return $response;
}
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\User");
$asserts[] = new Assert\Type('OpenAPI\Server\Model\User');
$asserts[] = new Assert\Valid();
$response = $this->validate($user, $asserts);
if ($response instanceof Response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function registerBundles(): iterable
* @inheritDoc
* @throws \Exception
*/
public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(__DIR__.'/test_config.yaml');
}
Expand Down