Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lewisprescott707/pact-conference-workshop
https://github.com/lewisprescott707/pact-conference-workshop
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lewisprescott707/pact-conference-workshop
- Owner: lewisPrescott707
- Created: 2020-02-13T15:38:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-15T11:35:41.000Z (almost 3 years ago)
- Last Synced: 2023-03-06T01:09:02.916Z (over 1 year ago)
- Language: JavaScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pact-conference-workshop
## Setup
1. git clone https://github.com/lewis-prescott-cruk/pact-conference-workshop.git
2. cmd: ```npm install```## Task
### Fill in the blanks
1. Using the API documentation provided create the contract file (`Note: json file is created on finalize command`)
2. Update `ingredients.spec.js`
| Refer to the docs: [Pact](https://github.com/pact-foundation/pact-js#consumer-side-testing)
3. Run on cmd ```npm test```### Upload to Broker
Request Bearer Token for request
1. Publish Pact file to broker: https://docs.pact.io/pact_broker/publishing_and_retrieving_pacts
2. Run on cmd ```npm run publish```## Documentation
### Response
Json:
```json
[
"butter",
"caster sugar",
"eggs",
"self-raising flour",
"baking powder",
"cocoa powder"
]
```
### Swagger
```yaml
swagger: "2.0"
info:
description: "This is a sample Cake server."
version: "1.0.0"
title: "Cake recipes"
host: "localhost"
basePath: "/"
schemes:
- "http"
paths:
/ingredients/{id}:
get:
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: id
in: path
description: Cake Name
required: true
type: string
responses:
"200":
description: "Cake Returned"
```