Skip to content

Commit

Permalink
Merge pull request #3524 from magento-borg/service-contract-clarifica…
Browse files Browse the repository at this point in the history
…tion

Technical guidelines: Clarify what to do when service contracts already exist in a module not suffixed with "Api"
  • Loading branch information
keharper authored Apr 10, 2019
2 parents c306942 + 19524f0 commit 96e3cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/v2.2/coding-standards/technical-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ class View extends Template

6.4.1. Location of API interfaces

6.4.1.1. Service contract interfaces SHOULD be placed in separate API modules. The other modules will depend on the API module, and implementations could be easily swapped via `di.xml`. API module namess must end with the `Api` suffix. For example, if a module is named `MyModule`, its APIs SHOULD be declared in a module named `MyModuleApi`.
6.4.1.1. Service contract interfaces SHOULD be placed in separate API modules, except when an existing module already contains Service Contracts in the ` Api` folder. Other modules will depend on the API module, and implementations could be easily swapped via `di.xml`. API module names must end with the `Api` suffix. For example, if a module is named `MyModule`, its APIs SHOULD be declared in a module named `MyModuleApi`.

6.4.1.2. Service interfaces that should be exposed as web APIs MUST be placed under the `MyModuleApi/Api` directory. Service data interfaces MUST be placed under `MyModuleApi/Api/Data`. Directories under `MyModuleApi/Api` SHOULD NOT be nested.

Expand Down

0 comments on commit 96e3cc8

Please sign in to comment.