Skip to content

Commit

Permalink
Updating from 863b243
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 12, 2023
1 parent b419656 commit 6624ccf
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 0 deletions.
13 changes: 13 additions & 0 deletions kassette.configurationspec.harmimetypesparsejson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@amadeus-it-group/kassette](./kassette.md) &gt; [ConfigurationSpec](./kassette.configurationspec.md) &gt; [harMimeTypesParseJson](./kassette.configurationspec.harmimetypesparsejson.md)

## ConfigurationSpec.harMimeTypesParseJson property

Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'har', specifies a list of mime types that will attempt to parse the request/response body as JSON. If the list includes an empty string: '' and there is no mimeType set in the request, it will attempt to parse the body as JSON. This will only be applicable to request bodies if [saveInputRequestBody](./kassette.imock.saveinputrequestbody.md) is set to true Default value will be \[\] and will only be overridden by [setHarMimeTypesParseJson](./kassette.imock.setharmimetypesparsejson.md)

**Signature:**

```typescript
readonly harMimeTypesParseJson?: string[];
```
1 change: 1 addition & 0 deletions kassette.configurationspec.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface ConfigurationSpec extends CLIConfigurationSpec
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [console?](./kassette.configurationspec.console.md) | <code>readonly</code> | [ConsoleSpec](./kassette.consolespec.md) | _(Optional)_ Custom implementation of the [ConsoleSpec](./kassette.consolespec.md) interface, with methods [log](./kassette.consolespec.log.md) and [error](./kassette.consolespec.error.md)<!-- -->, each receiving one single argument of any type. Useful to capture the logs of the application. |
| [harMimeTypesParseJson?](./kassette.configurationspec.harmimetypesparsejson.md) | <code>readonly</code> | string\[\] | _(Optional)_ Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'har', specifies a list of mime types that will attempt to parse the request/response body as JSON. If the list includes an empty string: '' and there is no mimeType set in the request, it will attempt to parse the body as JSON. This will only be applicable to request bodies if [saveInputRequestBody](./kassette.imock.saveinputrequestbody.md) is set to true Default value will be \[\] and will only be overridden by [setHarMimeTypesParseJson](./kassette.imock.setharmimetypesparsejson.md) |
| [mocksHarKeyManager?](./kassette.configurationspec.mocksharkeymanager.md) | <code>readonly</code> | [HarKeyManager](./kassette.harkeymanager.md) | _(Optional)_ Function called to get or set the key of a mock in a har file, as explained in [HarKeyManager](./kassette.harkeymanager.md)<!-- -->. |
## Methods
Expand Down
13 changes: 13 additions & 0 deletions kassette.harformatcontent.json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@amadeus-it-group/kassette](./kassette.md) &gt; [HarFormatContent](./kassette.harformatcontent.md) &gt; [json](./kassette.harformatcontent.json.md)

## HarFormatContent.json property

Response body saved as an object.

**Signature:**

```typescript
json?: any;
```
1 change: 1 addition & 0 deletions kassette.harformatcontent.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface HarFormatContent
| [comment?](./kassette.harformatcontent.comment.md) | | string | _(Optional)_ Any comment as a string. This is not used by kassette. |
| [compression?](./kassette.harformatcontent.compression.md) | | number | _(Optional)_ Number of bytes saved by compression. This is not implemented by kassette. |
| [encoding?](./kassette.harformatcontent.encoding.md) | | string | _(Optional)_ Encoding used for the [text](./kassette.harformatcontent.text.md) field, such as "base64". |
| [json?](./kassette.harformatcontent.json.md) | | any | _(Optional)_ Response body saved as an object. |
| [mimeType?](./kassette.harformatcontent.mimetype.md) | | string | _(Optional)_ Value of the <code>Content-Type</code> response header. |
| [size?](./kassette.harformatcontent.size.md) | | number | _(Optional)_ Size of the content in bytes. |
| [text?](./kassette.harformatcontent.text.md) | | string | _(Optional)_ Response body. |
Expand Down
13 changes: 13 additions & 0 deletions kassette.harformatpostdata.json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@amadeus-it-group/kassette](./kassette.md) &gt; [HarFormatPostData](./kassette.harformatpostdata.md) &gt; [json](./kassette.harformatpostdata.json.md)

## HarFormatPostData.json property

Response body saved as an object.

**Signature:**

```typescript
json?: any;
```
1 change: 1 addition & 0 deletions kassette.harformatpostdata.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface HarFormatPostData
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [comment?](./kassette.harformatpostdata.comment.md) | | string | _(Optional)_ Any comment as a string. This is not used by kassette. |
| [json?](./kassette.harformatpostdata.json.md) | | any | _(Optional)_ Response body saved as an object. |
| [mimeType?](./kassette.harformatpostdata.mimetype.md) | | string | _(Optional)_ Value of the <code>Content-Type</code> request header, if present. |
| [params?](./kassette.harformatpostdata.params.md) | | any\[\] | _(Optional)_ List of posted parameters. This is not implemented in kassette. |
| [text?](./kassette.harformatpostdata.text.md) | | string | _(Optional)_ Posted data, as a (binary) string. |
Expand Down
13 changes: 13 additions & 0 deletions kassette.imock.harmimetypesparsejson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@amadeus-it-group/kassette](./kassette.md) &gt; [IMock](./kassette.imock.md) &gt; [harMimeTypesParseJson](./kassette.imock.harmimetypesparsejson.md)

## IMock.harMimeTypesParseJson property

Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'har', specifies a list of mime types that will attempt to parse the request/response body as JSON. This will only be applicable to request bodies if [saveInputRequestBody](./kassette.imock.saveinputrequestbody.md) is set to true Default value will be \[\] and will only be overridden by [setHarMimeTypesParseJson](./kassette.imock.setharmimetypesparsejson.md)

**Signature:**

```typescript
readonly harMimeTypesParseJson: string[];
```
2 changes: 2 additions & 0 deletions kassette.imock.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface IMock
| [defaultLocalPath](./kassette.imock.defaultlocalpath.md) | <code>readonly</code> | string | Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'folder', specifies the default local path of the mock, relative to [mocksFolder](./kassette.imock.mocksfolder.md)<!-- -->, . It uses the URL pathname to build an equivalent folders hierarchy, and appends the HTTP method as a leaf folder. |
| [defaultMockHarKey?](./kassette.imock.defaultmockharkey.md) | <code>readonly</code> | string | _(Optional)_ Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'har', specifies the default mock har key to use in case [setMockHarKey](./kassette.imock.setmockharkey.md) is not called with a non-null value. It is computed by calling the [mocks har key manager](./kassette.imock.mocksharkeymanager.md) with the current request. |
| [delay](./kassette.imock.delay.md) | <code>readonly</code> | number | The currently computed delay that will be applied, configured either by a call to [setDelay](./kassette.imock.setdelay.md)<!-- -->, or by [the global setting](./kassette.cliconfigurationspec.delay.md)<!-- -->. Note that if the delay is set to <code>recorded</code> and the local mock to use is not yet loaded, the value returned by this getter will be the default delay and not the recorded delay. |
| [harMimeTypesParseJson](./kassette.imock.harmimetypesparsejson.md) | <code>readonly</code> | string\[\] | Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'har', specifies a list of mime types that will attempt to parse the request/response body as JSON. This will only be applicable to request bodies if [saveInputRequestBody](./kassette.imock.saveinputrequestbody.md) is set to true Default value will be \[\] and will only be overridden by [setHarMimeTypesParseJson](./kassette.imock.setharmimetypesparsejson.md) |
| [localPath](./kassette.imock.localpath.md) | <code>readonly</code> | string | Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'folder', specifies the local path of the mock, relative to [mocksFolder](./kassette.imock.mocksfolder.md)<!-- -->. It is either the one set by the user through [setLocalPath](./kassette.imock.setlocalpath.md) or [defaultLocalPath](./kassette.imock.defaultlocalpath.md)<!-- -->. |
| [mockFolderFullPath](./kassette.imock.mockfolderfullpath.md) | <code>readonly</code> | string | Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'folder', specifies the full, absolute path of the mock, built from [localPath](./kassette.imock.localpath.md)<!-- -->/[defaultLocalPath](./kassette.imock.defaultlocalpath.md)<!-- -->, [mocksFolder](./kassette.imock.mocksfolder.md) and possibly [options.root](./kassette.mockingoptions.root.md) if [mocksFolder](./kassette.imock.mocksfolder.md) is not absolute. |
| [mockHarKey?](./kassette.imock.mockharkey.md) | <code>readonly</code> | string | _(Optional)_ Used only when the [mocks format](./kassette.imock.mocksformat.md) is 'har', specifies the key to use inside the har file to either read or write a mock. |
Expand Down Expand Up @@ -64,6 +65,7 @@ export interface IMock
| [readOrFetchPayload()](./kassette.imock.readorfetchpayload.md) | Returns the wrapped local payload using [readLocalPayload](./kassette.imock.readlocalpayload.md) if it exists, otherwise use [fetchPayload](./kassette.imock.fetchpayload.md) and returns this wrapped payload. |
| [sendResponse()](./kassette.imock.sendresponse.md) | Sends the response back to the client, with the previously specified delay if the payload origin is not <code>remote</code>. |
| [setDelay(delay)](./kassette.imock.setdelay.md) | Sets the [delay](./kassette.imock.delay.md) that will be used to send the response to the client when the data is taken from the local mock. |
| [setHarMimeTypesParseJson(value)](./kassette.imock.setharmimetypesparsejson.md) | Sets the [harMimeTypesParseJson](./kassette.imock.harmimetypesparsejson.md) value. |
| [setLocalPath(pathParts)](./kassette.imock.setlocalpath.md) | Sets the [localPath](./kassette.imock.localpath.md) value. |
| [setMockHarKey(value)](./kassette.imock.setmockharkey.md) | Sets the [mockHarKey](./kassette.imock.mockharkey.md) value. |
| [setMocksFolder(value)](./kassette.imock.setmocksfolder.md) | Sets the [mocksFolder](./kassette.imock.mocksfolder.md) value. |
Expand Down
24 changes: 24 additions & 0 deletions kassette.imock.setharmimetypesparsejson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@amadeus-it-group/kassette](./kassette.md) &gt; [IMock](./kassette.imock.md) &gt; [setHarMimeTypesParseJson](./kassette.imock.setharmimetypesparsejson.md)

## IMock.setHarMimeTypesParseJson() method

Sets the [harMimeTypesParseJson](./kassette.imock.harmimetypesparsejson.md) value.

**Signature:**

```typescript
setHarMimeTypesParseJson(value: string[]): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| value | string\[\] | The mime types that should attempt to parse the body as json |

**Returns:**

void

0 comments on commit 6624ccf

Please sign in to comment.