From e7b1a82b9fb6c0de81408f41e1fefa4eaa7f3296 Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Wed, 10 Sep 2025 12:40:31 -0400 Subject: [PATCH 1/3] Add agency-index schema Signed-off-by: Natalia Luzuriaga --- schemas/agency-index/schema-2.0.0.json | 55 ++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 schemas/agency-index/schema-2.0.0.json diff --git a/schemas/agency-index/schema-2.0.0.json b/schemas/agency-index/schema-2.0.0.json new file mode 100644 index 0000000..f978120 --- /dev/null +++ b/schemas/agency-index/schema-2.0.0.json @@ -0,0 +1,55 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Code.gov Inventory", + "description": "A federal source code catalog", + "type": "object", + "required": [ + "version", + "measurementType", + "agency", + "releases" + ], + "properties": { + "agency": { + "description": "The agency acronym for Clinger Cohen Act agency, as defined by the United States Government Manual.", + "type": "string" + }, + "measurementType": { + "type": "object", + "properties": { + "ifOther": { + "description": "A one- or two- sentence description of the measurement type used, if 'other' is selected as the value of 'method' field.", + "type": "string" + }, + "method": { + "description": "An enumerated list of methods for measuring the open source requirement.", + "type": "string", + "enum": [ + "linesOfCode", + "modules", + "cost", + "projects", + "systems", + "other" + ] + } + }, + "additionalProperties": false + }, + "releases": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "../schema-2.0.0.json" + } + ] + }, + "additionalProperties": false + }, + "version": { + "description": "The version of the metadata schema in use. Implements semantic versioning 2.0.0 rules as defined at http://semver.org", + "type": "string" + } + } +} \ No newline at end of file From 7748a59316f5f207b4f2ad0f42821e236307ab79 Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Thu, 11 Sep 2025 08:39:43 -0700 Subject: [PATCH 2/3] Update schema docs Signed-off-by: Natalia Luzuriaga --- docs/agency-index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/agency-index.md b/docs/agency-index.md index 293696d..db8d8ae 100644 --- a/docs/agency-index.md +++ b/docs/agency-index.md @@ -2,6 +2,8 @@ The SHARE IT Act requires federal agencies to publish metadata for their software projects. This metadata is compiled into an **agency-index.json** file, which serves as a centralized inventory of the agency's software portfolio. +View the agency-index.json schema here: https://github.com/DSACMS/gov-codejson/tree/main/schemas/agency-index/schema-2.0.0.json + To create an agency-index.json: 1. Identify GitHub organizations and other platforms where source code is hosted 2. Generate the agency-index.json using the tools below. Learn more about usage in [procedures.md](https://github.com/DSACMS/gov-codejson/blob/main/docs/procedures.md#generate-an-agency-indexjson-file-for-agencies) @@ -11,4 +13,4 @@ To create an agency-index.json: - Agency's top level domain (TLD) - A GitHub repository -Agency index files are found here: https://github.com/DSACMS/code-gov/tree/main/agency-indexes \ No newline at end of file +More examples of agency index files can be found here: https://github.com/DSACMS/code-gov/tree/main/agency-indexes \ No newline at end of file From 8efbe2cfba13c2ed4abee6d2248880cdada3838f Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Thu, 11 Sep 2025 09:09:46 -0700 Subject: [PATCH 3/3] Update agency-index.json metaschema and description Signed-off-by: Natalia Luzuriaga --- schemas/agency-index/schema-2.0.0.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/agency-index/schema-2.0.0.json b/schemas/agency-index/schema-2.0.0.json index f978120..496f8d2 100644 --- a/schemas/agency-index/schema-2.0.0.json +++ b/schemas/agency-index/schema-2.0.0.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Code.gov Inventory", "description": "A federal source code catalog", "type": "object",