Best practices and tips
We shall now learn some of the API best practices and tips. In order to get started, let’s learn some commonly used API design naming conventions.
API design naming convention
Although every organization may have its own set of guidelines and best practices for API design, here are a few commonly used naming conventions while designing an API. Adhering to the naming conventions throughout the API makes it look consistent and standardized:
- Follow standard naming conventions for all the APIs. A commonly used format is
<project_name><API-led-connectivity-layer>-api
– for example,musicbox-sys-api
. - Folder names should be in lower camel case – for example,
dataTypes
,examples
, andmusicboxAssets
. - Filenames should be in lower snake case for readability purposes – for example,
post-songs-datatypes.raml
andget-songs-example.raml
. - RAML declarations should be in lower camel case – for example...