Gathering detailed insights and metrics for @deskree/postman-collection-generator
Gathering detailed insights and metrics for @deskree/postman-collection-generator
Gathering detailed insights and metrics for @deskree/postman-collection-generator
Gathering detailed insights and metrics for @deskree/postman-collection-generator
The following package generates postman collection from express controllers folder
npm install @deskree/postman-collection-generator
Typescript
Module System
Node Version
NPM Version
TypeScript (98.33%)
JavaScript (1.67%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
88 Commits
5 Watchers
2 Branches
11 Contributors
Updated on Aug 15, 2024
Latest Version
1.1.2
Package Id
@deskree/postman-collection-generator@1.1.2
Unpacked Size
31.66 kB
Size
7.12 kB
File Count
15
NPM Version
8.19.4
Node Version
16.20.1
Published on
Jul 27, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This package generates postman collection from express controllers.
Install package as a dev dependency via npm.
npm install --save @deskree/postman-collection-generator
Import package either into the base class of your controllers or to each controller individually:
import {PostmanControllerInterface} from "@deskree/postman-collection-generator";
postman-collection-generator creates postman collections from express controllers. In order for the collection and items to be generated correctly, each controller has to be a class that implements a PostmanControllerInterface
and have the appropriate data structure. See example below:
// exampleController.ts
import {PostmanControllerInterface} from "@deskree/postman-collection-generator";
export class ExampleController implements PostmanControllerInterface {
public name = 'Example Name of Postman Folder';
public description = 'Example Description of Postman Folder';
public routes = [
{
name: 'GET Something by id',
url: '/example/{{id}}',
method: 'GET',
description: 'Get something from somewhere by some id',
params: ['some_param=123'],
headers: [{ key: 'Content-Type', value: 'application/json' }]
},
{
name: 'Create Product',
url: '/product',
method: 'POST',
body: {
product: {
title: "Product Name",
price: 12,
tags: [
"Product"
]
}
}
}
]
...
Parameter | Type | Required | Description |
---|---|---|---|
name | string | yes | Name of Postman folder (itemsGroup) |
description | string | no | Description of Postman folder (itemsGroup) |
routes | array | yes | List of Postman requests (items) |
routes
Data StructureParameter | Type | Required | Description |
---|---|---|---|
name | string | yes | Name of Postman request |
description | string | no | Description of Postman request |
url | string | yes | Postman request URL |
method | string | yes | Postman request method (ex. GET, POST, PUT, DELETE) |
params | array of strings | no | List of postman request parameters |
headers | array of objects | no | List of postman request headers. Each header must have the following structure: { key: 'Some header key', value: 'some header value' } |
body | object | no | Body of postman request |
package.json
In order to run postman-collection-generator, just add the following line into your package.json
's "scripts"
with appropriate parameters. Example:
...
"scripts": {
"postman": "postman-generator --folder src/controllers --outputDir ./ --integrationName Example --baseURL https://user.deskree.com/api/v1"
}
...
Command parameters:
Parameter | Type | Required | Description |
---|---|---|---|
--folder | string | yes | Folder with your controllers |
--outputDir | string | yes | Folder where you want to save the postman collection |
--integrationName | string | yes | Name of your postman collection |
--baseURL | string | yes | Base url for all requests within your collection |
Once everything is set up and package.json
is configured, just run the following command to generate your Postman collection:
npm run postman
The command will generate collection.json
file in the specified folder. You can import this collection into Postman.
This project is licensed under the MIT License
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
SAST tool is not run on all commits -- score normalized to 1
Details
Reason
Found 2/22 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More