Merge pull request #26 from BBVA/fix/style

Style fixes and minor typos.
This commit is contained in:
pancho horrillo
2019-09-09 14:45:28 +02:00
committed by GitHub
3 changed files with 17 additions and 17 deletions
+10 -10
View File
@@ -40,7 +40,7 @@ allowing the user to express the desired mapping in an explicit way.
### Why not tool "X"? ### Why not tool "X"?
All the alternatives we found are **rigid** about the way they match between All the alternatives we found are **rigid** about the way they match
HTTP and shell concepts. HTTP and shell concepts.
* [shell2http](https://github.com/msoap/shell2http): HTTP-server to execute * [shell2http](https://github.com/msoap/shell2http): HTTP-server to execute
@@ -76,8 +76,8 @@ incapable in others.
### Why not CGI? ### Why not CGI?
* CGI is also **rigid** about how it matches between HTTP and UNIX® process * CGI is also **rigid** about how it matches HTTP and UNIX® process
concepts. Notably CGI *meta-variables* are injected into the script's concepts. Notably, CGI *meta-variables* are injected into the script's
environment; this behavior can and has been exploited by nasty attacks such as environment; this behavior can and has been exploited by nasty attacks such as
[Shellshock](https://en.wikipedia.org/wiki/Shellshock_(software_bug)). [Shellshock](https://en.wikipedia.org/wiki/Shellshock_(software_bug)).
* Trying to leverage CGI from a shell script could be less cumbersome in some * Trying to leverage CGI from a shell script could be less cumbersome in some
@@ -105,7 +105,7 @@ frequently throughout the spec.
#### `entrypoint` #### `entrypoint`
The entrypoint definition matches *Docker*'s shell form of it. The entrypoint definition matches *Docker*'s shell form of it.
Technically it's a string which is to be passed to the `command` (`/bin/bash -c` Technically, it's a string which is to be passed to the `command` (`/bin/bash -c`
by default) as the code to be interpreted or executed when attending requests. by default) as the code to be interpreted or executed when attending requests.
@@ -181,7 +181,7 @@ respond to an external event (e.g. an incoming HTTP request).
#### List routes #### List routes
Returns JSON with all the data about the current routes. Be aware that the command Returns JSON with all the data about the current routes. Be aware that the command
field must be a json scaped string. field must be an escaped JSON string.
* **URL**: `/routes` * **URL**: `/routes`
* **Method**: `GET` * **Method**: `GET`
@@ -315,9 +315,9 @@ A new id is created for the appended route so it can be referenced later.
* **Notes**: * **Notes**:
* Route numbering starts at zero. * Route numbering starts at zero.
* When `index` is not provided or is `0` the route will be inserted * When `index` is not provided or is `0` the route will be inserted
first, effectively making it index `0`. in the first position, effectively making it index `0`.
* Conversely, when `index` is greater than the number of entries on the route * Conversely, when `index` is greater than the number of entries on the route
table, it will be inserted last. table, it will be inserted in the last position.
* Finally, when `index` is less than `0` a 422 error is raised. * Finally, when `index` is less than `0` a 422 error is raised.
* A successful request will yield a response containing all the effective * A successful request will yield a response containing all the effective
parameters that were applied. parameters that were applied.
@@ -377,7 +377,7 @@ response.
## Design Principles ## Design Principles
* According to established best practices we use the HTTP methods as follows: * According to well-established best practices, we use the HTTP methods as follows:
* `GET`: Read data without any side-effects. * `GET`: Read data without any side-effects.
* `PUT`: Overwrite existing data. * `PUT`: Overwrite existing data.
* The API calls responses will have two distinct parts: * The API calls responses will have two distinct parts:
@@ -414,7 +414,7 @@ following resource paths:
│ ├──── path Complete URL path (URL-unquoted) │ ├──── path Complete URL path (URL-unquoted)
│ ├──── matches Previously matched URL path parts │ ├──── matches Previously matched URL path parts
│ │ └──── <name> │ │ └──── <name>
│ ├──── params URL parameters (post ? symbol) │ ├──── params URL parameters (after the "?" symbol)
│ │ └──── <name> │ │ └──── <name>
│ ├──── headers HTTP request headers │ ├──── headers HTTP request headers
│ │ └──── <name> │ │ └──── <name>
@@ -554,7 +554,7 @@ TODO: End-to-end example of the data API.
## Test Suite Notes ## Test Suite Notes
The test suite is located on [blebleble] directory. The test suite is located on [yadda-yadda-yadda] directory.
You can run it by ... You can run it by ...
@@ -83,9 +83,9 @@ Feature: Consistent route order after a route deletion in Kapow! server.
] ]
""" """
Scenario: Removing a midst route. Scenario: Removing a route from the middle.
After removing a midst route the remaining ones will After removing a route from the middle, the remaining ones
maintain their relative order and the indexes of the will maintain their relative order and the indexes of the
following routes will be decreased by one. following routes will be decreased by one.
When I delete the second route When I delete the second route
@@ -99,10 +99,10 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
] ]
""" """
Scenario: Inserting a midst route. Scenario: Inserting a route in the middle.
After inserting a midst route the previous route set After inserting a route in the middle, the previous
will maintain their relative order and the indexes route set will maintain their relative order and the indexes
of thefollowing routes will be increased by one. of the following routes will be increased by one.
When I insert the route: When I insert the route:
""" """