Skip to content

Commit

Permalink
Updated ordering example docs (#426)
Browse files Browse the repository at this point in the history
* Added --maxWorkers for Jest test to speed up testing via Github actions

* Updated example

* Updated documentation

* Updated changelog
  • Loading branch information
thim81 authored Nov 6, 2022
1 parent 7c009b3 commit 0c05629
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- AssignVariables - Added support for null values for response body (#414)
- ContentTests - Added support for null values for response body (#414)
- ContentTests - Added support to look up a key within an array of objects by using a * wildcard (#417)
- Documentation - Updated the ordering example (#418)
- Documentation - Updated the ordering example (#418,#423)

## v1.18.1 - (2022-09-30)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ The configuration defined in the `globals` will be executed on the full Postman
This is very useful to replace data from the OpenAPI specification, before it is used in the Portman test automation generation.
- **portmanReplacements** : The "search & replace" utility right before the final Postman file is written, that will search a string/object/... and replace it with another string/object/...
This is practical to replace any data from the generated Portman collection, before it is used in Postman / Newman test execution.
- **orderOfOperations** : The `orderOfOperations` is a list of OpenAPI operations, which is used by Portman to sort the Postman requests in the desired order, in their folder. Items that are **not** defined in the `orderOfOperations` list will remain at their current order.
- **orderOfOperations** : The `orderOfOperations` is a list of OpenAPI operations, which is used by Portman to sort the Postman requests in the desired order, in their folder. The ordering from `orderOfOperations` is performed per folder. Items that are **not** defined in the `orderOfOperations` list will remain at their current order.
- **stripResponseExamples (Boolean | optional)** : Strip the response examples from the generated Postman collection.
- **securityOverwrites** : Overwrite of the OpenAPI Security Scheme Object (supported types: "apiKey", "http basic auth", "http bearer token") or inject a Postman authorization option (supported types: awsv4, digest, edgegrid, ntlm, oauth1, oauth2) on a collection level.

Expand Down
8 changes: 7 additions & 1 deletion examples/postman-ordering/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ This is a very simple example where we just take the `crm.yml` OpenAPI and conve
The `orderOfOperations` is a list of OpenAPI operations, which is used by Portman to sort the Postman requests in the
desired order.

> **Note**
> The ordering from `orderOfOperations` is performed per folder.
The OpenAPI operation is the unique combination of the OpenAPI method & path, with a `::` separator symbol.
The example: `"GET::/crm/leads"` will target only the "GET" method and the specific path "/crm/leads".

> **Warning**
> Items that are **not** defined in the `orderOfOperations` list will remain at their current order, within their folder.
## Example explained

In our example we want to run the execution of the CRM leads operations in specific order in Postman.

So in our Portman configuration file , we have defined the `orderOfOperations` with the desired order for the "leads"
endpoints. REMARK: Items that are **not** defined in the `orderOfOperations` list will remain at their current order.
endpoints.

./examples/postman-ordering/portman-config.ordering.json >>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint": "eslint ./src --ext ts,js --cache --fix --quiet",
"lint:ci": "eslint ./src --ext ts,js --cache --quiet",
"test": "jest --colors --verbose --reporters=default --collectCoverage --no-cache",
"test:ci": "jest --ci --reporters=jest-progress-bar-reporter --collectCoverage",
"test:ci": "jest --ci --reporters=jest-progress-bar-reporter --collectCoverage --maxWorkers=2",
"test:watch": "jest --verbose --bail --watch",
"clean": "rm -rf ./dist/*",
"build": "tsc --project ./tsconfig.json",
Expand Down

0 comments on commit 0c05629

Please sign in to comment.