Skip to content

Commit

Permalink
Updated to use schema v0.1.0
Browse files Browse the repository at this point in the history
Signed-off-by: Natalia Luzuriaga <[email protected]>
  • Loading branch information
natalialuzuriaga committed Feb 10, 2025
1 parent 226482f commit 9c13aa6
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 68 deletions.
2 changes: 1 addition & 1 deletion js/formDataToJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function populateObject(data, schema) {
}

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

// Retrieves schema with fields in correct order
const schema = await retrieveFile(filePath);
Expand Down
2 changes: 1 addition & 1 deletion js/generateFormComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function createAllComponents(schema, prefix = ""){
async function createFormComponents() {
let components = [];

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

Expand Down
132 changes: 66 additions & 66 deletions schemas/schema-0.0.0.json → schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@
"format": "uri",
"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)."
},
"repositoryHost": {
"type": "string",
"description": "Location where source code is hosted",
"enum": [
"github.com/CMSgov",
"github.com/CMS-Enterprise",
"github.com/DSACMS",
"github.cms.gov",
"CCSQ GitHub"
]
},
"repositoryVisibility": {
"type": "string",
"enum": ["public", "private"],
"description": "Visibility of repository"
},
"vcs": {
"type": "string",
"description": "Version control system used",
Expand All @@ -131,6 +147,16 @@
"type": "number",
"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"
},
"reuseFrequency": {
"type": "object",
"description": "Measures frequency of code reuse in various forms. (e.g. forks, downloads, clones)",
"properties": {
"forks": {
"type": "integer"
}
},
"additionalProperties": true
},
"platforms": {
"type": "array",
"description": "Platforms supported by the project",
Expand Down Expand Up @@ -186,6 +212,10 @@
"none"
]
},
"contractNumber": {
"type": "integer",
"description": "Contract number"
},
"date": {
"type": "object",
"description": "A date object describing the release",
Expand Down Expand Up @@ -229,6 +259,13 @@
}
}
},
"feedbackMechanisms": {
"type": "array",
"description": "Methods a repository receives feedback from the community. Default value is the URL to GitHub repository issues page.",
"items": {
"type": "string"
}
},
"localisation": {
"type": "boolean",
"description": "Indicates if the project supports multiple languages"
Expand Down Expand Up @@ -264,6 +301,27 @@
"type": "string",
"description": "Home Department / Org / Group associated with the project"
},
"projects": {
"type": "array",
"description": "Maps the repository to associated projects",
"items": {
"type": "string"
}
},
"systems": {
"type": "array",
"description": "Maps the repository to CMS systems used",
"items": {
"type": "string"
}
},
"upstream": {
"type": "array",
"description": "List of upstream repositories and dependencies used",
"items": {
"type": "string"
}
},
"subsetInHealthcare": {
"type": "array",
"items": {
Expand All @@ -289,17 +347,6 @@
},
"description": "Types of users who interact with the software"
},
"repositoryHost": {
"type": "string",
"description": "Location where source code is hosted",
"enum": [
"github.com/CMSgov",
"github.com/CMS-Enterprise",
"github.com/DSACMS",
"github.cms.gov",
"CCSQ GitHub"
]
},
"maturityModelTier": {
"type": "integer",
"enum": [
Expand All @@ -308,54 +355,7 @@
3,
4
],
"description": "Maturity model tier according to the CMS OSPO's framework: https://github.com/DSACMS/repo-scaffolder/blob/main/maturity-model-tiers.md"
},
"contractNumber": {
"type": "integer",
"description": "Contract number"
},
"repositoryVisibility": {
"type": "string",
"enum": ["public", "private"],
"description": "Visibility of repository"
},
"reuseFrequency": {
"type": "object",
"description": "Measures frequency of code reuse in various forms. (e.g. forks, downloads, clones)",
"properties": {
"forks": {
"type": "integer"
}
},
"additionalProperties": true
},
"feedbackMechanisms": {
"type": "array",
"description": "Methods a repository receives feedback from the community. Default value is the URL to GitHub repository issues page.",
"items": {
"type": "string"
}
},
"project": {
"type": "array",
"description": "Maps repositories to projects",
"items": {
"type": "string"
}
},
"systems": {
"type": "array",
"description": "Maps repositories to CMS systems",
"items": {
"type": "string"
}
},
"upstream": {
"type": "array",
"description": "List of upstream repositories and dependencies used",
"items": {
"type": "string"
}
"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"
}
}
},
Expand All @@ -367,30 +367,30 @@
"permissions",
"organization",
"repositoryURL",
"repositoryHost",
"repositoryVisibility",
"vcs",
"laborHours",
"reuseFrequency",
"platforms",
"categories",
"softwareType",
"languages",
"maintenance",
"contractNumber",
"date",
"tags",
"contact",
"feedbackMechanisms",
"localisation",
"repositoryType",
"userInput",
"fismaLevel",
"group",
"projects",
"subsetInHealthcare",
"userType",
"repositoryHost",
"maturityModelTier",
"contractNumber",
"repositoryVisibility",
"reuseFrequency",
"feedbackMechanisms",
"project"
"maturityModelTier"
],
"additionalProperties": false
}

0 comments on commit 9c13aa6

Please sign in to comment.