1
0
mirror of https://github.com/twirl/The-API-Book.git synced 2025-05-31 22:09:37 +02:00

style fix

This commit is contained in:
Sergey Konstantinov 2023-03-02 11:59:21 +02:00 committed by GitHub
parent d932ed9ff5
commit f17729e43b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
### Backwards Compatibility
### On Backwards Compatibility
Backwards compatibility is a *temporal* characteristic of your API. An obligation to maintain backwards compatibility is the crucial point where API development differs from software development in general.

View File

@ -1,6 +1,6 @@
### Terms and Notation Keys
Software development is being characterized, among other things, by the existence of many different engineering paradigms, whose adepts sometimes are quite aggressive towards other paradigms' adepts. While writing this book we are deliberately avoiding using terms like “method”, “object”, “function”, and so on, using the neutral term “entity” instead. “Entity” means some atomic functionality unit, like class, method, object, monad, prototype (underline what you think is right).
Software development is characterized, among other things, by the existence of many different engineering paradigms, whose adepts sometimes are quite aggressive towards other paradigms' adepts. While writing this book, we are deliberately avoiding using terms like “method”, “object”, “function”, and so on, using the neutral term “entity” instead. “Entity” means some atomic functionality unit, like class, method, object, monad, prototype (underline what you think is right).
As for an entity's components, we regretfully failed to find a proper term, so we will use the words “fields” and “methods.”
@ -24,6 +24,7 @@ Cache-Control: no-cache
{
/* And this is
a multiline comment */
"error_reason",
"error_message":
"Long error message⮠
that will span several⮠
@ -38,7 +39,7 @@ It should be read like this:
* a specific JSON, containing a `some_parameter` field and some other unspecified fields (indicated by ellipsis) is being sent as a request body payload;
* in response (marked with an arrow symbol `→`) server returns a `404 Not Founds` status code; the status might be omitted (treat it like a `200 OK` if no status is provided);
* the response could possibly contain additional notable headers;
* the response body is a JSON comprising a single `error_message` field; field value absence means that field contains exactly what you expect it should contain — some error message in this case;
* the response body is a JSON comprising two fields: `error_reason` and `error_message`; field value absence means that field contains exactly what you expect it should contain — so there is some generic error reason value which we omitted;
* if some token is too long to fit a single line, we will split it into several lines adding `⮠` to indicate it continues next line.
The term “client” here stands for an application being executed on a user's device, either a native or a web one. The terms “agent” and “user agent” are synonymous to “client.”