forked from interagent/http-api-design
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gordon Yeu
committed
Dec 5, 2014
1 parent
a6d6d22
commit 6292338
Showing
7 changed files
with
28 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
## 貢獻者 | ||
|
||
* Wesley Beary <geemus+github@gmail.com> | ||
* Mark McGranaghan <mmcgrana@gmail.com> | ||
* Jamu Kakar <jkakar@kakar.ca> | ||
* Jonathan Roes <jroes@jroes.net> | ||
* Kuo-Cheng Yeu <kmd@mikuru.tw> | ||
* [Wesley Beary](mailto:geemus+github@gmail.com) | ||
* [Mark McGranaghan](mailto:mmcgrana@gmail.com) | ||
* [Jamu Kakar](mailto:jkakar@kakar.ca) | ||
* [Jonathan Roes](mailto:jroes@jroes.net) | ||
* [Kuo-Cheng Yeu](https://github.com/kcyeu) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
### 產物 | ||
|
||
* [提供機器可讀的 JSON 大綱](artifacts/provide-machine-readable-json-schema.md) | ||
* [提供一般人可讀的文件](artifacts/provide-human-readable-docs.md) | ||
* [提供執行範例](artifacts/provide-executable-examples.md) | ||
* [描述穩定性](artifacts/describe-stability.md) | ||
* [提供機器可讀的 JSON 大綱](artifacts/provide-machine-readable-json-schema.md) | ||
* [提供一般人可讀的文件](artifacts/provide-human-readable-docs.md) | ||
* [提供執行範例](artifacts/provide-executable-examples.md) | ||
* [描述穩定性](artifacts/describe-stability.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
### 基礎 | ||
|
||
* [要求使用 TLS](foundations/require-tls.md) | ||
* [以 Accept 標頭做版本控管](foundations/version-with-accepts-header.md) | ||
* [以 ETag 支援快取](foundations/support-caching-with-etags.md) | ||
* [以 Request-Id 追蹤需求](foundations/trace-requests-with-request-ids.md) | ||
* [以 Range 分頁](foundations/paginate-with-ranges.md) | ||
* [要求使用 TLS](foundations/require-tls.md) | ||
* [以 Accept 標頭做版本控管](foundations/version-with-accepts-header.md) | ||
* [以 ETag 支援快取](foundations/support-caching-with-etags.md) | ||
* [以 Request-Id 追蹤需求](foundations/trace-requests-with-request-ids.md) | ||
* [以 Range 分頁](foundations/paginate-with-ranges.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
### 需求 | ||
|
||
* [回傳適當的狀態碼](requests/return-appropriate-status-codes.md) | ||
* [情況許可時提供全部資源](requests/provide-full-resources-where-available.md) | ||
* [接受需求本體的序列化 JSON](requests/accept-serialized-json-in-request-bodies.md) | ||
* [使用一致的路徑格式](requests/use-consistent-path-formats.md) | ||
* [小寫路徑與屬性](requests/downcase-paths-and-attributes.md) | ||
* [支援非 ID 的便利存取](requests/support-non-id-dereferencing-for-convenience.md) | ||
* [減少巢狀路徑](requests/minimize-path-nesting.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
#### Support non-id dereferencing for convenience | ||
#### 支援非 ID 的便利存取 | ||
|
||
In some cases it may be inconvenient for end-users to provide IDs to | ||
identify a resource. For example, a user may think in terms of a Heroku | ||
app name, but that app may be identified by a UUID. In these cases you | ||
may want to accept both an id or name, e.g.: | ||
以 ID 來辨別資源對使用者來說有時很不方便。舉個例子,使用者會以 Heroku app 名稱來思考,但那個 app 可用 UUID 辨識。這種情況您會希望同時接受 ID 與名稱,例如: | ||
|
||
```bash | ||
$ curl https://service.com/apps/{app_id_or_name} | ||
$ curl https://service.com/apps/97addcf0-c182 | ||
$ curl https://service.com/apps/www-prod | ||
``` | ||
|
||
Do not accept only names to the exclusion of IDs. | ||
不要只接受名稱而排除 ID。 |