Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: json-validate
name: json-schema-tests
on:
pull_request:
types: [opened, synchronize]
Expand All @@ -11,7 +11,7 @@ permissions:
pull-requests: write # enable write permissions for pull request comments

jobs:
json-yaml-validate:
Comment thread
natalialuzuriaga marked this conversation as resolved.
json-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -22,3 +22,17 @@ jobs:
with:
comment: "true"
json_schema_version: "draft-04"

schema-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install the JSON Schema CLI
uses: sourcemeta/jsonschema@v11.1.1

- name: Run generic schema unit tests
run: jsonschema test tests/gov-schema.json --resolve schemas/schema-2.0.0.json

- name: Run CMS schema unit tests
run: jsonschema test tests/cms-schema.json --resolve schemas/cms/schema-0.2.0.json
42 changes: 30 additions & 12 deletions code.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
{
"name": "gov-codejson",
"description": "code.json: An agency-wide metadata standard for software projects",
"longDescription": "This repository contains documentation on code.json, a metadata standard used to collect information on the agency's software projects in compliance with M-16-21 and the SHARE IT Act.",
"longDescription": "This repository contains documentation on code.json, a metadata standard used to collect information on agency software projects in compliance with M-16-21 and the SHARE IT Act.",
"status": "Production",
"permissions": {
"license": [
"licenses": [
Comment thread
natalialuzuriaga marked this conversation as resolved.
{
"name": "CC0 1.0 Universal",
"name": "CC0-1.0",
Comment thread
natalialuzuriaga marked this conversation as resolved.
"URL": "https://github.com/DSACMS/gov-codejson/blob/main/LICENSE"
}
],
"usageType": "openSource",
"usageType": [
"openSource"
],
"exemptionText": ""
},
"organization": "Centers for Medicare & Medicaid Services",
"repositoryURL": "https://github.com/DSACMS/gov-codejson",
"repositoryHost": "github.com/DSACMS",
"repositoryVisibility": "public",
"vcs": "git",
"laborHours": 3479,
"reuseFrequency": {
"forks": 2
},
"platforms": [
"web"
],
Expand All @@ -26,15 +33,20 @@
],
"softwareType": "standalone/web",
"languages": [
"Markdown"
"javascript"
],
"maintenance": "internal",
"maintenance": "community",
"contractNumber": [],
"date": {
"created": "2025-02-04T21:59:53Z",
"lastModified": "2025-02-11T18:45:30Z",
"metaDataLastUpdated": "2025-02-11T18:47:02.924Z"
"lastModified": "2025-08-13T22:27:54Z",
"metaDataLastUpdated": "2025-08-15T16:41:02.063Z"
},
"tags": [
"dsacms-tier3",
"government",
"json",
"metadata-standard",
"guide",
"codejson",
"OSPO",
Expand All @@ -46,17 +58,23 @@
"email": "opensource@cms.hhs.gov",
"name": "CMS Open Source Team"
},
"feedbackMechanism": "https://github.com/DSACMS/gov-codejson/issues",
"AIUseCaseID": "0",
"localisation": false,
"repositoryType": "standards",
"userInput": false,
"fismaLevel": "Low",
"fismaLevel": "low",
"group": "CMS/OA/DSAC",
"projects": [
"SHARE IT Act"
],
"systems": [],
"upstream": "https://github.com/DSACMS/gov-codejson/network/dependencies",
"subsetInHealthcare": [
"Operational"
"operational"
],
"userType": [
"Government"
"government"
],
"repositoryHost": "github.com/DSACMS",
"maturityModelTier": 3
}
176 changes: 13 additions & 163 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,175 +1,25 @@
# Examples of code.json

Below are good examples of metadata in CMS code.json files. We hope it helps when creating your repository-level code.json file.
Below are examples of well-structured and comprehensive metadata in CMS code.json files. These examples demonstrate best practices for repository-level metadata documentation.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are these examples just for CMS code.json, or broadly for all Federal code.json?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Examples are currently just CMS code.jsons. Can def add more examples of other agencies


For additional reference, the [tests directory](../schemas/tests) contain unit tests of code.json files from various DSACMS repositories. These tests help ensure consistency and compliance as we make future updates to the schemas.

We encourage you to review these examples and tests when creating or updating your repository-level code.json file to maintain consistency with federal standards.

## Example 1: [DedupliFHIR](https://github.com/DSACMS/dedupliFHIR)

DedupliFHIR is a desktop app tool that uses AI deduplication to identify duplicates in patient records. It is a [tier 3](https://github.com/DSACMS/repo-scaffolder/blob/dev/maturity-model-tiers.md#tier-information) project launched in production that receives user input.

```
{
"name": "dedupliFHIR",
"description": "Prototype for basic deduplication and aggregation of eCQM data",
"longDescription": "A CLI bundled with an electron front-end that provides data-linkage and AI deduplication for reported ACO data at scale.",
"status": "Production",
"permissions": {
"license": [
{
"name": "CC0 1.0 Universal",
"URL": "https://github.com/DSACMS/dedupliFHIR/blob/main/LICENSE"
}
],
"usageType": "openSource",
"exemptionText": ""
},
"organization": "Centers for Medicare & Medicaid Services",
"repositoryURL": "https://github.com/DSACMS/dedupliFHIR",
"projectURL": "",
Comment thread
natalialuzuriaga marked this conversation as resolved.
"repositoryHost": "github.com/DSACMS",
"repositoryVisibility": "public",
"vcs": "git",
"laborHours": 4271,
"reuseFrequency": {
"forks": 3,
"clones": 0
},
"platforms": [
"windows",
"mac",
"linux"
],
"categories": [
"data-analytics",
"application-development",
"data-collection"
],
"softwareType": "standalone/desktop",
"languages": [
"Python",
"JavaScript",
"HTML",
"CSS",
"Shell",
"Makefile"
],
"maintenance": "internal",
"contractNumber": [],
"date": {
"created": "2023-06-22T17:08:19Z",
"lastModified": "2025-02-13T18:44:26Z",
"metaDataLastUpdated": "2025-06-10T14:55:32.836Z"
},
"tags": [
"AI",
"deduplication",
"data",
"ACA",
"FHIR",
"featured"
],
"contact": {
"email": "opensource@cms.hhs.gov",
"name": "CMS Open Source Team"
},
"feedbackMechanisms": "https://github.com/DSACMS/dedupliFHIR/issues",
"AIUseCaseID": "0",
"localisation": false,
"repositoryType": "application",
"userInput": "true",
"fismaLevel": "Moderate",
"group": "CMS/OA/DSAC",
"projects": [],
"systems": [],
"upstream": "https://github.com/DSACMS/dedupliFHIR/network/dependencies",
"subsetInHealthcare": [
"Operational"
],
"userType": [
"Providers"
],
"maturityModelTier": "3"
}
```
Link to code.json file: [codejson-example-dedupliFHIR.json](https://github.com/DSACMS/gov-codejson/blob/main/tests/examples/codejson-example-dedupliFHIR.json)

## Example 2: [CMS Metrics Website](https://github.com/DSACMS/metrics)

The CMS Metrics Website is a [tier 3](https://github.com/DSACMS/repo-scaffolder/blob/dev/maturity-model-tiers.md#tier-information) project where government employees can view repository metrics on CMS open source projects, currently maintained by the CMS OSPO.

```
{
"name": "metrics",
"description": "CMS Open Source Repository Metrics Website",
"longDescription": "The CMS Repository Metrics Website shows an overview of software development activity across open source projects within a specified organization. It is designed for developers and program managers interested in monitoring health and activity of CMS open source repositories.",
"status": "Production",
"permissions": {
"license": [
{
"name": "CC0 1.0 Universal",
"URL": "https://github.com/DSACMS/metrics/blob/main/LICENSE.md"
}
],
"usageType": "openSource",
"exemptionText": ""
},
"organization": "Centers for Medicare & Medicaid Services",
"repositoryURL": "https://github.com/DSACMS/metrics",
"projectURL": "https://dsacms.github.io/metrics/",
"repositoryHost": "github.com/DSACMS",
"repositoryVisibility": "public",
"vcs": "git",
"laborHours": 20722,
"reuseFrequency": {
"forks": 4,
"clones": 0
},
"platforms": [
"web"
],
"categories": [
"data-visualization",
"data-analytics"
],
"softwareType": "standalone/web",
"languages": [
"Liquid",
"JavaScript",
"CSS",
"Python",
"Shell"
],
"maintenance": "internal",
"contractNumber": [],
"date": {
"created": "2023-07-18T14:10:58Z",
"lastModified": "2025-06-01T11:36:12Z",
"metaDataLastUpdated": "2025-06-06T16:36:38.949Z"
},
"tags": [
"metrics",
"ospo",
"repository",
"featured"
],
"contact": {
"email": "opensource@cms.hhs.gov",
"name": "CMS/OA/DSAC/OSPO"
},
"feedbackMechanisms": "https://github.com/DSACMS/metrics/issues",
"AIUseCaseID": "0",
"localisation": false,
"repositoryType": "website",
"userInput": "No",
"fismaLevel": "Low",
"group": "CMS/OA/DSAC",
"projects": [],
"systems": [],
"upstream": "https://github.com/DSACMS/metrics/network/dependencies",
"subsetInHealthcare": [
"Operational"
],
"userType": [
"Government"
],
"maturityModelTier": 3
}
```
Link to code.json file: [codejson-example-metrics.json](https://github.com/DSACMS/gov-codejson/blob/main/tests/examples/codejson-example-metrics.json)

## Example 3: [gov-codejson](https://github.com/DSACMS/gov-codejson)

gov-codejson (this repository!) is a [tier 3](https://github.com/DSACMS/repo-scaffolder/blob/dev/maturity-model-tiers.md#tier-information) project containing documentation on the code.json metadata standard, currently maintained by the federal government community.

Link to code.json file: [code.json](https://github.com/DSACMS/gov-codejson/blob/main/code.json)
20 changes: 10 additions & 10 deletions schemas/cms/schema-0.2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@
"type": "string",
"description": "Level of security categorization assigned to an information system under the Federal Information Security Modernization Act (FISMA): https://security.cms.gov/learn/federal-information-security-modernization-act-fisma",
"enum": [
"Low",
"Moderate",
"High"
"low",
"moderate",
"high"
]
},
"group": {
Expand Down Expand Up @@ -349,10 +349,10 @@
"items": {
"type": "string",
"enum": [
"Policy",
"Operational",
"Medicare",
"Medicaid"
"policy",
"operational",
"medicare",
"medicaid"
]
},
"description": "Healthcare-related subset"
Expand All @@ -362,9 +362,9 @@
"items": {
"type": "string",
"enum": [
"Providers",
"Patients",
"Government"
"providers",
"patients",
"government"
]
},
"description": "Types of users who interact with the software"
Expand Down
9 changes: 8 additions & 1 deletion schemas/schema-2.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@
},
"additionalProperties": true
},
"languages": {
"type": "array",
"description": "Programming languages that make up the codebase",
"items": {
"type": "string"
}
},
"maintenance": {
"type": "string",
"description": "The dedicated staff that keeps the software up-to-date, if any",
Expand Down Expand Up @@ -241,5 +248,5 @@
"feedbackMechanism",
"AIUseCaseID"
],
"additionalProperties": false
"additionalProperties": true
}
21 changes: 21 additions & 0 deletions tests/cms-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"target": "../schemas/cms/schema-0.2.0.json",
"$comment": "This test suite validates code.json files for compliance with the CMS schema requirements.",
"tests": [
{
"description": "Example 1: DedupliFHIR",
"valid": true,
"dataPath": "./examples/codejson-example-dedupliFHIR.json"
},
{
"description": "Example 2: metrics",
"valid": true,
"dataPath": "./examples/codejson-example-metrics.json"
},
{
"description": "Example 3: gov-codejson",
"valid": true,
"dataPath": "../code.json"
}
]
}
Loading
Loading