Skip to content

Commit 9c13aa6

Browse files
Updated to use schema v0.1.0
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
1 parent 226482f commit 9c13aa6

3 files changed

Lines changed: 68 additions & 68 deletions

File tree

js/formDataToJson.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function populateObject(data, schema) {
5757
}
5858

5959
async function populateCodeJson(data) {
60-
const filePath = "schemas/schema-0.0.0.json";
60+
const filePath = "schemas/schema.json";
6161

6262
// Retrieves schema with fields in correct order
6363
const schema = await retrieveFile(filePath);

js/generateFormComponents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ function createAllComponents(schema, prefix = ""){
288288
async function createFormComponents() {
289289
let components = [];
290290

291-
const filePath = "schemas/schema-0.0.0.json";
291+
const filePath = "schemas/schema.json";
292292
const jsonData = await retrieveFile(filePath);
293293
console.log("JSON Data:", jsonData);
294294

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@
116116
"format": "uri",
117117
"description": "The URL of the public release repository for open source repositories. This field is not required for repositories that are only available as government-wide reuse or are closed (pursuant to one of the exemptions)."
118118
},
119+
"repositoryHost": {
120+
"type": "string",
121+
"description": "Location where source code is hosted",
122+
"enum": [
123+
"github.com/CMSgov",
124+
"github.com/CMS-Enterprise",
125+
"github.com/DSACMS",
126+
"github.cms.gov",
127+
"CCSQ GitHub"
128+
]
129+
},
130+
"repositoryVisibility": {
131+
"type": "string",
132+
"enum": ["public", "private"],
133+
"description": "Visibility of repository"
134+
},
119135
"vcs": {
120136
"type": "string",
121137
"description": "Version control system used",
@@ -131,6 +147,16 @@
131147
"type": "number",
132148
"description": "Labor hours invested in the project. Calculated using COCOMO measured by the SCC tool: https://github.com/boyter/scc?tab=readme-ov-file#cocomo"
133149
},
150+
"reuseFrequency": {
151+
"type": "object",
152+
"description": "Measures frequency of code reuse in various forms. (e.g. forks, downloads, clones)",
153+
"properties": {
154+
"forks": {
155+
"type": "integer"
156+
}
157+
},
158+
"additionalProperties": true
159+
},
134160
"platforms": {
135161
"type": "array",
136162
"description": "Platforms supported by the project",
@@ -186,6 +212,10 @@
186212
"none"
187213
]
188214
},
215+
"contractNumber": {
216+
"type": "integer",
217+
"description": "Contract number"
218+
},
189219
"date": {
190220
"type": "object",
191221
"description": "A date object describing the release",
@@ -229,6 +259,13 @@
229259
}
230260
}
231261
},
262+
"feedbackMechanisms": {
263+
"type": "array",
264+
"description": "Methods a repository receives feedback from the community. Default value is the URL to GitHub repository issues page.",
265+
"items": {
266+
"type": "string"
267+
}
268+
},
232269
"localisation": {
233270
"type": "boolean",
234271
"description": "Indicates if the project supports multiple languages"
@@ -264,6 +301,27 @@
264301
"type": "string",
265302
"description": "Home Department / Org / Group associated with the project"
266303
},
304+
"projects": {
305+
"type": "array",
306+
"description": "Maps the repository to associated projects",
307+
"items": {
308+
"type": "string"
309+
}
310+
},
311+
"systems": {
312+
"type": "array",
313+
"description": "Maps the repository to CMS systems used",
314+
"items": {
315+
"type": "string"
316+
}
317+
},
318+
"upstream": {
319+
"type": "array",
320+
"description": "List of upstream repositories and dependencies used",
321+
"items": {
322+
"type": "string"
323+
}
324+
},
267325
"subsetInHealthcare": {
268326
"type": "array",
269327
"items": {
@@ -289,17 +347,6 @@
289347
},
290348
"description": "Types of users who interact with the software"
291349
},
292-
"repositoryHost": {
293-
"type": "string",
294-
"description": "Location where source code is hosted",
295-
"enum": [
296-
"github.com/CMSgov",
297-
"github.com/CMS-Enterprise",
298-
"github.com/DSACMS",
299-
"github.cms.gov",
300-
"CCSQ GitHub"
301-
]
302-
},
303350
"maturityModelTier": {
304351
"type": "integer",
305352
"enum": [
@@ -308,54 +355,7 @@
308355
3,
309356
4
310357
],
311-
"description": "Maturity model tier according to the CMS OSPO's framework: https://github.com/DSACMS/repo-scaffolder/blob/main/maturity-model-tiers.md"
312-
},
313-
"contractNumber": {
314-
"type": "integer",
315-
"description": "Contract number"
316-
},
317-
"repositoryVisibility": {
318-
"type": "string",
319-
"enum": ["public", "private"],
320-
"description": "Visibility of repository"
321-
},
322-
"reuseFrequency": {
323-
"type": "object",
324-
"description": "Measures frequency of code reuse in various forms. (e.g. forks, downloads, clones)",
325-
"properties": {
326-
"forks": {
327-
"type": "integer"
328-
}
329-
},
330-
"additionalProperties": true
331-
},
332-
"feedbackMechanisms": {
333-
"type": "array",
334-
"description": "Methods a repository receives feedback from the community. Default value is the URL to GitHub repository issues page.",
335-
"items": {
336-
"type": "string"
337-
}
338-
},
339-
"project": {
340-
"type": "array",
341-
"description": "Maps repositories to projects",
342-
"items": {
343-
"type": "string"
344-
}
345-
},
346-
"systems": {
347-
"type": "array",
348-
"description": "Maps repositories to CMS systems",
349-
"items": {
350-
"type": "string"
351-
}
352-
},
353-
"upstream": {
354-
"type": "array",
355-
"description": "List of upstream repositories and dependencies used",
356-
"items": {
357-
"type": "string"
358-
}
358+
"description": "Maturity model tier according to the CMS Open Source Repository Maturity Model Framework: https://github.com/DSACMS/repo-scaffolder/blob/main/maturity-model-tiers.md"
359359
}
360360
}
361361
},
@@ -367,30 +367,30 @@
367367
"permissions",
368368
"organization",
369369
"repositoryURL",
370+
"repositoryHost",
371+
"repositoryVisibility",
370372
"vcs",
371373
"laborHours",
374+
"reuseFrequency",
372375
"platforms",
373376
"categories",
374377
"softwareType",
375378
"languages",
376379
"maintenance",
380+
"contractNumber",
377381
"date",
378382
"tags",
379383
"contact",
384+
"feedbackMechanisms",
380385
"localisation",
381386
"repositoryType",
382387
"userInput",
383388
"fismaLevel",
384389
"group",
390+
"projects",
385391
"subsetInHealthcare",
386392
"userType",
387-
"repositoryHost",
388-
"maturityModelTier",
389-
"contractNumber",
390-
"repositoryVisibility",
391-
"reuseFrequency",
392-
"feedbackMechanisms",
393-
"project"
393+
"maturityModelTier"
394394
],
395395
"additionalProperties": false
396396
}

0 commit comments

Comments
 (0)