Skip to content

Commit aaf84b8

Browse files
authored
Merge branch 'vNext' into client-request-id
2 parents 82c1251 + 3ccd6ff commit aaf84b8

32 files changed

+3089
-517
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# These are the set of folks who should review PRs on the azureRestUpdates branch.
2-
* @microsoft/azure-api-stewardship-board
2+
* @microsoft/azure-api-stewardship-board @Azure/api-stewardship-board

Guidelines.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ Because PUT is defined as a complete replacement of the content, it is dangerous
380380
Clients that do not understand (and hence ignore) properties on a resource are not likely to provide them on a PUT when trying to update a resource, hence such properties could be inadvertently removed.
381381
Services MAY optionally support PUT to update existing resources, but if they do they MUST use replacement semantics (that is, after the PUT, the resource's properties MUST match what was provided in the request, including deleting any server properties that were not provided).
382382

383-
Under UPSERT semantics, a PATCH call to a nonexistent resource is handled by the server as a "create," and a PATCH call to an existing resource is handled as an "update." To ensure that an update request is not treated as a create or vice versa, the client MAY specify precondition HTTP headers in the request.
383+
Under UPSERT semantics, a PATCH call to a nonexistent resource is handled by the server as a "create", and a PATCH call to an existing resource is handled as an "update". To ensure that an update request is not treated as a create or vice versa, the client MAY specify precondition HTTP headers in the request.
384384
The service MUST NOT treat a PATCH request as an insert if it contains an If-Match header and MUST NOT treat a PATCH request as an update if it contains an If-None-Match header with a value of "*".
385385

386386
If a service does not support UPSERT, then a PATCH call against a resource that does not exist MUST result in an HTTP "409 Conflict" error.
@@ -501,14 +501,14 @@ However, it is very generic and does not require specific OData constructs.
501501
APIs SHOULD use this format even if they are not using other OData constructs.
502502

503503
The error response MUST be a single JSON object.
504-
This object MUST have a name/value pair named "error." The value MUST be a JSON object.
504+
This object MUST have a name/value pair named "error". The value MUST be a JSON object.
505505

506-
This object MUST contain name/value pairs with the names "code" and "message," and it MAY contain name/value pairs with the names "target," "details" and "innererror."
506+
This object MUST contain name/value pairs with the names "code" and "message", and it MAY contain name/value pairs with the names "target", "details" and "innererror."
507507

508508
The value for the "code" name/value pair is a language-independent string.
509509
Its value is a service-defined error code that SHOULD be human-readable.
510510
This code serves as a more specific indicator of the error than the HTTP error code specified in the response.
511-
Services SHOULD have a relatively small number (about 20) of possible values for "code," and all clients MUST be capable of handling all of them.
511+
Services SHOULD have a relatively small number (about 20) of possible values for "code", and all clients MUST be capable of handling all of them.
512512
Most services will require a much larger number of more specific error codes, which are not interesting to all clients.
513513
These error codes SHOULD be exposed in the "innererror" name/value pair as described below.
514514
Introducing a new value for "code" that is visible to existing clients is a breaking change and requires a version increase.
@@ -521,13 +521,13 @@ Services SHOULD NOT localize "message" for the end user, because doing so might
521521

522522
The value for the "target" name/value pair is the target of the particular error (e.g., the name of the property in error).
523523

524-
The value for the "details" name/value pair MUST be an array of JSON objects that MUST contain name/value pairs for "code" and "message," and MAY contain a name/value pair for "target," as described above.
524+
The value for the "details" name/value pair MUST be an array of JSON objects that MUST contain name/value pairs for "code" and "message", and MAY contain a name/value pair for "target", as described above.
525525
The objects in the "details" array usually represent distinct, related errors that occurred during the request.
526526
See example below.
527527

528528
The value for the "innererror" name/value pair MUST be an object.
529529
The contents of this object are service-defined.
530-
Services wanting to return more specific errors than the root-level code MUST do so by including a name/value pair for "code" and a nested "innererror." Each nested "innererror" object represents a higher level of detail than its parent.
530+
Services wanting to return more specific errors than the root-level code MUST do so by including a name/value pair for "code" and a nested "innererror". Each nested "innererror" object represents a higher level of detail than its parent.
531531
When evaluating errors, clients MUST traverse through all of the nested "innererrors" and choose the deepest one that they understand.
532532
This scheme allows services to introduce new error codes anywhere in the hierarchy without breaking backwards compatibility, so long as old error codes still appear.
533533
The service MAY return different levels of depth and detail to different callers.
@@ -591,7 +591,7 @@ Example of "innererror":
591591
}
592592
```
593593

594-
In this example, the most basic error code is "BadArgument," but for clients that are interested, there are more specific error codes in "innererror."
594+
In this example, the most basic error code is "BadArgument", but for clients that are interested, there are more specific error codes in "innererror."
595595
The "PasswordReuseNotAllowed" code may have been added by the service at a later date, having previously only returned "PasswordDoesNotMeetPolicy."
596596
Existing clients do not break when the new error code is added, but new clients MAY take advantage of it.
597597
The "PasswordDoesNotMeetPolicy" error also includes additional name/value pairs that allow the client to determine the server's configuration, validate the user's input programmatically, or present the server's constraints to the user within the client's own localized messaging.
@@ -655,7 +655,7 @@ The spirit behind CORS is to avoid preflight for any simple cross-domain request
655655
All other requests require preflight.
656656

657657
A request is "simple" and avoids preflight if its method is GET, HEAD or POST, and if it doesn't contain any request headers besides Accept, Accept-Language and Content-Language.
658-
For POST requests, the Content-Type header is also allowed, but only if its value is "application/x-www-form-urlencoded," "multipart/form-data" or "text/plain."
658+
For POST requests, the Content-Type header is also allowed, but only if its value is "application/x-www-form-urlencoded", "multipart/form-data" or "text/plain."
659659
For any other headers or values, a preflight request will happen.
660660

661661
### 8.2. Service guidance
@@ -680,7 +680,7 @@ Services used by interactive Web clients where performance is critical SHOULD av
680680
- Avoid requiring cookies. XmlHttpRequest will only send cookies on cross-domain requests if the "withCredentials" attribute is set; this also causes a preflight request.
681681
- Services that require cookie-based authentication MUST use a "dynamic canary" to secure all APIs that accept cookies.
682682

683-
- For POST calls, prefer simple Content-Types in the set of ("application/x-www-form-urlencoded," "multipart/form-data," "text/plain") where applicable. Any other Content-Type will induce a preflight request.
683+
- For POST calls, prefer simple Content-Types in the set of ("application/x-www-form-urlencoded", "multipart/form-data", "text/plain") where applicable. Any other Content-Type will induce a preflight request.
684684
- Services MUST NOT contravene other API recommendations in the name of avoiding CORS preflight requests. In particular, in accordance with recommendations, most POST requests will actually require a preflight request due to the Content-Type.
685685
- If eliminating preflight is critical, then a service MAY support alternative mechanisms for data transfer, but the RECOMMENDED approach MUST also be supported.
686686

@@ -1205,7 +1205,7 @@ O | RealNumber | "OLE Date"; integral part is the number of days sin
12051205
T | SignedInteger | "Ticks"; number of ticks (100-nanosecond intervals) since midnight January 1, 1601. *See note below.* | [MSDN][ticks-time]
12061206
U | SignedInteger | "UNIX"; number of seconds since midnight, January 1, 1970. | [MSDN][unix-time]
12071207
W | SignedInteger | "Windows"; number of milliseconds since midnight January 1, 1601. *See note below.* | [MSDN][windows-time]
1208-
X | RealNumber | "Excel"; as for `O` but the year 1900 is incorrectly treated as a leap year, and day 0 is "January 0 (zero)." | [Microsoft Support][excel-time]
1208+
X | RealNumber | "Excel"; as for `O` but the year 1900 is incorrectly treated as a leap year, and day 0 is "January 0 (zero)". | [Microsoft Support][excel-time]
12091209

12101210
**Important note for `C` and `W` kinds:** The native CLR and Windows times are represented by 100-nanosecond "tick" values.
12111211
To interoperate with ECMAScript clients that have limited precision, _these values MUST be converted to and from milliseconds_ when (de)serialized as a `DateLiteral`.
@@ -1252,15 +1252,15 @@ For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six month
12521252
- Start and end, such as "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z"
12531253
- Start and duration, such as "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
12541254
- Duration and end, such as "P1Y2M10DT2H30M/2008-05-11T15:30:00Z"
1255-
- Duration only, such as "P1Y2M10DT2H30M," with additional context information
1255+
- Duration only, such as "P1Y2M10DT2H30M", with additional context information
12561256

12571257
### 11.6. Repeating intervals
12581258
[Repeating Intervals][wikipedia-iso8601-repeatingintervals], as per [ISO 8601][wikipedia-iso8601-repeatingintervals], are:
12591259

12601260
> Formed by adding "R[n]/" to the beginning of an interval expression, where R is used as the letter itself and [n] is replaced by the number of repetitions.
12611261
Leaving out the value for [n] means an unbounded number of repetitions.
12621262

1263-
For example, to repeat the interval of "P1Y2M10DT2H30M" five times starting at "2008-03-01T13:00:00Z," use "R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M."
1263+
For example, to repeat the interval of "P1Y2M10DT2H30M" five times starting at "2008-03-01T13:00:00Z", use "R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M."
12641264

12651265
## 12. Versioning
12661266
**All APIs compliant with the Microsoft REST API Guidelines MUST support explicit versioning.** It's critical that clients can count on services to be stable over time, and it's critical that services can add features and make changes.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ We further hope that these guidelines may encourage other organizations to creat
99
### Additional guidance for Azure service teams
1010
Azure service teams should reference the companion documents, [Azure REST API Guidelines](./azure/Guidelines.md) and [Considerations for Service Design](./azure/ConsiderationsForServiceDesign.md), when building or modifying their services. These documents provide a refined set of guidance targeted specifically for Azure services. For more information please refer to the [README](./azure/README.md) in the Azure folder.
1111

12+
### Additional guidance for Microsoft Graph service teams
13+
Graph service teams should reference the companion document, [Graph REST API Guidelines](./graph/GuidelinesGraph.md) when building or modifying their services. This document and the associated pattern catalog provides a refined set of guidance targeted specifically for Microsoft Graph services.
14+
1215
[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
1316

1417
## Code of Conduct

SECURITY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
2+
3+
## Security
4+
5+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6+
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8+
9+
## Reporting Security Issues
10+
11+
**Please do not report security vulnerabilities through public GitHub issues.**
12+
13+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14+
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16+
17+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18+
19+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20+
21+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
* Full paths of source file(s) related to the manifestation of the issue
23+
* The location of the affected source code (tag/branch/commit or direct URL)
24+
* Any special configuration required to reproduce the issue
25+
* Step-by-step instructions to reproduce the issue
26+
* Proof-of-concept or exploit code (if possible)
27+
* Impact of the issue, including how an attacker might exploit the issue
28+
29+
This information will help us triage your report more quickly.
30+
31+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32+
33+
## Preferred Languages
34+
35+
We prefer all communications to be in English.
36+
37+
## Policy
38+
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40+
41+
<!-- END MICROSOFT SECURITY.MD BLOCK -->

0 commit comments

Comments
 (0)