Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
306865a
Merge pull request #865 from postmanlabs/release/v5.1.0
barshan23 Sep 1, 2025
5f6d275
Enhance type fetching to support composite schemas (anyOf, oneOf, al…
barshan23 Sep 8, 2025
77a09f2
Refactor type fetching logic to process original schema before modifi…
barshan23 Sep 9, 2025
95919aa
Update parameter resolution logic to handle 'PROCESSING' state in sch…
barshan23 Sep 9, 2025
be0a14a
Refactor schema processing to conditionally push resolved schema type…
barshan23 Sep 10, 2025
dbd1b68
Add support for composite schemas (anyOf, oneOf, allOf) in conversion…
barshan23 Sep 16, 2025
013509f
schema changes for 2-way-sync
AyushShri Sep 16, 2025
5fec948
fixed test
AyushShri Sep 16, 2025
43124e0
Enhance composite schema tests to validate specific structures for an…
barshan23 Sep 17, 2025
5d99774
Merge pull request #866 from postmanlabs/feature/add-composite-schema…
barshan23 Sep 17, 2025
97dbc8e
removed examples
AyushShri Sep 17, 2025
8e399c7
Refactor ESLint rules and remove unnecessary one-var disables; enhanc…
barshan23 Sep 18, 2025
cc01ca4
Merge branch 'develop' of github.com:postmanlabs/openapi-to-postman i…
AyushShri Sep 18, 2025
b69b0e6
added deprecated example
AyushShri Sep 18, 2025
86bb4f8
added test for description
AyushShri Sep 19, 2025
8beb3de
Resolved comments
AyushShri Sep 19, 2025
11f6dde
Bug Fixes
AyushShri Sep 19, 2025
2dd4b56
refactored
AyushShri Sep 19, 2025
16a2147
Merge pull request #867 from postmanlabs/feature/2-way-sync-schema-ch…
barshan23 Sep 19, 2025
91e6708
Prepare release v5.2.0 (#870)
github-actions[bot] Sep 19, 2025
2127d62
Feature/add title (#871)
AyushShri Sep 24, 2025
dd8750d
Prepare release v5.2.1 (#874)
github-actions[bot] Sep 24, 2025
550c9e0
Revert "Prepare release v5.2.1 (#874)" (#875)
AyushShri Sep 24, 2025
87ca0d3
Merge branch 'develop' of github.com:postmanlabs/openapi-to-postman i…
AyushShri Sep 24, 2025
b66b85f
Merge pull request #878 from postmanlabs/feature/back-merge-master
barshan23 Sep 24, 2025
bf1f888
Prepare release v5.3.0
web-flow Sep 24, 2025
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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased]

## [v5.3.0] - 2025-09-24

## [v5.2.0] - 2025-09-19

## [v5.1.0] - 2025-09-01
Expand Down Expand Up @@ -663,7 +665,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.2.0...HEAD
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.3.0...HEAD

[v5.3.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.2.0...v5.3.0

[v5.2.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.1.0...v5.2.0

Expand Down
43 changes: 37 additions & 6 deletions libV2/schemaUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,12 +510,19 @@ let QUERYPARAM = 'query',
a combination of multiple schemas
*/
if (resolveFor === TYPES_GENERATION) {
return {
const result = {
allOf: _.map(schema.allOf, (schema) => {
// eslint-disable-next-line no-use-before-define
return _resolveSchema(context, schema, stack, resolveFor, _.cloneDeep(seenRef), currentPath);
})
};
if (schema.title !== undefined) {
result.title = schema.title;
}
if (schema.description !== undefined) {
result.description = schema.description;
}
return result;
}

try {
Expand Down Expand Up @@ -594,10 +601,21 @@ let QUERYPARAM = 'query',
return _resolveSchema(context, compositeSchema[0], stack, resolveFor, _.cloneDeep(seenRef), currentPath);
}

return { [compositeKeyword]: _.map(compositeSchema, (schemaElement, index) => {
return _resolveSchema(context, schemaElement, stack, resolveFor, _.cloneDeep(seenRef),
utils.addToJsonPath(currentPath, [compositeKeyword, index]));
}) };
const result = {
[compositeKeyword]: _.map(compositeSchema, (schemaElement, index) => {
return _resolveSchema(context, schemaElement, stack, resolveFor, _.cloneDeep(seenRef),
utils.addToJsonPath(currentPath, [compositeKeyword, index]));
})
};

if (schema.title !== undefined) {
result.title = schema.title;
}
if (schema.description !== undefined) {
result.description = schema.description;
}

return result;
}

if (schema.allOf) {
Expand Down Expand Up @@ -768,6 +786,8 @@ let QUERYPARAM = 'query',
processSchema = (resolvedSchema) => {
if (resolvedSchema.anyOf) {
return {
title: resolvedSchema.title,
description: resolvedSchema.description,
anyOf: resolvedSchema.anyOf.map((schema) => {
return processSchema(schema);
})
Expand All @@ -776,6 +796,8 @@ let QUERYPARAM = 'query',

if (resolvedSchema.oneOf) {
return {
title: resolvedSchema.title,
description: resolvedSchema.description,
oneOf: resolvedSchema.oneOf.map((schema) => {
return processSchema(schema);
})
Expand All @@ -784,6 +806,8 @@ let QUERYPARAM = 'query',

if (resolvedSchema.allOf) {
return {
title: resolvedSchema.title,
description: resolvedSchema.description,
allOf: resolvedSchema.allOf.map((schema) => {
return processSchema(schema);
})
Expand Down Expand Up @@ -814,6 +838,7 @@ let QUERYPARAM = 'query',
maximum: propValue.maximum,
pattern: propValue.pattern,
example: propValue.example,
title: propValue.title,
description: propValue.description,
format: propValue.format
};
Expand Down Expand Up @@ -865,7 +890,9 @@ let QUERYPARAM = 'query',
return arrayDetails;
}
return {
type: resolvedSchema.type
type: resolvedSchema.type,
description: resolvedSchema.description,
title: resolvedSchema.title
};
},

Expand Down Expand Up @@ -2106,6 +2133,8 @@ let QUERYPARAM = 'query',
createProperties = (param) => {
const { schema } = param;
return {
description: schema.description,
title: schema.title,
type: schema.type,
format: schema.format,
default: schema.default,
Expand Down Expand Up @@ -2450,6 +2479,8 @@ let QUERYPARAM = 'query',

properties = {
type: schema.type,
description: schema.description,
title: schema.title,
format: schema.format,
default: schema.default,
required: schema.required,
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openapi-to-postmanv2",
"version": "5.2.0",
"version": "5.3.0",
"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
Loading
Loading