Skip to content

Commit bd60de8

Browse files
committed
Remove indents on guidelines
1 parent 0c2623b commit bd60de8

File tree

2 files changed

+262
-258
lines changed

2 files changed

+262
-258
lines changed

azure/ConsiderationsForServiceDesign.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Azure Service teams should engage the Azure HTTP/REST Stewardship Board early in
77

88
It is critically important to design your service to avoid disrupting users as the API evolves:
99

10-
> :white_check_mark: **DO** implement API versioning starting with the very first release of the service.
11-
>
12-
> :white_check_mark: **DO** ensure that customer workloads never break
13-
>
14-
> :white_check_mark: **DO** ensure that customers are able to adopt a new version of service or SDK client library <b>without requiring code changes</b>
10+
:white_check_mark: **DO** implement API versioning starting with the very first release of the service.
11+
12+
:white_check_mark: **DO** ensure that customer workloads never break
13+
14+
:white_check_mark: **DO** ensure that customers are able to adopt a new version of service or SDK client library <b>without requiring code changes</b>
1515

1616
### Azure Management Plane vs Data Plane
1717
*Note: Developing a new service requires the development of at least 1 (management plane) API and potentially one or more additional (data plane) APIs. When reviewing v1 service APIs, we see common advice provided during the review.*
@@ -46,33 +46,33 @@ It is important to realize that writing an API is, in many cases, the easiest pa
4646

4747
Focusing on hero scenarios reduces development, support, and maintenance costs; enables teams to align and reach consensus faster; and accelerates the time to delivery. A telltale sign of a service that has not focused on hero scenarios is "API drift," where endpoints are inconsistent, incomplete, or juxtaposed to one another.
4848

49-
> :white_check_mark: **DO** define "hero scenarios" first including abstractions, naming, relationships, and then define the API describing the operations required
50-
>
51-
> :white_check_mark: **DO** provide example code demonstrating the "Hero Scenarios"
49+
:white_check_mark: **DO** define "hero scenarios" first including abstractions, naming, relationships, and then define the API describing the operations required
50+
51+
:white_check_mark: **DO** provide example code demonstrating the "Hero Scenarios"
5252

53-
> :white_check_mark: **DO** consider how your abstractions will be represented in different high-level languages.
53+
:white_check_mark: **DO** consider how your abstractions will be represented in different high-level languages.
5454

55-
> :white_check_mark: **DO** develop code examples in at least one dynamically typed language (for example, Python or JavaScript) and one statically typed language (for example, Java or C#) to illustrate your abstractions and high-level language representations.
55+
:white_check_mark: **DO** develop code examples in at least one dynamically typed language (for example, Python or JavaScript) and one statically typed language (for example, Java or C#) to illustrate your abstractions and high-level language representations.
5656

57-
> :no_entry: **DO NOT** proactively add APIs for speculative features customers might want
57+
:no_entry: **DO NOT** proactively add APIs for speculative features customers might want
5858

5959
### Start with your API Definition
6060
Understanding how your service is used and defining its model and interaction patterns--its API--should be one of the earliest activities a service team undertakes. It reflects the abstractions & naming decisions and makes it easy for developers to implement the hero scenarios.
6161

62-
> :white_check_mark: **DO** create an [OpenAPI Definition](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md) (with [autorest extensions](https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md)) describing the service. The OpenAPI definition is a key element of the Azure SDK plan and is essential for documentation, usability and discoverability of services.
62+
:white_check_mark: **DO** create an [OpenAPI Definition](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md) (with [autorest extensions](https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md)) describing the service. The OpenAPI definition is a key element of the Azure SDK plan and is essential for documentation, usability and discoverability of services.
6363

6464
### Use Previews to Iterate
6565
Before releasing your API plan to invest significant design effort, get customer feedback, & iterate through multiple preview releases. This is especially important for V1 as it establishes the abstractions and patterns that developers will use to interact with your service.
6666

67-
> :ballot_box_with_check: **YOU SHOULD** write and test hypotheses about how your customers will use the API.
68-
>
69-
> :ballot_box_with_check: **YOU SHOULD** release and evaluate a minimum of 2 preview versions prior to the first GA release.
70-
>
71-
> :ballot_box_with_check: **YOU SHOULD** identify key scenarios or design decisions in your API that you want to test with customers, and ask customers for feedback and to share relevant code samples.
72-
>
73-
> :ballot_box_with_check: **YOU SHOULD** consider doing a *code with* exercise in which you actively develop with the customer, observing and learning from their API usage.
74-
>
75-
> :ballot_box_with_check: **YOU SHOULD** capture what you have learned during the preview stage and share these findings with your team and with the API Stewardship Board.
67+
:ballot_box_with_check: **YOU SHOULD** write and test hypotheses about how your customers will use the API.
68+
69+
:ballot_box_with_check: **YOU SHOULD** release and evaluate a minimum of 2 preview versions prior to the first GA release.
70+
71+
:ballot_box_with_check: **YOU SHOULD** identify key scenarios or design decisions in your API that you want to test with customers, and ask customers for feedback and to share relevant code samples.
72+
73+
:ballot_box_with_check: **YOU SHOULD** consider doing a *code with* exercise in which you actively develop with the customer, observing and learning from their API usage.
74+
75+
:ballot_box_with_check: **YOU SHOULD** capture what you have learned during the preview stage and share these findings with your team and with the API Stewardship Board.
7676

7777
### Avoid Surprises
7878
A major inhibitor to adoption and usage is when an API behaves in an unexpected way. Often, these are subtle design decisions that seem benign at the time, but end up introducing significant downstream friction for developers.
@@ -81,15 +81,15 @@ One common area of friction for developers is _polymorphism_ -- where a value ma
8181
Polymorphism can be beneficial in certain cases, e.g. as a way to express inheritance, but also creates friction
8282
because it requires the value to be introspected before being processed and cannot be represented in a natural/useful way in many type-safe languages.
8383

84-
> :ballot_box_with_check: **YOU SHOULD** avoid polymorphism, especially in the response. An endpoint __SHOULD__ work with a single type to avoid problems during SDK creation.
85-
>
86-
> :ballot_box_with_check: **YOU SHOULD** return a homogeneous collection (single type). Do not return heterogeneous collections unless there is a really good reason to do so. If you feel heterogeneous collections are required, discuss the requirement with an API reviewer prior to implementation.
87-
>
84+
:ballot_box_with_check: **YOU SHOULD** avoid polymorphism, especially in the response. An endpoint __SHOULD__ work with a single type to avoid problems during SDK creation.
85+
86+
:ballot_box_with_check: **YOU SHOULD** return a homogeneous collection (single type). Do not return heterogeneous collections unless there is a really good reason to do so. If you feel heterogeneous collections are required, discuss the requirement with an API reviewer prior to implementation.
87+
8888
Collections are another common area of friction for developers. It is important to define collections in a consistent manner within your service and across services of the platform. In particular, features such as pagination, filtering, and sorting, when supported, should follow common API patterns. See [Collections](./Guidelines.md#collections) for specific guidance.
8989

9090
An important consideration when defining a new service is support for pagination.
9191

92-
> :ballot_box_with_check: **YOU SHOULD** support server-side paging, even if your resource does not currently need paging. This avoids a breaking change when your service expands. See [Collections](./Guidelines.md#collections) for specific guidance.
92+
:ballot_box_with_check: **YOU SHOULD** support server-side paging, even if your resource does not currently need paging. This avoids a breaking change when your service expands. See [Collections](./Guidelines.md#collections) for specific guidance.
9393

9494
Another important design pattern for avoiding surprises is idempotency. An operation is idempotent if it can be performed multiple times and have the same result as a single execution.
9595
HTTP requires certain operations like GET, PUT, and DELETE to be idempotent, but for cloud services it is important to make _all_ operations idempotent so that clients can use retry in failure scenarios without risk of unintended consequences.
@@ -98,9 +98,9 @@ See the [HTTP Request / Response Pattern section of the Guidelines](./Guidelines
9898
### Design for Change Resiliency
9999
As you build out your service and API, there are a number of decisions that can be made up front that add resiliency to client implementations. Addressing these as early as possible will help you iterate faster and avoid breaking changes.
100100

101-
> :ballot_box_with_check: **YOU SHOULD** use extensible enumerations. Extensible enumerations are modeled as strings - expanding an extensible enumeration is not a breaking change.
102-
>
103-
> :ballot_box_with_check: **YOU SHOULD** implement [conditional requests](https://tools.ietf.org/html/rfc7232) early. This allows you to support concurrency, which tends to be a concern later on.
101+
:ballot_box_with_check: **YOU SHOULD** use extensible enumerations. Extensible enumerations are modeled as strings - expanding an extensible enumeration is not a breaking change.
102+
103+
:ballot_box_with_check: **YOU SHOULD** implement [conditional requests](https://tools.ietf.org/html/rfc7232) early. This allows you to support concurrency, which tends to be a concern later on.
104104

105105
## Getting Help: The Azure REST API Stewardship Board
106106
The Azure REST API Stewardship board is a collection of dedicated architects that are passionate about helping Azure service teams build interfaces that are intuitive, maintainable, consistent, and most importantly, delight our customers. Because APIs affect nearly all downstream decisions, you are encouraged to reach out to the Stewardship board early in the development process. These architects will work with you to apply these guidelines and identify any hidden pitfalls in your design.

0 commit comments

Comments
 (0)