OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions How can I enable API create action?

This topic contains 2 replies, has 2 voices, and was last updated by  Kadir Yücel 4 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #39858

    Kadir Yücel
    Participant

    Hi,

    I’m trying to extend api_frontend.yml in OroOrderBundle (orocommerce) to enable REST POST orders to create orders with JSON API.

    For that I have created ClicktrendOrderBundle wich extends OroOrderBundle

    I have created bundles.yml in Resources/config/oro with

    Profiler shows it enabled! Finally I have created in same directory api_frontend.yml

    Unfortunately it’s not shown in api/docs. If I enabled it directly in vendor/oro/commerce/src/Oro/Bundle/OrderBundle/Resources/config/oro/api_frontend.yml it works.

    Can you help me thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #39888

    Andrey Yatsenko
    Moderator

    Hi Kadir,

    You can safely remove “getParent” method from “ClicktrendOrderBundle” because the Bundle inheritance is deprecated, and there is no need to use it for extending any Oro configuration, as it’s merged automatically across all the bundles.

    But the bundle priority should be higher than in the original bundle to make the configuration override work.
    The original value is 50, that’s why 45 haven’t worked, please update it.
    https://github.com/oroinc/orocommerce/blob/master/src/Oro/Bundle/OrderBundle/Resources/config/oro/bundles.yml#L2

    Also, it looks like the “inherit” option not needed in an API configuration, because you don’t have the entity inheritance here.

    #39889

    Kadir Yücel
    Participant

    Thanks. It worked!

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top