Skip to content

Commit

Permalink
chore(io-sign): [SFEQS-1889] Add x-io-sign-environment header (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacavallaro authored Oct 26, 2023
1 parent f5b65dd commit 7164e98
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 91 deletions.
11 changes: 11 additions & 0 deletions api_io_sign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ paths:
responses:
"200":
description: The Signature Request detail
headers:
x-io-sign-environment:
schema:
$ref: "#/components/schemas/Environment"
description: The environment to which the signature request belongs.
content:
application/json:
schema:
Expand Down Expand Up @@ -721,3 +726,9 @@ components:
AssertionRefSha512:
type: string
pattern: ^(sha512-[A-Za-z0-9-_=]{1,88})$

Environment:
type: string
enum:
- test
- prod
5 changes: 4 additions & 1 deletion src/__mocks__/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default function mockRes(): any {
set: jest.fn(),
status: jest.fn(),
type: jest.fn(),
vary: jest.fn()
vary: jest.fn(),
header: jest.fn(),
};

response.append.mockImplementation(() => response);
Expand All @@ -51,6 +52,7 @@ export default function mockRes(): any {
response.status.mockImplementation(() => response);
response.type.mockImplementation(() => response);
response.vary.mockImplementation(() => response);
response.header.mockImplementation(() => response);

return response;
}
Expand Down Expand Up @@ -81,4 +83,5 @@ function resetMock(this: any): any {
this.status.mockClear();
this.type.mockClear();
this.vary.mockClear();
this.header.mockClear();
}
Loading

0 comments on commit 7164e98

Please sign in to comment.