Skip to content

Commit f0066d8

Browse files
Merge pull request #1 from DSACMS/nat/schema
Schema: Added code.json V0 schema
2 parents 9cc6a96 + 102d0f8 commit f0066d8

File tree

1 file changed

+249
-0
lines changed

1 file changed

+249
-0
lines changed

schemas/schema-0.0.0.json

+249
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "CMS Code.json Metadata",
4+
"description": "A metadata standard for software repositories of CMS",
5+
"type": "object",
6+
"properties": {
7+
"items": {
8+
"name": {
9+
"type": "string",
10+
"description": "Name of the project or software"
11+
},
12+
"softwareDescription": {
13+
"type": "object",
14+
"properties": {
15+
"en": {
16+
"type": "object",
17+
"description": "Language of description (English)",
18+
"properties": {
19+
"shortDescription": {
20+
"type": "string",
21+
"description": "A short description of the project. It should be a single line containing a single sentence. Maximum 150 characters are allowed.",
22+
"maxLength": 150
23+
},
24+
"longDescription": {
25+
"type": "string",
26+
"description": "Provide longer description of the software, between 150 and 10000 chars. It is meant to provide an overview of the capabilities of the software for a potential user.",
27+
"minLength": 100
28+
}
29+
}
30+
},
31+
"required": ["shortDescription", "longDescription"]
32+
},
33+
"required": ["en"]
34+
},
35+
"status": {
36+
"type": "string",
37+
"enum": ["Ideation", "Development", "Alpha", "Beta", "Release Candidate", "Production", "Archival"],
38+
"description": "Development status of the project"
39+
},
40+
"permissions": {
41+
"type": "object",
42+
"description": "An object containing description of the usage/restrictions regarding the release",
43+
"properties": {
44+
"license": {
45+
"type": "array",
46+
"items": {
47+
"type": "object",
48+
"properties": {
49+
"url": {
50+
"type": "string",
51+
"format": "uri",
52+
"description": "The URL of the release license"
53+
},
54+
"name": {
55+
"type": "string",
56+
"enum": ["CC0-1.0", "Apache-2.0", "MIT", "MPL-2.0", "GPL-2.0-only", "GPL-3.0-only", "GPL-3.0-or-later", "LGPL-2.1-only", "LGPL-3.0-only", "BSD-2-Clause", "BSD-3-Clause", "EPL-2.0", "Other", "None"],
57+
"description": "An abbreviation for the name of the license"
58+
}
59+
},
60+
"required": ["url", "name"]
61+
}
62+
},
63+
"usageType": {
64+
"type": "string",
65+
"description": "A list of enumerated values which describes the usage permissions for the release: (1) openSource: Open source; (2) governmentWideReuse: Government-wide reuse; (3) exemptByLaw: The sharing of the source code is restricted by law or regulation, including—but not limited to—patent or intellectual property law, the Export Asset Regulations, the International Traffic in Arms Regulation, and the Federal laws and regulations governing classified information; (4) exemptByNationalSecurity: The sharing of the source code would create an identifiable risk to the detriment of national security, confidentiality of Government information, or individual privacy; (5) exemptByAgencySystem: The sharing of the source code would create an identifiable risk to the stability, security, or integrity of the agency’s systems or personnel, (6) exemptByAgencyMission: The sharing of the source code would create an identifiable risk to agency mission, programs, or operations; (7) exemptByCIO: The CIO believes it is in the national interest to exempt sharing the source code; (8) exemptByPolicyDate: The release was created prior to the M-16-21 policy (August 8, 2016)",
66+
"enum": [
67+
"openSource",
68+
"governmentWideReuse",
69+
"exemptByLaw",
70+
"exemptByNationalSecurity",
71+
"exemptByAgencySystem",
72+
"exemptByAgencyMission",
73+
"exemptByCIO",
74+
"exemptByPolicyDate"
75+
],
76+
"additionalProperties": false
77+
},
78+
"exemptionText": {
79+
"type": ["string", "null"],
80+
"description": "If an exemption is listed in the 'usageType' field, this field should include a one- or two- sentence justification for the exemption used."
81+
}
82+
},
83+
"additionalProperties": false,
84+
"required": ["licenses", "usageType"]
85+
},
86+
"organization": {
87+
"type": "string",
88+
"description": "Organization responsible for the project",
89+
"enum": ["Centers for Medicare & Medicaid Services"]
90+
},
91+
"vcs": {
92+
"type": "string",
93+
"description": "Version control system used",
94+
"enum": ["git", "hg", "svn", "rcs", "bzr"]
95+
},
96+
"laborHours": {
97+
"type": "number",
98+
"description": "Labor hours invested in the project"
99+
},
100+
"platforms": {
101+
"type": "array",
102+
"description": "Platforms supported by the project",
103+
"items": {
104+
"type": "string",
105+
"enum": ["web", "windows", "mac", "linux", "ios", "android", "other"]
106+
}
107+
},
108+
"categories": {
109+
"type": "array",
110+
"description": "Categories the project belongs to. Select from: https://yml.publiccode.tools/categories-list.html",
111+
"items": {
112+
"type": "string"
113+
}
114+
},
115+
"softwareType": {
116+
"type": "string",
117+
"description": "Type of software",
118+
"enum": ["standalone/mobile", "standalone/iot", "standalone/desktop", "standalone/web", "standalone/backend", "standalone/other", "addon", "library", "configurationFiles"]
119+
},
120+
"languages": {
121+
"type": "array",
122+
"description": "Programming languages that make up the codebase",
123+
"items": {
124+
"type": "string"
125+
}
126+
},
127+
"maintenance": {
128+
"type": "string",
129+
"description": "Maintenance status",
130+
"enum": ["internal", "contract", "community", "none"]
131+
},
132+
"date": {
133+
"type": "object",
134+
"properties": {
135+
"created": {
136+
"type": "string",
137+
"format": "date-time",
138+
"description": "Creation date of the project"
139+
},
140+
"lastModified": {
141+
"type": "string",
142+
"format": "date-time",
143+
"description": "Date when the project was last modified"
144+
},
145+
"metaDataLastUpdated": {
146+
"type": "string",
147+
"format": "date-time",
148+
"description": "Date when metadata was last updated"
149+
}
150+
}
151+
},
152+
"tags": {
153+
"type": "array",
154+
"description": "Tags associated with the project",
155+
"items": {
156+
"type": "string"
157+
}
158+
},
159+
"contact": {
160+
"type": "object",
161+
"properties": {
162+
"email": {
163+
"type": "string",
164+
"format": "email",
165+
"description": "Email address of the point of contact"
166+
},
167+
"name": {
168+
"type": "string",
169+
"description": "Name of the point of contact"
170+
}
171+
}
172+
},
173+
"localisation": {
174+
"type": "boolean",
175+
"description": "Indicates if the project supports multiple languages"
176+
},
177+
"repoType": {
178+
"type": "string",
179+
"description": "Does the software accept user input?",
180+
"enum": []
181+
},
182+
"userInput": {
183+
"type": "boolean",
184+
"description": "Does the software accept user input?"
185+
},
186+
"fismaLevel": {
187+
"type": "string",
188+
"description": "FISMA security level",
189+
"enum": ["Low", "Moderate", "High"]
190+
},
191+
"group": {
192+
"type": "string",
193+
"description": "Home Department / Org / Group associated with the project"
194+
},
195+
"subsetInHealthcare": {
196+
"type": "array",
197+
"items": {
198+
"type": "string",
199+
"enum": ["Policy", "Operational", "Medicare", "Medicaid"]
200+
},
201+
"description": "Healthcare-related subset"
202+
},
203+
"userType": {
204+
"type": "array",
205+
"items": {
206+
"type": "string",
207+
"enum": ["Providers", "Patients", "Government"]
208+
},
209+
"description": "Types of users who interact with the software"
210+
},
211+
"repositoryHost": {
212+
"type": "string",
213+
"description": "Location where source code is hosted",
214+
"enum": ["github.com/CMSgov", "github.com/CMSgov", "github.cms.gov", "CCSQ GitHub"]
215+
},
216+
"maturityModelTier": {
217+
"type": "integer",
218+
"enum": [1, 2, 3, 4],
219+
"description": "Maturity model tier"
220+
}
221+
}
222+
},
223+
"required": [
224+
"name",
225+
"softwareDescription",
226+
"status",
227+
"permissions",
228+
"organization",
229+
"vcs",
230+
"laborHours",
231+
"platforms",
232+
"categories",
233+
"softwareType",
234+
"languages",
235+
"maintenance",
236+
"date",
237+
"tags",
238+
"contact",
239+
"localisation",
240+
"repoType",
241+
"userInput",
242+
"fismaLevel",
243+
"group",
244+
"subsetInHealthcare",
245+
"userType",
246+
"repositoryHost",
247+
"maturityModelTier"
248+
]
249+
}

0 commit comments

Comments
 (0)