Skip to content

Replace displayApi flag with associatedApis in demoextrafield#249

Open
jolelievre wants to merge 1 commit into
PrestaShop:masterfrom
jolelievre:demoextrafield-associated-apis
Open

Replace displayApi flag with associatedApis in demoextrafield#249
jolelievre wants to merge 1 commit into
PrestaShop:masterfrom
jolelievre:demoextrafield-associated-apis

Conversation

@jolelievre

Copy link
Copy Markdown
Contributor

Adapts the demoextrafield example module to the Admin API extra-property association convention: each property now declares the specific endpoints it is exposed on via associatedApis (URI templates) instead of the all-or-nothing displayApi boolean.

  • Products fields → /products, /products/{productId}
  • Categories fields → /categories, /categories/{categoryId}
  • Customers fields → /customers, /customers/{customerId}
  • Manufacturer address field → /addresses, /addresses/{addressId}, /addresses/manufacturers/{addressId}
  • The promo banner and revision code declare no associatedApis, so they stay back-office only (not exposed on the API).

Depends on the core extra-property Admin API work (associatedApis / filterByApi).

The Admin API extra-property integration associates each property with the specific endpoints it belongs to via associatedApis (URI templates), instead of the all-or-nothing displayApi boolean. Declare the relevant endpoints for every demoextrafield property (products, categories, customers, addresses). The promo banner and revision code keep no API association, so they stay back-office only.
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

Successfully merging this pull request may close these issues.

1 participant