You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure/Guidelines.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,15 @@ Developing a new service requires the development of at least 1 (management plan
26
26
27
27
> A **management plane** API is implemented through the Azure Resource Manager (ARM) and is used by subscription administrators. A **data plane** API is used by developers to implement applications. Rarely, a subset of operations may be useful to both administrators and users, in which case it should appear in both APIs.
28
28
29
-
* Think about naming from the context of a **developer experience**.
29
+
* Think about naming from the context of a **developer experience**.
30
30
* Start with the "things" your API manipulates, then think about the operations that a developer needs to do to these "things".
31
31
* Keep the verbs present-tense. Avoid the use of past or future tense in most cases.
32
32
* Avoid the use of generic names like "Object", "Job", "Task", "Operation" (for example - the list is not exhaustive).
33
33
* What happens to the names when the focus of the service expands? It may be worth starting with a less generic name to avoid a breaking change later on.
34
34
* Think about the code that a customer will write both before and after the REST API call. How will a developer use this API in the canonical use case?
35
35
* Consider multiple languages, and include at least one dynamically typed language (for example, Python or JavaScript) and one statically typed language (for example, Java or C#).
36
36
* Use previews to get the shape right. There are different notification, breaking change, and lifetime requirements on preview API versions.
37
-
* We recommend a minimum of 2 preview versions prior to your first GA release. However, there is no hard rule for previews.
37
+
* We recommend a minimum of 2 preview versions prior to your first GA release. However, there is no hard rule for previews.
38
38
* You should gather feedback from your customers and iterate until the API is useful. Actively solicit feedback from your preview customers.
39
39
40
40
Preventing future breaking changes is a source of concern during initial review. Without a history, the review process attempts to identify patterns that may result in breaking changes later on. For instance, think about the following:
@@ -54,7 +54,7 @@ Preventing future breaking changes is a source of concern during initial review.
54
54
* Implement managed identity access controls for accessing the other resource. Do not accept connection strings as a method of specifying access permissions.
55
55
* Be concerned about data widths of numeric types. Wider data types (e.g. 64-bit vs. 32-bit) are more future-proof.
56
56
* Think about how the interface will be represented by an SDK. For example, JavaScript can only support numbers up to 2<sup>53</sup>, so relying on the full width of a 64-bit number should be avoided.
57
-
* Implement (and encourage) the use of PATCH for resource modifications.
57
+
* Implement (and encourage) the use of PATCH for resource modifications.
58
58
* The PATCH operation should be able to modify any mutable property on the resource.
59
59
* Prefer JSON merge-patch ([RFC 7396](https://tools.ietf.org/html/rfc7396)) over JSON patch ([RFC 6902](https://tools.ietf.org/html/rfc6902)) as the accepted data format for PATCH operations.
60
60
* Get a security review of your API. You should be especially concerned with PII leakage, GDPR compliance and any other compliance regulations appropriate to your situation.
@@ -172,7 +172,7 @@ Evolutionary changes do not require prior approval (but still need a version bum
172
172
173
173
#### Changing the API without changing the version
174
174
175
-
Because the API version represents a contract that a developer can rely on when generating SDKs to communicate with the service, there are a limited set of situations where changing the API is permissable without a version bump. The only changes universally allowed:
175
+
Because the API version represents a contract that a developer can rely on when generating SDKs to communicate with the service, there are a limited set of situations where changing the API is permissible without a version bump. The only changes universally allowed:
176
176
177
177
1. Adding a new (optional) value to an extensible enum.
178
178
@@ -191,7 +191,7 @@ This functionality is only available for single cloud deployments because the AP
191
191
192
192
Do not add computed output values if the computed value can be calculated from other information in the payload. It unnecessarily expands the payload.
193
193
194
-
All situations where the API definition is changed (irrespective of whether a version change happens or not) **MUST** be reviewed by the Azure REST API Review Board before release.
194
+
All situations where the API definition is changed (irrespective of whether a version change happens or not) **MUST** be reviewed by the Azure REST API Review Board before release.
195
195
196
196
### Preview Versions
197
197
@@ -208,7 +208,7 @@ Preview versions are not treated the same way as release versions. In general,
208
208
209
209
You should follow the axiom "don't surprise your customers" when deciding whether to increment the preview version, and err on the side of incrementing the preview version.
210
210
211
-
Preview APIs [follow a different path for deprecation and retirement](https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/37683/Retirement-of-Previews), and are not subject to the same guarantees as APIs marked as generally available. Preview APIs have a life-span of not more than 12 months, after which they must be retired.
211
+
Preview APIs [follow a different path for deprecation and retirement](https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/37683/Retirement-of-Previews), and are not subject to the same guarantees as APIs marked as generally available. Preview APIs have a life-span of not more than 12 months, after which they must be retired.
212
212
213
213
#### Why Azure recommends conservative API versioning
214
214
@@ -220,7 +220,7 @@ There are a few mechanisms that can reduce breaking changes and their effects on
220
220
221
221
#### Use PATCH instead of PUT for updates
222
222
223
-
The HTTP PUT verb is an idemopotent apply operation for the API version being used. The [Microsoft API Guidelines already recommend the use of PATCH](https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#742-patch) for updates.
223
+
The HTTP PUT verb is an idempotent apply operation for the API version being used. The [Microsoft API Guidelines already recommend the use of PATCH](https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#742-patch) for updates.
224
224
225
225
Consider the following sequence:
226
226
@@ -252,7 +252,7 @@ While removing a value from an enum is a breaking change, adding an enum can be
252
252
}
253
253
```
254
254
255
-
Always model an enum as a string unleess you are positive that the symbol set will **NEVER** change over time.
255
+
Always model an enum as a string unless you are positive that the symbol set will **NEVER** change over time.
Copy file name to clipboardExpand all lines: graph/dictionary/client-guidance.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,12 @@ In **components** in **schemas**:
13
13
```json
14
14
{
15
15
"roleSettings": {
16
-
"type": "object",
16
+
"type": "object",
17
17
"properties": {
18
-
"domain": {
19
-
"type": "string"
20
-
}
21
-
}
18
+
"domain": {
19
+
"type": "string"
20
+
}
21
+
}
22
22
}
23
23
}
24
24
}
@@ -28,7 +28,7 @@ In **components** in **schemas**:
28
28
{
29
29
"type": "object",
30
30
"patternProperties": {
31
-
".*": {
31
+
".*": {
32
32
"$ref": "#/components/schemas/roleSettings"
33
33
},
34
34
"additionalProperties": false
@@ -38,11 +38,11 @@ In **components** in **schemas**:
38
38
39
39
## SDK Support
40
40
41
-
SDKs need to provide support for dictionary types so SDK consummers get a delightful development experience. Examples are provided below for different languages. Other aspects need to be taken into considerations:
41
+
SDKs need to provide support for dictionary types so SDK consumers get a delightful development experience. Examples are provided below for different languages. Other aspects need to be taken into considerations:
42
42
43
43
- Dictionaries support OData annotations (values prefixed with **@OData**), such annotations should not be inserted directly in the dictionary but rather in the additional properties manager.
44
44
- Dictionary types can inherit another dictionary type, this inheritance must be respected.
45
-
- Dictionary values can be of union types, if the target langauge doesn't support union types, a wrapper type should be generated as backward compatible solution with properties for each type of the union.
45
+
- Dictionary values can be of union types, if the target language doesn't support union types, a wrapper type should be generated as backward compatible solution with properties for each type of the union.
46
46
47
47
### Dotnet
48
48
@@ -72,6 +72,6 @@ or
72
72
73
73
## Request builder generation annotation
74
74
75
-
By default SDKs are not required to contain a set of request builders to run CRUD requests on entries in the dictionary. The dictionary will be updated as a whole by consummers by sending requests to the parent entity.
75
+
By default SDKs are not required to contain a set of request builders to run CRUD requests on entries in the dictionary. The dictionary will be updated as a whole by consumers by sending requests to the parent entity.
76
76
77
-
If a **SupportedHttpMethod** annotation is specified for the dictionary type, request builders should be generated to allow consummers to automically update the entries.
77
+
If a **SupportedHttpMethod** annotation is specified for the dictionary type, request builders should be generated to allow consumers to automatically update the entries.
0 commit comments