Skip to content

Commit

Permalink
Add documentation to Package models #617
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed May 25, 2017
1 parent e765a45 commit 14399c5
Show file tree
Hide file tree
Showing 10 changed files with 1,844 additions and 71 deletions.
57 changes: 57 additions & 0 deletions etc/scripts/sch2js/doc/AssertedLicense-json-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "",
"type": "object",
"title": "asserted license",
"description": "Represents the licensing as asserted in a package metadata.",
"properties": {
"license": {
"oneOf": [
{
"type": "string",
"title": "license",
"description": "license as asserted. This can be a text, a name or anything."
},
{
"type": "null"
}
]
},
"url": {
"oneOf": [
{
"type": "string",
"title": "url",
"description": "URL to a web page for this license."
},
{
"type": "null"
}
]
},
"text": {
"oneOf": [
{
"type": "string",
"title": "license text",
"description": "license text as asserted."
},
{
"type": "null"
}
]
},
"notice": {
"oneOf": [
{
"type": "string",
"title": "notice",
"description": "a license notice for this package"
},
{
"type": "null"
}
]
}
}
}
41 changes: 41 additions & 0 deletions etc/scripts/sch2js/doc/Dependency-json-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "",
"type": "object",
"title": "dependency",
"description": "A dependency points to a Package via a package name and a version constraint (such as \">= 3.4\"). The version is the effective version that has been picked and resolved.",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"title": "name",
"description": "Name of the package for this dependency."
},
"version": {
"oneOf": [
{
"type": "string",
"title": "version",
"description": "Version of this dependent package: The effective or concrete resolved and used version."
},
{
"type": "null"
}
]
},
"version_constraint": {
"oneOf": [
{
"type": "string",
"title": "version",
"description": "The version constraints (aka. possible versions) for this dependent package: The meaning of this constraings is package type-specific. "
},
{
"type": "null"
}
]
}
}
}
Loading

0 comments on commit 14399c5

Please sign in to comment.