Incorporating API changes into the OData model

Version: 10.3

When your customization includes API changes, you must create a pipeline block class named ConfigureServiceApiBlock , and register it in the IConfigureServiceApiPipeline pipeline. This is required to incorporate your changes and to register new entities with the OData model.

Follow best practices when incorporating API changes into the OData model:

  • Name the new pipeline block ConfigureServiceApiBlock.

  • Place the ConfigureServiceApiBlock class at the root of your plugin project folder.

  • The ConfigureServiceApiBlock class must extend the PipelineBlock class, and take ODataConventionModelBuilder as an input and output parameter. For example:

    RequestResponse
    public class ConfigureServiceApiBlock : pipelineBlock<ODataConventionModelBuilder,
    ODataConventionModelBuilder, CommercePipelineExecutionContext>
  • Because the ODataConventionModelBuilder class is a Microsoft class, follow the Microsoft standard patterns and procedures when adding new entities and exposing new API methods. The Commerce Engine SDK provides many implementation examples.

Do you have some feedback for us?

If you have suggestions for improving this article,