Projekt

Allgemein

Profil

Aktionen

GX-Bug #68996

geschlossen

Product variants -> Generate new product variants - responds with error 500 if only 1 option is passed

Von Josua Michalak vor mehr als 2 Jahren hinzugefügt. Vor etwa 2 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Dringend
Zugewiesen an:
Marvin Muxfeld
Kategorie:
REST-API
Zielversion:
% erledigt:

0%

Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
Unbestimmt
Release Notes Langtext:

Die Generierung der Produktvarianten wurde korrigiert


Beschreibung

The server responds with an error 500 (Internal server error) if only 1 option is passed.

Documentation: https://mjn.dev.gambio-server.net/dev-docu/docs/rest-v3/#operation/generate-product-variant

Steps to reproduce:
Send a POST request following the example within the documentation but with only one option.

POST @ {Shop-URL}/api.php/v3/products/1/variants/_generate
Request body (JSON):

[
    {
    "optionId": 1,
    "optionValueId": 1
    },
    {
    "optionId": 1,
    "optionValueId": 2
    }
]

Expected result:
A variant with the given option values is created.

Actual result:
The server responds with an internal server error 500.


Additional thought/question:
Why is it even necessary to provide optionValueId AND optionId?


Aktionen

Auch abrufbar als: Atom PDF