Skip to content

Commit

Permalink
json schema for catalog and source files
Browse files Browse the repository at this point in the history
  • Loading branch information
ngwese committed Mar 10, 2020
1 parent 0b5a7ad commit cd8d114
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
71 changes: 71 additions & 0 deletions pkg/catalog/catalog.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/monome/maiden/master/pkg/catalog/catalog.schema.json",
"title": "maiden catalog",
"description": "listing of maiden projects",
"type": "object",
"properties": {
"file_info": {
"description": "file format metadata",
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [ "kind", "version" ]
},
"catalog_name": {
"type": "string"
},
"date": {
"type": "string"
},
"entries": {
"description": "individual project entries",
"type": "array",
"items": {
"type": "object",
"properties": {
"project_name": {
"type": "string"
},
"project_url": {
"type": "string"
},
"description": {
"type": "string"
},
"author": {
"type": "string"
},
"home_page": {
"type": "string"
},
"discussion_url": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
},
"version": {
"type": "string"
},
"origin": {
"type": "string"
}
},
"required": [ "project_name", "project_url" ]
}
}
},
"required": [ "file_info", "catalog_name", "entries" ]
}
38 changes: 38 additions & 0 deletions pkg/catalog/source.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/monome/maiden/master/pkg/catalog/source.schema.json",
"title": "maiden catalog source file",
"description": "details of maiden catalog to download",
"type": "object",
"properties": {
"file_info": {
"description": "file format metadata",
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [ "kind", "version" ]
},
"source": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"method": {
"type": "string"
},
"parameters": {
"type": "object"
}
},
"required": [ "name", "method", "parameters" ]
}
},
"required": [ "file_info", "source" ]
}

0 comments on commit cd8d114

Please sign in to comment.