Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ jobs:
- run: npm ci
- run: npm run test-lint
- run: npm run test-system
- run: npm run test-unit

- run: npm run test-unit | tee coverage.txt && exit ${PIPESTATUS[0]}
- name: Upload coverage-summary.json
if: matrix.node-version == '22.x'
uses: actions/upload-artifact@v4
with:
name: coverage-summary-unit
path: |
.coverage/coverage-summary.json
coverage.txt
Regression:
needs: Unit-Tests
runs-on: ubuntu-latest
Expand All @@ -35,4 +42,12 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test-regression
- run: npm run test-regression | tee coverage.txt && exit ${PIPESTATUS[0]}
- name: Upload coverage-summary.json
if: matrix.node-version == '22.x'
uses: actions/upload-artifact@v4
with:
name: coverage-summary-integration
path: |
.coverage/coverage-summary.json
coverage.txt
52 changes: 52 additions & 0 deletions .github/workflows/test-infra-scripts-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# owned by test infrastructure team
name: 'Quality Check Action'

on:
pull_request:
push:
branches:
- develop

env:
GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
GH_TOKEN: ${{ github.token }}
GH_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GH_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}

jobs:
track-unit-test-coverage:
runs-on: ubuntu-latest
steps:
- name: Track unit-test coverage
uses: postmanlabs/test-infra-scripts/.github/actions/coverage-pr-comment-action@main
with:
jobName: 'Unit-Tests'
coverageType: unit
squad: api-builder
artifactSource: coverage-summary-unit
sonarqube_check: false
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
QE_HEVO_WEBHOOK_URL: ${{ secrets.QE_HEVO_WEBHOOK_URL }}
QE_HEVO_ACCESS_KEY: ${{ secrets.QE_HEVO_ACCESS_KEY }}
QE_HEVO_SECRET_KEY: ${{ secrets.QE_HEVO_SECRET_KEY }}
POSTMAN_NPM_TOKEN: ${{ secrets.POSTMAN_NPM_TOKEN }}

track-integration-test-coverage:
runs-on: ubuntu-latest
steps:
- name: Track integration-test coverage
uses: postmanlabs/test-infra-scripts/.github/actions/coverage-pr-comment-action@main
with:
jobName: 'Regression'
coverageType: integration
squad: api-builder
artifactSource: coverage-summary-integration
sonarqube_check: false
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
QE_HEVO_WEBHOOK_URL: ${{ secrets.QE_HEVO_WEBHOOK_URL }}
QE_HEVO_ACCESS_KEY: ${{ secrets.QE_HEVO_ACCESS_KEY }}
QE_HEVO_SECRET_KEY: ${{ secrets.QE_HEVO_SECRET_KEY }}
POSTMAN_NPM_TOKEN: ${{ secrets.POSTMAN_NPM_TOKEN }}
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

## [Unreleased]

## [v5.0.1] - 2025-07-22

## [v5.0.0] - 2025-03-07

### Breaking Changes

- Drop support for node < v18.
- Drop support for node &lt; v18.

## [v4.25.0] - 2025-01-15

Expand Down Expand Up @@ -655,7 +657,9 @@ Newer releases follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0

- Base release

[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.0.0...HEAD
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.0.1...HEAD

[v5.0.1]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.0.0...v5.0.1

[v5.0.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.25.0...v5.0.0

Expand Down
27 changes: 15 additions & 12 deletions assets/json-schema-faker.js
Original file line number Diff line number Diff line change
Expand Up @@ -23620,9 +23620,9 @@ function extend() {

var ALL_TYPES = ['array', 'object', 'integer', 'number', 'string', 'boolean', 'null'];
var MOST_NEAR_DATETIME = 2524608000000;
var MIN_INTEGER = -100000000;
var MAX_INTEGER = 100000000;
var MIN_NUMBER = -100;
var MIN_INTEGER = 0;
var MAX_INTEGER = 10000;
var MIN_NUMBER = 0;
var MAX_NUMBER = 100;
var env = {
ALL_TYPES: ALL_TYPES,
Expand Down Expand Up @@ -24261,20 +24261,15 @@ function extend() {
return generated > 0 ? Math.floor(generated) : Math.ceil(generated);
};

var LIPSUM_WORDS = ('Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore'
+ ' et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea'
+ ' commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla'
+ ' pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est'
+ ' laborum').split(' ');
/**
* Generates randomized array of single lorem ipsum words.
* This will always return "string" as a value instead of Lorem text.
* It is used to generate a value for the "string" type.
*
* @param length
* @returns {Array.<string>}
*/
function wordsGenerator(length) {
var words = random.shuffle(LIPSUM_WORDS);
return words.slice(0, length);
return ['string'];
}

// fallback generator
Expand Down Expand Up @@ -24452,6 +24447,8 @@ function extend() {
minProps = Math.max(optionalsProbability === null || additionalProperties ? random.number(fillProps ? 1 : 0, max) : 0, min);
}

let propertyCount = 0;

while (fillProps) {
if (!(patternPropertyKeys.length || allowsAdditional)) {
break;
Expand Down Expand Up @@ -24490,7 +24487,13 @@ function extend() {
current += 1;
}
} else {
const word = get(requiredProperties) || (wordsGenerator(1) + hash());
/*
This will generate a key_0, key_1, etc. for any additional properties, instead of
using a random word. This is to ensure that the generated keys are predictable and
consistent across generations.
*/
const PREFIX_KEY = 'key_'
const word = get(requiredProperties) || (PREFIX_KEY + propertyCount++);

if (!props[word]) {
props[word] = additionalProperties || anyType;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openapi-to-postmanv2",
"version": "5.0.0",
"version": "5.0.1",
"description": "Convert a given OpenAPI specification to Postman Collection v2.0",
"homepage": "https://github.com/postmanlabs/openapi-to-postman",
"bugs": "https://github.com/postmanlabs/openapi-to-postman/issues",
Expand Down Expand Up @@ -150,10 +150,10 @@
},
"scripts": {
"test": "./scripts/test.sh",
"test-unit": "nyc --reporter=text -x **/assets/** -x **/test/** ./node_modules/mocha/bin/mocha --timeout 90000 \"test/unit/**/**.test.js\"",
"test-unit": "nyc --reporter=text --reporter=json-summary --report-dir=.coverage -x **/assets/** -x **/test/** ./node_modules/mocha/bin/mocha --timeout 90000 \"test/unit/**/**.test.js\"",
"test-lint": "./scripts/test-lint.sh",
"test-system": "./node_modules/mocha/bin/mocha -x **/assets/** -x **/test/** \"test/system/**.test.js\"",
"test-regression": "./node_modules/mocha/bin/mocha test/integration/integration.test.js test/unit/sanity.test.js",
"test-regression": "nyc --reporter=text --reporter=json-summary --report-dir=.coverage ./node_modules/mocha/bin/mocha test/integration/integration.test.js test/unit/sanity.test.js",
"release": "./scripts/release.sh",
"coverage": "nyc report --reporter=html --reporter=text mocha"
}
Expand Down
Loading