Skip to content

Commit

Permalink
vebt-1226 updated form 22-10216 schema
Browse files Browse the repository at this point in the history
  • Loading branch information
wafimohamed committed Feb 21, 2025
1 parent a227933 commit 91618c1
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 32 deletions.
44 changes: 28 additions & 16 deletions dist/22-10216-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
"type": "object",
"required": [
"certifyingOfficial",
"institutionName",
"facilityCode",
"termStartDate",
"statementOfTruthSignature"
"institutionDetails",
"statementOfTruthSignature",
"dateSigned"
],
"properties": {
"certifyingOfficial": {
Expand All @@ -39,18 +38,25 @@
}
}
},
"institutionName": {
"type": "string"
},
"facilityCode": {
"type": "string",
"pattern": "^[a-zA-Z0-9]{8}$"
},
"termStartDate": {
"$ref": "#/definitions/date"
},
"statementOfTruthSignature": {
"type": "string"
"institutionDetails": {
"type": "object",
"required": [
"institutionName",
"facilityCode",
"termStartDate"
],
"properties": {
"institutionName": {
"type": "string"
},
"facilityCode": {
"type": "string",
"pattern": "^[a-zA-Z0-9]{8}$"
},
"termStartDate": {
"$ref": "#/definitions/date"
}
}
}
}
},
Expand All @@ -75,6 +81,12 @@
"$ref": "#/definitions/date"
}
}
},
"statementOfTruthSignature": {
"type": "string"
},
"dateSigned": {
"$ref": "#/definitions/date"
}
}
}
35 changes: 22 additions & 13 deletions src/schemas/22-10216/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const schema = {
properties: {
institutionDetails: {
type: 'object',
required: ['certifyingOfficial', 'institutionName', 'facilityCode', 'termStartDate', 'statementOfTruthSignature'],
required: ['certifyingOfficial', 'institutionDetails', 'statementOfTruthSignature', 'dateSigned'],
properties: {
certifyingOfficial: {
type: 'object',
Expand All @@ -31,18 +31,21 @@ const schema = {
},
},
},
institutionName: {
type: 'string',
},
facilityCode: {
type: 'string',
pattern: '^[a-zA-Z0-9]{8}$',
},
termStartDate: {
$ref: '#/definitions/date',
},
statementOfTruthSignature: {
type: 'string',
institutionDetails: {
type: 'object',
required: ['institutionName', 'facilityCode', 'termStartDate'],
properties: {
institutionName: {
type: 'string',
},
facilityCode: {
type: 'string',
pattern: '^[a-zA-Z0-9]{8}$',
},
termStartDate: {
$ref: '#/definitions/date',
},
},
},
},
},
Expand All @@ -64,6 +67,12 @@ const schema = {
},
},
},
statementOfTruthSignature: {
type: 'string',
},
dateSigned: {
$ref: '#/definitions/date',
},
},
};
export default schema;
5 changes: 2 additions & 3 deletions test/schemas/22-10216/schema.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ describe('10216 schema', () => {
it('should have required fields', () => {
expect(schema.properties.institutionDetails.required).to.deep.equal([
'certifyingOfficial',
'institutionName',
'facilityCode',
'termStartDate',
'institutionDetails',
'statementOfTruthSignature',
'dateSigned',
]);
expect(schema.properties.studentRatioCalcChapter.required).to.deep.equal([
'beneficiaryStudent',
Expand Down

0 comments on commit 91618c1

Please sign in to comment.