spec: Get handler key and minor fixes.

Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-05-22 15:57:01 +02:00
parent c3ab9d54de
commit 23adf2ea50
+39 -11
View File
@@ -248,7 +248,7 @@ TODO
} }
``` ```
* **Success Response** * **Success Responses**
* **Code**: `200 OK`<br /> * **Code**: `200 OK`<br />
**Header**: `Content-Type: application/json`<br /> **Header**: `Content-Type: application/json`<br />
@@ -263,7 +263,7 @@ TODO
} }
``` ```
* **Error Response** * **Error Responses**
* **Code**: `400 Bad Request`<br /> * **Code**: `400 Bad Request`<br />
**Header**: `Content-Type: application/json`<br /> **Header**: `Content-Type: application/json`<br />
@@ -331,15 +331,15 @@ following keys:
│ ├──── method Used HTTP Method (GET, POST) │ ├──── method Used HTTP Method (GET, POST)
│ ├──── path Complete URL path (URL-unquoted) │ ├──── path Complete URL path (URL-unquoted)
│ ├──── matches Previously matched URL path parts │ ├──── matches Previously matched URL path parts
│ │ └──── <key> │ │ └──── <entry>
│ ├──── params URL parameters (post ? symbol) │ ├──── params URL parameters (post ? symbol)
│ │ └──── <key> │ │ └──── <entry>
│ ├──── headers HTTP request headers │ ├──── headers HTTP request headers
│ │ └──── <key> │ │ └──── <entry>
│ ├──── cookies HTTP request cookie │ ├──── cookies HTTP request cookie
│ │ └──── <key> │ │ └──── <entry>
│ ├──── form form-urlencoded form fields │ ├──── form form-urlencoded form fields
│ │ └──── <key> │ │ └──── <entry>
│ └──── body HTTP request body │ └──── body HTTP request body
└─ response All information related to the HTTP request. Write-Only └─ response All information related to the HTTP request. Write-Only
@@ -347,7 +347,7 @@ following keys:
├──── body Response body. Mutually exclusive with response/stream ├──── body Response body. Mutually exclusive with response/stream
├──── stream Chunk-encoded body. Streamed response. Mutually exclusive with response/body ├──── stream Chunk-encoded body. Streamed response. Mutually exclusive with response/body
└──── headers HTTP response headers └──── headers HTTP response headers
└──── <key> └──── <entry>
``` ```
#### Example Keys #### Example Keys
@@ -412,15 +412,43 @@ following keys:
#### Get handler key #### Get handler key
Returns the value of the requested key, or an error if the key doesn't exist or is invalid.
* **URL** * **URL**
`/handlers/{:handler_id}{:key}`
* **Method** * **Method**
`GET`
* **URL Params** * **URL Params**
* **Data Params**
* **Success Response** FIXME: We think that here should be options to cook the value in some way, or get it raw.
* **Error Response**
* **Success Responses**
* **Code**: `200 OK`<br />
**Header**: `Content-Type: application/octet-stream`<br />
**Content**: The value for that key. Note that it may be empty.
* **Error Responses**
* Key is invalid.
**Code**: `400 Bad Request`<br />
**Content**: None.<br />
**Notes**: Check the list of valid keys at the top of this section.
* Entry not found.
**Code**: `404 Not Found`<br />
**Content**: None.<br />
* **Sample Call** * **Sample Call**
TODO
* **Notes** * **Notes**
#### Overwrite the value for a handler key #### Overwrite the value for a handler key
* **URL** * **URL**
* **Method** * **Method**