-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from pmcelhaney/135-responserandom
response[statusCode].random()
- Loading branch information
Showing
9 changed files
with
326 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"counterfact": minor | ||
--- | ||
|
||
Counterfact is now able to read an OpenAPI document and use it to generate a random response. |
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,57 @@ | ||
openapi: 3.0.3 | ||
info: | ||
version: 1.0.0 | ||
title: Sample API | ||
description: A sample API to illustrate OpenAPI concepts | ||
paths: | ||
/count: | ||
get: | ||
description: outputs the number of time each URL was visited | ||
responses: | ||
default: | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
type: | ||
string | ||
examples: | ||
no visits: | ||
value: You have not visited anyone yet | ||
/hello/kitty: | ||
get: | ||
description: HTML with a hello kitty image | ||
responses: | ||
default: | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
type: | ||
string | ||
examples: | ||
hello kitty: | ||
value: >- | ||
<img | ||
src="https://upload.wikimedia.org/wikipedia/en/0/05/Hello_kitty_character_portrait.png"> | ||
/hello/{name}: | ||
get: | ||
parameters: | ||
- in: path | ||
name: name | ||
required: true | ||
schema: | ||
type: string | ||
description: says hello to the name | ||
description: says hello to someone | ||
responses: | ||
default: | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
type: | ||
string | ||
examples: | ||
hello-world: | ||
value: Hello, world |
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
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
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
Oops, something went wrong.