1 | {
|
2 | "title": "SoftwareSourceCode",
|
3 | "@id": "schema:SoftwareSourceCode",
|
4 | "extends": "CreativeWork",
|
5 | "role": "primary",
|
6 | "status": "unstable",
|
7 | "category": "code",
|
8 | "description": "Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates.\n",
|
9 | "properties": {
|
10 | "type": {
|
11 | "@id": "schema:type",
|
12 | "description": "The name of the type.",
|
13 | "type": "string",
|
14 | "enum": [
|
15 | "SoftwareSourceCode"
|
16 | ],
|
17 | "default": "SoftwareSourceCode",
|
18 | "from": "Entity"
|
19 | },
|
20 | "id": {
|
21 | "@id": "schema:id",
|
22 | "description": "The identifier for this item.",
|
23 | "type": "string",
|
24 | "from": "Entity"
|
25 | },
|
26 | "meta": {
|
27 | "@id": "stencila:meta",
|
28 | "description": "Metadata associated with this item.",
|
29 | "type": "object",
|
30 | "from": "Entity"
|
31 | },
|
32 | "alternateNames": {
|
33 | "@id": "schema:alternateName",
|
34 | "description": "Alternate names (aliases) for the item.",
|
35 | "type": "array",
|
36 | "items": {
|
37 | "type": "string"
|
38 | },
|
39 | "from": "Thing",
|
40 | "isArray": true,
|
41 | "isPlural": true,
|
42 | "aliases": [
|
43 | "alternateName"
|
44 | ]
|
45 | },
|
46 | "description": {
|
47 | "@id": "schema:description",
|
48 | "description": "A description of the item.",
|
49 | "$comment": "Allows for the description to be an array of nodes (e.g. an array of inline content,\nor a couple of paragraphs), or a string. The `minItems` restriction avoids a string\nbeing coerced into an array with a single string item.\n",
|
50 | "anyOf": [
|
51 | {
|
52 | "type": "array",
|
53 | "items": {
|
54 | "$ref": "BlockContent.schema.json"
|
55 | }
|
56 | },
|
57 | {
|
58 | "type": "array",
|
59 | "items": {
|
60 | "$ref": "InlineContent.schema.json"
|
61 | },
|
62 | "minItems": 2
|
63 | },
|
64 | {
|
65 | "type": "string"
|
66 | }
|
67 | ],
|
68 | "from": "Thing"
|
69 | },
|
70 | "identifiers": {
|
71 | "@id": "schema:identifier",
|
72 | "description": "Any kind of identifier for any kind of Thing.",
|
73 | "$comment": "Some identifiers have specific properties e.g the `issn` property for\nthe `Periodical` type. These should be used in preference to this\nproperty which is intended for identifiers that do not yet have a\nspecific property. Identifiers can be represented as strings, but\nusing a `PropertyValue` will usually be better because it allows\nfor `propertyID` (i.e. the type of identifier).\n",
|
74 | "type": "array",
|
75 | "items": {
|
76 | "anyOf": [
|
77 | {
|
78 | "$ref": "PropertyValue.schema.json"
|
79 | },
|
80 | {
|
81 | "type": "string"
|
82 | }
|
83 | ]
|
84 | },
|
85 | "from": "Thing",
|
86 | "isArray": true,
|
87 | "isPlural": true,
|
88 | "aliases": [
|
89 | "identifier"
|
90 | ]
|
91 | },
|
92 | "images": {
|
93 | "@id": "schema:image",
|
94 | "description": "Images of the item.",
|
95 | "type": "array",
|
96 | "items": {
|
97 | "anyOf": [
|
98 | {
|
99 | "$ref": "ImageObject.schema.json"
|
100 | },
|
101 | {
|
102 | "type": "string",
|
103 | "format": "uri"
|
104 | }
|
105 | ]
|
106 | },
|
107 | "from": "Thing",
|
108 | "isArray": true,
|
109 | "isPlural": true,
|
110 | "aliases": [
|
111 | "image"
|
112 | ]
|
113 | },
|
114 | "name": {
|
115 | "@id": "schema:name",
|
116 | "description": "The name of the item.",
|
117 | "type": "string",
|
118 | "from": "Thing"
|
119 | },
|
120 | "url": {
|
121 | "@id": "schema:url",
|
122 | "description": "The URL of the item.",
|
123 | "type": "string",
|
124 | "format": "uri",
|
125 | "from": "Thing"
|
126 | },
|
127 | "about": {
|
128 | "@id": "schema:about",
|
129 | "description": "The subject matter of the content.",
|
130 | "$comment": "Consistent with https://schema.org/about, this property allows for\nlinking to one of more `Thing` nodes. This could for example include\na `Person` (e.g for a bibliography) or a `DefinedTerm` (e.g. for\nsubject areas the creative work relates to).\n",
|
131 | "type": "array",
|
132 | "items": {
|
133 | "$ref": "Thing.schema.json"
|
134 | },
|
135 | "from": "CreativeWork",
|
136 | "isArray": true
|
137 | },
|
138 | "authors": {
|
139 | "@id": "schema:author",
|
140 | "description": "The authors of this creative work.",
|
141 | "type": "array",
|
142 | "allOf": [
|
143 | {
|
144 | "parser": "csi"
|
145 | },
|
146 | {
|
147 | "type": "array",
|
148 | "items": {
|
149 | "anyOf": [
|
150 | {
|
151 | "$ref": "Person.schema.json"
|
152 | },
|
153 | {
|
154 | "$ref": "Organization.schema.json"
|
155 | }
|
156 | ]
|
157 | }
|
158 | }
|
159 | ],
|
160 | "from": "CreativeWork",
|
161 | "isArray": true,
|
162 | "isPlural": true,
|
163 | "aliases": [
|
164 | "author"
|
165 | ]
|
166 | },
|
167 | "comments": {
|
168 | "@id": "schema:comment",
|
169 | "description": "Comments about this creative work.",
|
170 | "type": "array",
|
171 | "items": {
|
172 | "$ref": "Comment.schema.json"
|
173 | },
|
174 | "from": "CreativeWork",
|
175 | "isArray": true,
|
176 | "isPlural": true,
|
177 | "aliases": [
|
178 | "comment"
|
179 | ]
|
180 | },
|
181 | "content": {
|
182 | "@id": "stencila:content",
|
183 | "description": "The structured content of this creative work c.f. property `text`.",
|
184 | "type": "array",
|
185 | "items": {
|
186 | "$ref": "Node.schema.json"
|
187 | },
|
188 | "from": "CreativeWork",
|
189 | "isArray": true
|
190 | },
|
191 | "dateCreated": {
|
192 | "@id": "schema:dateCreated",
|
193 | "description": "Date/time of creation.",
|
194 | "allOf": [
|
195 | {
|
196 | "$ref": "#/definitions/dateProperty"
|
197 | }
|
198 | ],
|
199 | "from": "CreativeWork"
|
200 | },
|
201 | "dateReceived": {
|
202 | "@id": "schema:dateReceived",
|
203 | "description": "Date/time that work was received.",
|
204 | "allOf": [
|
205 | {
|
206 | "$ref": "#/definitions/dateProperty"
|
207 | }
|
208 | ],
|
209 | "from": "CreativeWork"
|
210 | },
|
211 | "dateAccepted": {
|
212 | "@id": "stencila:dateAccepted",
|
213 | "description": "Date/time of acceptance.",
|
214 | "$comment": "This is not yet a schema.org property but the term is used\n[in Dublin Core](http://purl.org/dc/terms/dateAccepted).\n",
|
215 | "allOf": [
|
216 | {
|
217 | "$ref": "#/definitions/dateProperty"
|
218 | }
|
219 | ],
|
220 | "from": "CreativeWork"
|
221 | },
|
222 | "dateModified": {
|
223 | "@id": "schema:dateModified",
|
224 | "description": "Date/time of most recent modification.",
|
225 | "allOf": [
|
226 | {
|
227 | "$ref": "#/definitions/dateProperty"
|
228 | }
|
229 | ],
|
230 | "from": "CreativeWork"
|
231 | },
|
232 | "datePublished": {
|
233 | "@id": "schema:datePublished",
|
234 | "aliases": [
|
235 | "date"
|
236 | ],
|
237 | "description": "Date of first publication.",
|
238 | "allOf": [
|
239 | {
|
240 | "$ref": "#/definitions/dateProperty"
|
241 | }
|
242 | ],
|
243 | "from": "CreativeWork"
|
244 | },
|
245 | "editors": {
|
246 | "@id": "schema:editor",
|
247 | "description": "People who edited the `CreativeWork`.",
|
248 | "type": "array",
|
249 | "items": {
|
250 | "$ref": "Person.schema.json"
|
251 | },
|
252 | "from": "CreativeWork",
|
253 | "isArray": true,
|
254 | "isPlural": true,
|
255 | "aliases": [
|
256 | "editor"
|
257 | ]
|
258 | },
|
259 | "funders": {
|
260 | "@id": "schema:funder",
|
261 | "description": "People or organizations that funded the `CreativeWork`.",
|
262 | "type": "array",
|
263 | "items": {
|
264 | "anyOf": [
|
265 | {
|
266 | "$ref": "Person.schema.json"
|
267 | },
|
268 | {
|
269 | "$ref": "Organization.schema.json"
|
270 | }
|
271 | ]
|
272 | },
|
273 | "from": "CreativeWork",
|
274 | "isArray": true,
|
275 | "isPlural": true,
|
276 | "aliases": [
|
277 | "funder"
|
278 | ]
|
279 | },
|
280 | "fundedBy": {
|
281 | "@id": "stencila:fundedBy",
|
282 | "description": "Grants that funded the `CreativeWork`; reverse of `fundedItems`.",
|
283 | "$comment": "This follows the proposal [here](https://github.com/schemaorg/schemaorg/issues/2258)\nfor a property that is the reverse of `fundedItems`.\nIt is an any because a `CreativeWork` may have been funded through more than\none `Grant`.\n",
|
284 | "type": "array",
|
285 | "items": {
|
286 | "anyOf": [
|
287 | {
|
288 | "$ref": "Grant.schema.json"
|
289 | },
|
290 | {
|
291 | "$ref": "MonetaryGrant.schema.json"
|
292 | }
|
293 | ]
|
294 | },
|
295 | "from": "CreativeWork",
|
296 | "isArray": true
|
297 | },
|
298 | "genre": {
|
299 | "@id": "schema:genre",
|
300 | "description": "Genre of the creative work, broadcast channel or group.",
|
301 | "type": "array",
|
302 | "items": {
|
303 | "type": "string"
|
304 | },
|
305 | "from": "CreativeWork",
|
306 | "isArray": true
|
307 | },
|
308 | "keywords": {
|
309 | "@id": "schema:keywords",
|
310 | "description": "Keywords or tags used to describe this content.\nMultiple entries in a keywords list are typically delimited by commas.\n",
|
311 | "allOf": [
|
312 | {
|
313 | "parser": "csi"
|
314 | },
|
315 | {
|
316 | "type": "array",
|
317 | "items": {
|
318 | "type": "string"
|
319 | }
|
320 | }
|
321 | ],
|
322 | "from": "CreativeWork",
|
323 | "isArray": true,
|
324 | "isPlural": true,
|
325 | "aliases": [
|
326 | "keyword"
|
327 | ]
|
328 | },
|
329 | "isPartOf": {
|
330 | "@id": "schema:isPartOf",
|
331 | "description": "An item or other CreativeWork that this CreativeWork is a part of.\n",
|
332 | "allOf": [
|
333 | {
|
334 | "$ref": "CreativeWorkTypes.schema.json"
|
335 | }
|
336 | ],
|
337 | "from": "CreativeWork"
|
338 | },
|
339 | "licenses": {
|
340 | "@id": "schema:license",
|
341 | "description": "License documents that applies to this content, typically indicated by URL.\n",
|
342 | "type": "array",
|
343 | "items": {
|
344 | "anyOf": [
|
345 | {
|
346 | "$ref": "CreativeWorkTypes.schema.json"
|
347 | },
|
348 | {
|
349 | "type": "string",
|
350 | "format": "uri"
|
351 | }
|
352 | ]
|
353 | },
|
354 | "from": "CreativeWork",
|
355 | "isArray": true,
|
356 | "isPlural": true,
|
357 | "aliases": [
|
358 | "license"
|
359 | ]
|
360 | },
|
361 | "maintainers": {
|
362 | "@id": "schema:maintainer",
|
363 | "description": "The people or organizations who maintain this CreativeWork.",
|
364 | "$comment": "A maintainer of a Dataset, SoftwareApplication, or other CreativeWork.\nA maintainer is a Person or Organization that manages contributions to,\nand/or publication of, some (typically complex) artifact. It is common for\ndistributions of software and data to be based on \"upstream\" sources.\nWhen maintainer is applied to a specific version of something e.g. a particular\nversion or packaging of a Dataset, it is always possible that the upstream\nsource has a different maintainer. The isBasedOn property can be used to\nindicate such relationships between datasets to make the different maintenance\nroles clear. Similarly in the case of software, a package may have dedicated\nmaintainers working on integration into software distributions such as Ubuntu,\nas well as upstream maintainers of the underlying work.\n",
|
365 | "type": "array",
|
366 | "items": [
|
367 | {
|
368 | "$ref": "Organization.schema.json"
|
369 | },
|
370 | {
|
371 | "$ref": "Person.schema.json"
|
372 | }
|
373 | ],
|
374 | "from": "CreativeWork",
|
375 | "isArray": true,
|
376 | "isPlural": true,
|
377 | "aliases": [
|
378 | "maintainer"
|
379 | ]
|
380 | },
|
381 | "parts": {
|
382 | "@id": "schema:hasParts",
|
383 | "aliases": [
|
384 | "hasParts",
|
385 | "part"
|
386 | ],
|
387 | "description": "Elements of the collection which can be a variety of different elements,\nsuch as Articles, Datatables, Tables and more.\n",
|
388 | "type": "array",
|
389 | "items": {
|
390 | "$ref": "CreativeWorkTypes.schema.json"
|
391 | },
|
392 | "from": "CreativeWork",
|
393 | "isArray": true,
|
394 | "isPlural": true
|
395 | },
|
396 | "publisher": {
|
397 | "@id": "schema:publisher",
|
398 | "description": "A publisher of the CreativeWork.\n",
|
399 | "anyOf": [
|
400 | {
|
401 | "$ref": "Person.schema.json"
|
402 | },
|
403 | {
|
404 | "$ref": "Organization.schema.json"
|
405 | }
|
406 | ],
|
407 | "from": "CreativeWork"
|
408 | },
|
409 | "references": {
|
410 | "@id": "schema:citation",
|
411 | "aliases": [
|
412 | "citations",
|
413 | "reference"
|
414 | ],
|
415 | "description": "References to other creative works, such as another publication,\nweb page, scholarly article, etc.\n",
|
416 | "type": "array",
|
417 | "items": {
|
418 | "anyOf": [
|
419 | {
|
420 | "$ref": "CreativeWorkTypes.schema.json"
|
421 | },
|
422 | {
|
423 | "type": "string"
|
424 | }
|
425 | ]
|
426 | },
|
427 | "from": "CreativeWork",
|
428 | "isArray": true,
|
429 | "isPlural": true
|
430 | },
|
431 | "text": {
|
432 | "@id": "schema:text",
|
433 | "description": "The textual content of this creative work.",
|
434 | "type": "string",
|
435 | "from": "CreativeWork"
|
436 | },
|
437 | "title": {
|
438 | "@id": "schema:headline",
|
439 | "description": "The title of the creative work.",
|
440 | "aliases": [
|
441 | "headline"
|
442 | ],
|
443 | "$comment": "Allows for the title to include inline content (e.g `Strong`, `Math`)\nor a string. The title can not be block content e.g `Paragraph`.\nThe `minItems` restriction avoids a string being coerced into an array\nwith a single string item.\n",
|
444 | "anyOf": [
|
445 | {
|
446 | "type": "array",
|
447 | "items": {
|
448 | "$ref": "InlineContent.schema.json"
|
449 | },
|
450 | "minItems": 2
|
451 | },
|
452 | {
|
453 | "type": "string"
|
454 | }
|
455 | ],
|
456 | "from": "CreativeWork"
|
457 | },
|
458 | "version": {
|
459 | "@id": "schema:version",
|
460 | "description": "The version of the creative work.",
|
461 | "$comment": "In this case `string` is listed as an alternative before `number` to\navoid semantic version numbers e.g. `1.0` being parsed, and subsequently\nencoded, as `1` thereby resulting in loss of information.\n",
|
462 | "anyOf": [
|
463 | {
|
464 | "type": "string"
|
465 | },
|
466 | {
|
467 | "type": "number"
|
468 | }
|
469 | ],
|
470 | "from": "CreativeWork"
|
471 | },
|
472 | "codeRepository": {
|
473 | "@id": "schema:codeRepository",
|
474 | "description": "Link to the repository where the un-compiled, human readable code and related\ncode is located.\n",
|
475 | "type": "string",
|
476 | "format": "uri",
|
477 | "from": "SoftwareSourceCode"
|
478 | },
|
479 | "codeSampleType": {
|
480 | "@id": "schema:codeSampleType",
|
481 | "description": "What type of code sample: full (compile ready) solution, code snippet, inline code, scripts, template.\n",
|
482 | "type": "string",
|
483 | "from": "SoftwareSourceCode"
|
484 | },
|
485 | "programmingLanguage": {
|
486 | "@id": "schema:programmingLanguage",
|
487 | "description": "The computer programming language.\n",
|
488 | "type": "string",
|
489 | "from": "SoftwareSourceCode"
|
490 | },
|
491 | "runtimePlatform": {
|
492 | "@id": "schema:runtimePlatform",
|
493 | "description": "Runtime platform or script interpreter dependencies (Example - Java v1,\nPython2.3, .Net Framework 3.0).\n",
|
494 | "type": "array",
|
495 | "items": [
|
496 | {
|
497 | "type": "string"
|
498 | }
|
499 | ],
|
500 | "from": "SoftwareSourceCode",
|
501 | "isArray": true
|
502 | },
|
503 | "softwareRequirements": {
|
504 | "@id": "schema:softwareRequirements",
|
505 | "description": "Dependency requirements for the software.",
|
506 | "type": "array",
|
507 | "items": {
|
508 | "anyOf": [
|
509 | {
|
510 | "$ref": "SoftwareSourceCode.schema.json"
|
511 | },
|
512 | {
|
513 | "$ref": "SoftwareApplication.schema.json"
|
514 | },
|
515 | {
|
516 | "type": "string"
|
517 | }
|
518 | ]
|
519 | },
|
520 | "from": "SoftwareSourceCode",
|
521 | "isArray": true,
|
522 | "isPlural": true,
|
523 | "aliases": [
|
524 | "softwareRequirement"
|
525 | ]
|
526 | },
|
527 | "targetProducts": {
|
528 | "@id": "schema:targetProduct",
|
529 | "description": "Target operating system or product to which the code applies.\n",
|
530 | "type": "array",
|
531 | "items": [
|
532 | {
|
533 | "$ref": "SoftwareApplication.schema.json"
|
534 | }
|
535 | ],
|
536 | "from": "SoftwareSourceCode",
|
537 | "isArray": true,
|
538 | "isPlural": true,
|
539 | "aliases": [
|
540 | "targetProduct"
|
541 | ]
|
542 | }
|
543 | },
|
544 | "file": "SoftwareSourceCode.schema.yaml",
|
545 | "children": [],
|
546 | "descendants": [],
|
547 | "$schema": "http://json-schema.org/draft-07/schema#",
|
548 | "$id": "https://schema.stenci.la/v0/SoftwareSourceCode.schema.json",
|
549 | "source": "https://github.com/stencila/schema/blob/master/SoftwareSourceCode.schema.yaml",
|
550 | "type": "object",
|
551 | "propertyAliases": {
|
552 | "alternateName": "alternateNames",
|
553 | "identifier": "identifiers",
|
554 | "image": "images",
|
555 | "author": "authors",
|
556 | "comment": "comments",
|
557 | "date": "datePublished",
|
558 | "editor": "editors",
|
559 | "funder": "funders",
|
560 | "keyword": "keywords",
|
561 | "license": "licenses",
|
562 | "maintainer": "maintainers",
|
563 | "hasParts": "parts",
|
564 | "part": "parts",
|
565 | "citations": "references",
|
566 | "reference": "references",
|
567 | "headline": "title",
|
568 | "softwareRequirement": "softwareRequirements",
|
569 | "targetProduct": "targetProducts"
|
570 | },
|
571 | "additionalProperties": false,
|
572 | "definitions": {
|
573 | "dateProperty": {
|
574 | "anyOf": [
|
575 | {
|
576 | "$ref": "Date.schema.json"
|
577 | },
|
578 | {
|
579 | "type": "string",
|
580 | "format": "date-time"
|
581 | },
|
582 | {
|
583 | "type": "string",
|
584 | "format": "date"
|
585 | }
|
586 | ]
|
587 | }
|
588 | },
|
589 | "required": [
|
590 | "type"
|
591 | ]
|
592 | }
|