-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add EasyVCR .NET schema, catalog entry, test (#4216)
* - Add EasyVCR .NET schema, catalog entry, test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * - Fix additionalProperties --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
cbc9201
commit 62ded88
Showing
3 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://json.schemastore.org/easyvcr-net", | ||
"$comment": "https://github.com/EasyPost/easyvcr-csharp", | ||
"title": "EasyVCR .NET cassette", | ||
"description": "A schema for an EasyVCR .NET recording\nhttps://github.com/EasyPost/easyvcr-csharp", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": true, | ||
"properties": { | ||
"Duration": { | ||
"title": "Duration", | ||
"description": "How long, in milliseconds, the recorded request took to complete", | ||
"type": "integer" | ||
}, | ||
"RecordedAt": { | ||
"title": "Recorded at", | ||
"description": "When the request was recorded", | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"Request": { | ||
"title": "Request", | ||
"description": "The request that was recorded", | ||
"type": "object", | ||
"properties": { | ||
"Body": { | ||
"title": "Body", | ||
"description": "The request body", | ||
"type": "string" | ||
}, | ||
"BodyContentType": { | ||
"title": "Body content type", | ||
"description": "The type of content in the request body", | ||
"type": "string" | ||
}, | ||
"ContentHeaders": { | ||
"title": "Content headers", | ||
"description": "The request content headers", | ||
"type": "object" | ||
}, | ||
"Method": { | ||
"title": "Method", | ||
"description": "The HTTP method", | ||
"type": "string" | ||
}, | ||
"RequestHeaders": { | ||
"title": "Request headers", | ||
"description": "The request headers", | ||
"type": "object" | ||
}, | ||
"Uri": { | ||
"title": "Uri", | ||
"description": "The request URI", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"Response": { | ||
"title": "Response", | ||
"description": "The response that was recorded", | ||
"type": "object", | ||
"properties": { | ||
"Body": { | ||
"title": "Body", | ||
"description": "The response body", | ||
"type": "string" | ||
}, | ||
"BodyContentType": { | ||
"title": "Body content type", | ||
"description": "The type of content in the response body", | ||
"type": "string" | ||
}, | ||
"ContentHeaders": { | ||
"title": "Content headers", | ||
"description": "The response content headers", | ||
"type": "object" | ||
}, | ||
"HttpVersion": { | ||
"title": "HTTP version", | ||
"description": "The HTTP version", | ||
"type": "string" | ||
}, | ||
"ResponseHeaders": { | ||
"title": "Response headers", | ||
"description": "The response headers", | ||
"type": "object" | ||
}, | ||
"Status": { | ||
"title": "Status", | ||
"description": "The HTTP status", | ||
"type": "object", | ||
"properties": { | ||
"Code": { | ||
"title": "Code", | ||
"description": "The HTTP status code", | ||
"type": "integer" | ||
}, | ||
"Message": { | ||
"title": "Description", | ||
"description": "The HTTP status code description", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[ | ||
{ | ||
"Duration": 89, | ||
"RecordedAt": "2024-02-09T16:37:40.475353-07:00", | ||
"Request": { | ||
"Body": "", | ||
"BodyContentType": "Text", | ||
"ContentHeaders": {}, | ||
"Method": "GET", | ||
"RequestHeaders": { | ||
"X-Custom-Header1": "custom-value1", | ||
"X-Custom-Header2": "custom-value2" | ||
}, | ||
"Uri": "https://api.ipify.org/?format=json" | ||
}, | ||
"Response": { | ||
"Body": "{\"ip\":\"not.a.real.ip\"}", | ||
"BodyContentType": "Json", | ||
"ContentHeaders": { | ||
"Content-Length": "23", | ||
"Content-Type": "application/json" | ||
}, | ||
"HttpVersion": "1.1", | ||
"ResponseHeaders": { | ||
"CF-Cache-Status": "DYNAMIC", | ||
"CF-RAY": "852ff10c6b425203-DEN", | ||
"Connection": "keep-alive", | ||
"Date": "Fri, 09 Feb 2024 23:37:40 GMT", | ||
"Server": "cloudflare", | ||
"Vary": "Origin" | ||
}, | ||
"Status": { | ||
"Code": 200, | ||
"Message": "OK" | ||
} | ||
} | ||
} | ||
] |