-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inject example data as seed data into the stub cache for virtual-service
- Loading branch information
1 parent
ef7f36e
commit a1869a6
Showing
9 changed files
with
257 additions
and
12 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
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 |
---|---|---|
|
@@ -145,6 +145,8 @@ components: | |
inStock: | ||
type: boolean | ||
example: true | ||
required: | ||
- id | ||
|
||
ProductInput: | ||
type: object | ||
|
10 changes: 10 additions & 0 deletions
10
...tly_restful_apis/spec_with_strictly_restful_apis_examples/delete_product_with_id_100.json
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,10 @@ | ||
{ | ||
"http-request": { | ||
"path": "/products/100", | ||
"method": "DELETE" | ||
}, | ||
"http-response": { | ||
"status": 204, | ||
"status-text": "No Content" | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...with_strictly_restful_apis/spec_with_strictly_restful_apis_examples/get_all_products.json
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,29 @@ | ||
{ | ||
"http-request": { | ||
"path": "/products", | ||
"method": "GET" | ||
}, | ||
"http-response": { | ||
"status": 200, | ||
"body": [ | ||
{ | ||
"id": 100, | ||
"name": "iPhone", | ||
"description": "Description for an iPhone", | ||
"price": 636, | ||
"inStock": true | ||
}, | ||
{ | ||
"id": 200, | ||
"name": "iPhone Pro Max", | ||
"description": "Description for an iPhone Pro Max", | ||
"price": 866, | ||
"inStock": false | ||
} | ||
], | ||
"status-text": "OK", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...rictly_restful_apis/spec_with_strictly_restful_apis_examples/get_product_with_id_400.json
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,20 @@ | ||
{ | ||
"http-request": { | ||
"path": "/products/400", | ||
"method": "GET" | ||
}, | ||
"http-response": { | ||
"status": 200, | ||
"body": { | ||
"id": 400, | ||
"name": "Macbook Pro", | ||
"description": "Description for a Macbook Pro", | ||
"price": 1000, | ||
"inStock": true | ||
}, | ||
"status-text": "OK", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...ctly_restful_apis/spec_with_strictly_restful_apis_examples/patch_product_with_id_100.json
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,28 @@ | ||
{ | ||
"http-request": { | ||
"path": "/products/100", | ||
"method": "PATCH", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"body": { | ||
"description": "Patched description for iPhone", | ||
"price": 300, | ||
"inStock": false | ||
} | ||
}, | ||
"http-response": { | ||
"status": 200, | ||
"body": { | ||
"id": 100, | ||
"name": "iPhone", | ||
"description": "Patched description for iPhone", | ||
"price": 300, | ||
"inStock": false | ||
}, | ||
"status-text": "OK", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...pec_with_strictly_restful_apis/spec_with_strictly_restful_apis_examples/post_product.json
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,29 @@ | ||
{ | ||
"http-request": { | ||
"path": "/products", | ||
"method": "POST", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"body": { | ||
"name": "iPhone 16", | ||
"description": "New iPhone 16", | ||
"price": 942, | ||
"inStock": true | ||
} | ||
}, | ||
"http-response": { | ||
"status": 201, | ||
"body": { | ||
"id": 300, | ||
"name": "iPhone 16", | ||
"description": "New iPhone 16", | ||
"price": 942, | ||
"inStock": true | ||
}, | ||
"status-text": "Created", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |