Skip to content

Commit 313753e

Browse files
authored
Merge pull request #453 from JeffreyRichter/patch-5
Explain service response for missing/unsupported `api-version`
2 parents e49bec4 + 3b8cc28 commit 313753e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

azure/Guidelines.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Please ensure that you add an anchor tag to any new guidelines that you add and
1616

1717
| Date | Notes |
1818
| ----------- | -------------------------------------------------------------- |
19+
| 2023-May-12 | Explain service response for missing/unsupported `api-version` |
1920
| 2023-Apr-07 | Update/clarify guidelines on polymorphism |
2021
| 2022-Sep-07 | Updated URL guidelines for DNS Done Right |
2122
| 2022-Jul-15 | Update guidance on long-running operations |
@@ -752,6 +753,10 @@ Clients specify the version of the API to be used in every request to the servic
752753

753754
<a href="#versioning-date-based-versioning" name="versioning-date-based-versioning">:white_check_mark:</a> **DO** use `YYYY-MM-DD` date values, with a `-preview` suffix for preview versions, as the valid values for `api-version`.
754755

756+
<a href="#versioning-api-version-missing" name="versioning-api-version-missing">:white_check_mark:</a> **DO** return HTTP 400 with error code "MissingApiVersionParameter" and message "The api-version query parameter (?api-version=) is required for all requests" if client omits the `api-version` query parameter.
757+
758+
<a href="#versioning-api-version-unsupported" name="versioning-api-version-unsupported">:white_check_mark:</a> **DO** return HTTP 400 with error code "UnsupportedApiVersionValue" and message "Unsupported api-version '{0}'. The supported api-versions are '{1}'." if client passes an `api-version` value unrecognized by the service. For the supported api-versions, just list all the stable versions still supported by the service and just the latest public preview version (if any).
759+
755760
```text
756761
PUT https://service.azure.com/users/Jeff?api-version=2021-06-04
757762
```

0 commit comments

Comments
 (0)