Skip to content

Commit

Permalink
add methods param to route for smaller fixture size
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Jun 19, 2024
1 parent 2763082 commit 3240222
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 5,764 deletions.
10 changes: 5 additions & 5 deletions tests/Functional/Controller/MapQueryParameterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class MapQueryParameterController
{
#[Route('/article_map_query_parameter')]
#[Route('/article_map_query_parameter', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleFromMapQueryParameter(
#[MapQueryParameter] int $someInt,
Expand All @@ -27,7 +27,7 @@ public function fetchArticleFromMapQueryParameter(
) {
}

#[Route('/article_map_query_parameter_validate_filters')]
#[Route('/article_map_query_parameter_validate_filters', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleFromMapQueryParameterValidateFilters(
#[MapQueryParameter(options: ['min_range' => 2, 'max_range' => 1234])] int $minMaxInt,
Expand All @@ -42,21 +42,21 @@ public function fetchArticleFromMapQueryParameterValidateFilters(
) {
}

#[Route('/article_map_query_parameter_nullable')]
#[Route('/article_map_query_parameter_nullable', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleFromMapQueryParameterNullable(
#[MapQueryParameter] ?int $id,
) {
}

#[Route('/article_map_query_parameter_default')]
#[Route('/article_map_query_parameter_default', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleFromMapQueryParameterDefault(
#[MapQueryParameter] int $id = 123,
) {
}

#[Route('/article_map_query_parameter_overwrite_parameters')]
#[Route('/article_map_query_parameter_overwrite_parameters', methods: ['GET'])]
#[OA\Parameter(
name: 'id',
in: 'query',
Expand Down
10 changes: 5 additions & 5 deletions tests/Functional/Controller/MapQueryStringController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@

class MapQueryStringController
{
#[Route('/article_map_query_string')]
#[Route('/article_map_query_string', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleFromMapQueryString(
#[MapQueryString] SymfonyMapQueryString $article81Query
) {
}

#[Route('/article_map_query_string_nullable')]
#[Route('/article_map_query_string_nullable', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleFromMapQueryStringNullable(
#[MapQueryString] ?SymfonyMapQueryString $article81Query
) {
}

#[Route('/article_map_query_string_passes_validation_groups')]
#[Route('/article_map_query_string_passes_validation_groups', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleFromMapQueryStringHandlesValidationGroups(
#[MapQueryString(validationGroups: ['test'])] SymfonyConstraintsWithValidationGroups $symfonyConstraintsWithValidationGroups,
) {
}

#[Route('/article_map_query_string_overwrite_parameters')]
#[Route('/article_map_query_string_overwrite_parameters', methods: ['GET'])]
#[OA\Parameter(
name: 'id',
in: 'query',
Expand Down Expand Up @@ -78,7 +78,7 @@ public function fetchArticleFromMapQueryStringOverwriteParameters(
) {
}

#[Route('/article_map_query_string_many_parameters')]
#[Route('/article_map_query_string_many_parameters', methods: ['GET'])]
#[OA\Response(response: '200', description: '')]
public function fetchArticleWithManyParameters(
#[MapQueryString] FilterQueryModel $filterQuery,
Expand Down
Loading

0 comments on commit 3240222

Please sign in to comment.