diff --git a/docs/specs/openapi.yaml b/docs/specs/openapi.yaml index f2172c9..a1c9cc3 100644 --- a/docs/specs/openapi.yaml +++ b/docs/specs/openapi.yaml @@ -95,7 +95,7 @@ components: repository: {} Response: properties: - WOOverzoeken: + WOOVerzoeken: type: array items: $ref: "#/components/schemas/OpenWOO" diff --git a/src/OpenWOO/RestAPI/ItemController.php b/src/OpenWOO/RestAPI/ItemController.php index 8cddc67..fbfbac9 100644 --- a/src/OpenWOO/RestAPI/ItemController.php +++ b/src/OpenWOO/RestAPI/ItemController.php @@ -110,7 +110,7 @@ public function getItems(WP_REST_Request $request): Response $items = (new OpenWOORepository()) ->query(apply_filters('yard/openwoo/rest-api/items/query', $this->getPaginatorParams($request))) ->query(apply_filters('yard/openwoo/rest-api/items/query', $this->getFilters($request))); - + if ($this->showOnParamIsValid($request)) { $items->query(OpenWOORepository::addShowOnParameter($request->get_param('source'))); } @@ -118,7 +118,7 @@ public function getItems(WP_REST_Request $request): Response $data = $items->all(); return new Response([ - 'WOOverzoeken' => $data + 'WOOVerzoeken' => $data ], $items->getQuery()); } @@ -195,7 +195,7 @@ public function getItem(WP_REST_Request $request) } return new Response([ - 'WOOverzoeken' => [ + 'WOOVerzoeken' => [ $data ] ], $item->getQuery()); diff --git a/src/OpenWOO/RestAPI/Response.php b/src/OpenWOO/RestAPI/Response.php index 03e5028..08ec908 100644 --- a/src/OpenWOO/RestAPI/Response.php +++ b/src/OpenWOO/RestAPI/Response.php @@ -12,7 +12,7 @@ class Response extends WP_REST_Response { /** * @OA\Property( - * property="WOOverzoeken", + * property="WOOVerzoeken", * type="array", * @OA\Items(ref="#/components/schemas/OpenWOO"), * @OA\Link(link="OpenWOORepository", ref="#/components/links/OpenWOORepository")