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

Issue-30: added json-schema implementation to validate response configs #45

Merged
merged 5 commits into from
Nov 6, 2020

Conversation

dtobe
Copy link
Owner

@dtobe dtobe commented Oct 2, 2020

closes #30

@dtobe dtobe added the enhancement New feature or request label Oct 2, 2020
@dtobe dtobe requested a review from spik3r October 2, 2020 13:26
@dtobe dtobe self-assigned this Oct 2, 2020
- Bumped supertest to version 6
- Bumped yargs to version 16
- Upgraded patch/minor versions
if (!SUPPORTED_METHODS.includes(method)) {
throw new Error(`Method ${method} is not supported.`);
}
var ajv = new Ajv({ schemas: [schema, responseSchema] });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yes, left-over from the example snippet. I'll get that in a future change.

@@ -207,4 +207,47 @@ describe('AietesServer IT', () => {

expect(res.status).toBe(404);
});

describe('Configuration errors', () => {
// TBD would be nice to test but terminates jest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment :)

@dtobe dtobe merged commit dc870cd into master Nov 6, 2020
@dtobe dtobe deleted the feature/issue-30-validate-response-config branch November 6, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON Validation / Validation of Request Configuration
3 participants