whitlockjc / json-refs

Various utilities for JSON Pointers (http://tools.ietf.org/html/rfc6901) and JSON References (http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03).
MIT License
223 stars 63 forks source link

Fix signatures of encodePath and decodePath #159

Closed LexLuengas closed 5 years ago

LexLuengas commented 5 years ago

The implementations of decodePath and encodePath return an array of strings. The descriptions of the return types in the API documentation also refer to arrays of strings. The type declarations and the API documentation have been updated to reflect this.

whitlockjc commented 5 years ago

The API documentation and TypeScript definitions are generated from the source code. The appropriate way to make this change is to change the appropriate .js file (index.js) and then running node node_modules/gulp/bin/gulp.js. (This is documented in the Contributing Guide, please let me know if it could be better.)

Follow these instructions, update the PR and I'll review.

LexLuengas commented 5 years ago

@whitlockjc Sorry, I took a fast glance at the contribution guide, but overlooked that the documentation is generated.

I updated the source JSDoc and ran the gulp tasks. I had trouble running the "docs-raw" task where the API documentation is generated because my OS was coincidentally using a temp folder which started with an underscore, which jsdoc ignores by default. To fix this, I created a configuration file for jsdoc that could be fed into the gulp-jsdoc-to-markdown middleware.

whitlockjc commented 5 years ago

I went ahead and merged this because the failed TravisCI isn't related to your changes but related to the node and gulp combination being used. I'll address this in another commit.

Thanks for your help!