Skip to content

Commit

Permalink
fix: fix backtick in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
emyann committed Nov 15, 2018
1 parent de2beac commit afcc4f1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ const configuration: AxiosMorphismConfiguration = {

#### Axios-Morphism Configuration

| Property | Type | Description | Example |
| -------------------------------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| url | ```string``` | Base URL to listen on | `https://swapi.co/api` |
| interceptors | ```{ responses: [], requests: []};``` | List of Responses and Requests Interceptors Configuration to register against Axios |
| interceptors.responses[].matcher | ```string | RegExp | Function``` | Matcher used to detect on which response to apply the transformer | - `'people/:id'` <br> - `/people$/i` <br> - `(response: AxiosResponse) => response.config.method === 'POST'` |
| interceptors.requests[].matcher | ```string | RegExp | Function``` | Matcher used to detect on which request to apply the transformer | - `'planets/:id'` <br> - `/planets$/i` <br> - `(request: AxiosRequestConfig) => request.url.includes('planets')` |
| interceptors.requests[].schema interceptors.responses[].schema | ```Schema | StrictSchema``` | A schema is an object-preserving map from one data structure to another. | [Morphism Schema Examples](https://github.com/nobrainr/morphism#schema-example) |
| interceptors.requests[].dataSelector interceptors.responses[].dataSelector | ```string``` | A selector to access the data in the Axios returned data | With this Axios Response: ```{ data: { results: [] }}```. Pick the data with ```{ dataSelector: 'results' }``` |
| Property | Type | Description | Example |
| -------------------------------------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| url | `string` | Base URL to listen on | `https://swapi.co/api` |
| interceptors | `{ responses: [], requests: []};` | List of Responses and Requests Interceptors Configuration to register against Axios |
| interceptors.responses[].matcher | `string | RegExp | Function` | Matcher used to detect on which response to apply the transformer | - `'people/:id'` <br> - `/people$/i` <br> - `(response: AxiosResponse) => response.config.method === 'POST'` |
| interceptors.requests[].matcher | `string | RegExp | Function` | Matcher used to detect on which request to apply the transformer | - `'planets/:id'` <br> - `/planets$/i` <br> - `(request: AxiosRequestConfig) => request.url.includes('planets')` |
| interceptors.requests[].schema interceptors.responses[].schema | `Schema | StrictSchema` | A schema is an object-preserving map from one data structure to another. | [Morphism Schema Examples](https://github.com/nobrainr/morphism#schema-example) |
| interceptors.requests[].dataSelector interceptors.responses[].dataSelector | `string` | A selector to access the data in the Axios returned data | With this Axios Response: `{ data: { results: [] }}`. Pick the data with `{ dataSelector: 'results' }` |



Expand Down

0 comments on commit afcc4f1

Please sign in to comment.