-
Notifications
You must be signed in to change notification settings - Fork 227
[AB-290]-Extracting-type-information from OAS #834
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cb4599a
AB-290-WIP-extracting-type-information
AyushShri aa645c1
AB-289-flag-fixes
AyushShri b54b8fb
AB-289-added tests and fixes
AyushShri abaf386
AB-289-downgraded-uuid-dep
AyushShri d8d9367
AB-289-added-method-path
AyushShri 7217383
AB-289-added-code-reverted-uuid
AyushShri 5ec3f70
AB-289-removed-undefined-props
AyushShri fdc0ca2
AB-289-optimised-structure-and fixed-test-cases
AyushShri 9b30f47
AB-289-fixed required and depricated param
AyushShri d226967
AB-289-fixed-format and default param
AyushShri 8ae2fa5
AB-289-resolved-comments
AyushShri 6cffffb
AB-289-removed-context-schema-store-and-resolved-comments
AyushShri 1063175
AB-289-resolved-bug
AyushShri e7abec2
AB-289-resolved-all-bugs
AyushShri c4a9591
AB-289-resolved-all-comments
AyushShri a8de5ff
AB-289-refactored-code
AyushShri 6f30294
AB-289-refactored-code-and-added-test-case
AyushShri dc4a48a
AB-289-refactored-code
AyushShri 415f186
AB-289-resolved-comments
AyushShri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,8 @@ module.exports = { | |
|
||
let preOrderTraversal = GraphLib.alg.preorder(collectionTree, 'root:collection'); | ||
|
||
let collection = {}; | ||
let collection = {}, | ||
finalExtractedTypesObject = {}; | ||
barshan23 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
/** | ||
* individually start generating the folder, request, collection | ||
|
@@ -91,16 +92,19 @@ module.exports = { | |
// generate the request form the node | ||
let request = {}, | ||
collectionVariables = [], | ||
requestObject = {}; | ||
requestObject = {}, | ||
extractedTypesObject = {}; | ||
|
||
|
||
try { | ||
({ request, collectionVariables } = resolvePostmanRequest(context, | ||
({ request, collectionVariables, extractedTypesObject } = resolvePostmanRequest(context, | ||
context.openapi.paths[node.meta.path], | ||
node.meta.path, | ||
node.meta.method | ||
)); | ||
|
||
requestObject = generateRequestItemObject(request); | ||
finalExtractedTypesObject = Object.assign({}, finalExtractedTypesObject, extractedTypesObject); | ||
|
||
} | ||
catch (error) { | ||
console.error(error); | ||
|
@@ -217,7 +221,17 @@ module.exports = { | |
if (!_.isEmpty(collection.variable)) { | ||
collection.variable = _.uniqBy(collection.variable, 'key'); | ||
} | ||
|
||
if (context.enableTypeFetching) { | ||
return cb(null, { | ||
result: true, | ||
output: [{ | ||
type: 'collection', | ||
data: collection | ||
}], | ||
analytics: this.analytics || {}, | ||
extractedTypes: finalExtractedTypesObject || [] | ||
}); | ||
} | ||
return cb(null, { | ||
result: true, | ||
output: [{ | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.