-
Notifications
You must be signed in to change notification settings - Fork 3
Style guide
Adjust's developer documentation follows certain conventions. These conventions build off of the Microsoft Writing Style Guide.
Adjust's developer documentation adheres to IETF RFC 2119 when using certain key words relating to the requirement of adherence to instructions.
Abstract
In many standards track documents several words are used to signify
the requirements in the specification. These words are often
capitalized. This document defines these words as they should be
interpreted in IETF documents. Authors who follow these guidelines
should incorporate this phrase near the beginning of their document:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
RFC 2119.
Note that the force of these words is modified by the requirement
level of the document in which they are used.
1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
definition is an absolute requirement of the specification.
2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
definition is an absolute prohibition of the specification.
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.
4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
5. MAY This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)
In most scenarios, writers should write these key words in lowercase. If attention needs to be drawn to the key word, it SHOULD be written in all caps to ensure that its meaning clear to the reader.
Callouts are visually distinct blocks that draw attention to key information. These should be used sparingly to ensure their meaning isn't diminished. Where possible, writers should write all information in plain text and use callouts only where necessary.
The following callout types are available:
- Warning: A warning callout highlights instructions that are destructive and result in a loss of data. Warning callouts MUST be used to inform developers of the consequences of performing a destructive action.
- Important: An important callout highlights instructions which, if not followed, will cause errors or failures. They MUST NOT be used to draw attention to instructions or information which is important but non-essential.
- Note: A note callout highlights information that is useful but non-essential. Where possible, the writer should include this information in the body without drawing attention to it with a callout. A note should be used only if the information is important but won't result in problems if not adhered to.
- Tip: A tip callout highlights non-essential recommendations. These should be used only for specific recommended instructions that are non-essential. In all situations, writers MUST write the instructions in such a way that the reader can follow the instructions to completion without needing to follow the instruction in the tip.
- Info: An info callout is used to highlight general information. In most cases, writers shouldn't use these.
- See also: See also callouts highlight links to additional documentation or information. In most cases, writers should link to relevant documentation in the body of the text rather than in a callout.
Structured information such as method arguments, class properties, and API parameters MUST be written as description lists. Definition lists are structured as follows:
- The description list item MUST contain the name of the item being documented with the data type in parentheses.
- The description list item name and data type MUST be written as inline code (``). For example: "
id
(`string`)" - The description list description MUST be preceded by an empty line.
- The description list description MUST start with a colon followed by a space (
:
). - Content that needs to be nested in the description body (for example: list items) MUST be indented by two tabs.
`parameter` (`Data type`)
: Parameter definition
- Indented
- list
When describing multiple parameters with differentiating factors such as where the parameter is placed in a request, the writer should break up the parameters by:
- Position.
- Necessity.
For example, if an endpoint MUST contain:
- A parameter in the path.
- A parameter in the query params.
And MAY contain:
- Another parameter in the query params.
The writer should write this as follows:
The following parameters MUST be placed in the query path:
`link` (`String`)
: An alphanumeric Adjust link token.
The following parameters MUST be placed in the query parameters:
`date` (`datetime`)
: The date on which the event occured.
The following parameters MAY be placed in the query parameters:
`visible` (`boolean`)
: Whether the event is visible.