Projekt

Allgemein

Profil

GX-Bug #63835

Von Ulrich Wenk vor mehr als 4 Jahren aktualisiert

Der oben genannte Endpoint für Kategorien funktioniert nicht wie in der Dokumentation beschrieben worden ist. 
 Es wird immer genau eine Produkt -Entität ausgegeben, auch wenn mehrere Produkte in der Kategorie vorhanden sind. 

 Das führt zu folgenden Problemen: 
 - Es können nicht alle Produkte einer Kategorie über die REST-API ausgelesen werden 
 - Das Format der Antwort wäre inkonsistent, falls mehrere Produkte ausgegeben werden würden. Es muss sichergestellt werden, dass das Format der Antwort immer eine Liste wiederspiegelt, auch falls nur ein oder kein Produkt gefunden wird. 

 Es existiert ein Test der den Fehler wiederspiegelt: [CategoriesGetEndpointsTest](https://sources.gambio-server.net/gambio/gxdev/blob/3.14_develop/tests/api/categories/CategoriesGetEndpointsTest.php#L45):: 
 ___ 
 **EDIT** 09.10.2019 

 The above category endpoint does not work as described in the documentation. 
 Exactly one product entity will be output, even if there are multiple products in the category. 

 This leads to the following problems: 
 - Not all products of a category can be read via the REST-API. 
 - The format of the response would be inconsistent if multiple products would be output. It must be ensured that the format of the response always reflects a list, even if only one or no product is found. 

 A test exists that reflects the error: 
  [CategoriesGetEndpointsTest](https://sources.gambio-server.net/gambio/gxdev/blob/3.14_develop/tests/api/categories/CategoriesGetEndpointsTest.php#L45):: [CategoriesGetEndpointsTest](https://sources.gambio-server.net/gambio/gxdev/blob/3.14_develop/tests/api/categories/CategoriesGetEndpointsTest.php#L45)::testCategoriesProductsListingEndpointMatchesSchema

Zurück