-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BHBC-914: Save drafts * Reduce duplication * Code review updates * Fix merge issue Co-authored-by: Shreyas Devalapurkar <[email protected]>
- Loading branch information
1 parent
0be01d5
commit 7e3f5b3
Showing
26 changed files
with
6,893 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Ajv from 'ajv'; | ||
import { expect } from 'chai'; | ||
import { describe } from 'mocha'; | ||
import { draftResponseObject } from './draft'; | ||
|
||
describe('draftResponseObject', () => { | ||
const ajv = new Ajv(); | ||
|
||
it('is valid openapi v3 schema', () => { | ||
expect(ajv.validateSchema(draftResponseObject)).to.be.true; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Response object for creating/updating a draft | ||
*/ | ||
export const draftResponseObject = { | ||
title: 'Draft Response Object', | ||
type: 'object', | ||
required: ['id', 'date'], | ||
properties: { | ||
id: { | ||
type: 'number' | ||
}, | ||
date: { | ||
type: 'string', | ||
description: 'The date this draft was last updated or created' | ||
} | ||
} | ||
}; |
Oops, something went wrong.