Skip to content

Commit

Permalink
add test files and cleanup whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanashapiro committed Jul 11, 2023
1 parent c0410d0 commit b954b44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Binary file added packages/http-server/src/__tests__/test_img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/http-server/src/__tests__/test_json.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"surname" : "Doe",
"name" : "John",
"city" : "Manchester",
"address" : "5 Main Street",
"hobbies" : ["painting","lawnbowls"]
}
3 changes: 1 addition & 2 deletions packages/http/src/validator/validators/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ function deserializeAndValidate(content: IMediaTypeContent, schema: JSONSchema,
return pipe(
validateAgainstReservedCharacters(encodedUriParams, encodings, prefix),
E.map(decodeUriEntities),
E.map(decodedUriEntities => {
return deserializeFormBody(schema, encodings, decodedUriEntities)}),
E.map(decodedUriEntities => deserializeFormBody(schema, encodings, decodedUriEntities)),
E.chain(deserialised => {
return pipe(
validateAgainstSchema(deserialised, schema, true, prefix, bundle),
Expand Down

0 comments on commit b954b44

Please sign in to comment.