Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated ordering example docs #426

Merged
merged 4 commits into from Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
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
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
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
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