Skip to content

Fix singular names on plurals in Web API service URLs to comply with RESTful practices for all MSI modules #1286

Closed
@maghamed

Description

@maghamed

Use plural nouns
Do not mix up singular and plural nouns. Keep it simple and use only plural nouns for all resources in Magento WEB API.

Sources instead of Source
Stocks instead of Stock
Source-items instead of Source-item
etc

Currently, we have

    <route url="/V1/inventory/source" method="POST">
        <service class="Magento\InventoryApi\Api\SourceRepositoryInterface" method="save"/>
        <resources>
            <resource ref="Magento_InventoryApi::source_edit"/>
        </resources>
    </route>
    <route url="/V1/inventory/source/:sourceCode" method="PUT">
        <service class="Magento\InventoryApi\Api\SourceRepositoryInterface" method="save"/>
        <resources>
            <resource ref="Magento_InventoryApi::source_edit"/>
        </resources>
    </route>
    <!-- Stock -->
    <route url="/V1/inventory/stock" method="GET">
        <service class="Magento\InventoryApi\Api\StockRepositoryInterface" method="getList"/>
        <resources>
            <resource ref="Magento_InventoryApi::stock"/>
        </resources>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions