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

Promisification of functions in schemaUtils.js (ES6 Async/Await) - Enables external references for schemas and examples. #355

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

pcgamer1
Copy link
Contributor

@pcgamer1 pcgamer1 commented Apr 6, 2021

Fixes #35

I've refactored the functions in schemaUtils.js to follow the ES6 Async/Await syntax. This enables fetching schemas / examples using external references. Promises are resolved sequentially due to the importance of the order of tags and similar requirements throughout the library.

Functions affected
SchemaPack.convert
validateTransaction
getMissingSchemaEndpoints
addCollectionItemsUsingPaths
addCollectionItemsUsingTags
convertChildToItemGroup
convertRequestToItem
convertToPmResponse
convertToPmResponseBody
convertToPmBody
convertToPmBodyData
getExampleData

Packages added
isomorphic-fetch
babel-eslint

Yet to add error handling and tests.

@meenakshi-dhanani @abhijitkane @VShingala @umeshp7
Please review and let me know if any changes are required.
Thanks.

@pcgamer1 pcgamer1 changed the title [WIP] External reference for examples - ES6 Async Await for functions in schemaUtils [WIP] External reference for examples - ES6 Async/Await for functions in schemaUtils Apr 7, 2021
@pcgamer1 pcgamer1 changed the title [WIP] External reference for examples - ES6 Async/Await for functions in schemaUtils [WIP] External reference for examples - Promisification of functions in schemaUtils (ES6 Async/Await) Apr 7, 2021
@pcgamer1 pcgamer1 changed the title [WIP] External reference for examples - Promisification of functions in schemaUtils (ES6 Async/Await) Promisification of functions in schemaUtils (ES6 Async/Await) - Enables external references for examples. Apr 7, 2021
@pcgamer1 pcgamer1 changed the title Promisification of functions in schemaUtils (ES6 Async/Await) - Enables external references for examples. Promisification of functions in schemaUtils (ES6 Async/Await) - Enables external references for schemas and examples. Apr 7, 2021
@Sharath-Postman
Copy link

@meenakshi-dhanani could you look into this. Cheers

@pcgamer1 pcgamer1 changed the title Promisification of functions in schemaUtils (ES6 Async/Await) - Enables external references for schemas and examples. Promisification of functions in schemaUtils.js (ES6 Async/Await) - Enables external references for schemas and examples. Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

external examples do not work
2 participants