Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Add support for basic media type encoding #13

Merged

Conversation

sixaphone
Copy link
Contributor

@sixaphone sixaphone commented Nov 13, 2019

  • Added support for request media types supported in open api definition
  • Defined method to encode and recurse encode if subencoding is defined
  • Implemented random key use with faker when retireving content type

closes #7

src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
* Added support for request media types supported in open api definition
* Defined  method to encode and recurse encode if subencoding is defined
* Implemented random key use with faker when retireving content type
* Serialize form data according to har standards
* First check path consumes and then global else default
* Refactor switch for encoding sample
* Small PR changes
* Removed console logs
@sixaphone sixaphone force-pushed the feat/add_support_for_basic_types branch from 3c8a877 to 33e3ef3 Compare November 15, 2019 09:56
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
src/converter.js Outdated Show resolved Hide resolved
* Removed faker from deps
* Swap faker calls with sampler
* Add unit test for every encoded sample functionallity
* Added missin EOL characters on multipart and fixed spacing
* Reworked encodeProperties method to create new sample object and not mutate
* Rework encode sample to use encoded if neede or default sample
derevnjuk
derevnjuk previously approved these changes Nov 15, 2019
src/converter.js Show resolved Hide resolved
__tests__/oas2har.js Outdated Show resolved Hide resolved
* Split tests into files according to content type
* Add more tests for multipart type
* Fix multipart encoding bug for objects
derevnjuk
derevnjuk previously approved these changes Nov 18, 2019
@derevnjuk
Copy link
Member

@sixaphone you still need to add support of multipart/mixed and bump openapi-sampler version.

* Added better multipart/form-data conversion

* Define header based on form field
* Added mutipart/mixin tests
* Update mocker lib
* Add safety cast to multipart case if encoding is not defined
@derevnjuk
Copy link
Member

@sixaphone You didn't update openapi-sampler version. The caret range doesn't allow to use 0.7.1

@derevnjuk derevnjuk merged commit 56b5a84 into NeuraLegion:master Nov 19, 2019
@github-actions
Copy link

🎉 This PR is included in version 0.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better support oas v3.0.2
2 participants