Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload for family_upate and family_create differs from Akeneo API #5

Open
cplaetzinger opened this issue Dec 13, 2019 · 0 comments
Open

Comments

@cplaetzinger
Copy link
Contributor

The payload for events of type family_update and family_create differs from the JSON returned by the Akeneo HTTP API.

Steps to reproduce:

  • Create a new family in the Akeneo web interface. Fill only the code attribute, leave other attributes empty
  • The events API sends the following event
{
  "event_type": "family_created",
  "payload": {
    "code": "test_family_cp",
    "attributes": [
      "sku"
    ],
    "attribute_as_label": "sku",
    "attribute_as_image": null,
    "attribute_requirements": {
      "default": [
        "sku"
      ],
      "ecommerce": [
        "sku"
      ],
      "print": [
        "sku"
      ]
    },
    "labels": []
  }
}
  • Getting the same family using the Akeneo HTTP API returns the following JSON:
{
  "code": "test_family_cp",
  "attributes": [
    "sku"
  ],
  "attribute_as_label": "sku",
  "attribute_as_image": null,
  "attribute_requirements": {
    "default": [
      "sku"
    ],
    "ecommerce": [
      "sku"
    ],
    "print": [
      "sku"
    ]
  },
  "labels": {}
}

As you can see there is a difference for the labels attribute. If the labels are empty the events API sends it as empty array but it should be an empty map/object.

gotgelf added a commit that referenced this issue Jan 27, 2020
- Fixes #8 issue: Payload for event with type product_model_created differs from Akeneo API
- Fixes #5 issue: Payload for family_upate and family_create differs from Akeneo API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant