-
Notifications
You must be signed in to change notification settings - Fork 4
Media types
jvelilla edited this page Jul 8, 2012
·
18 revisions
IN PROGRESS
- start with Collection/JSON
- See later if we want to use HAL in addition or replacement
- note: both "standards" are evolving, so we are likely to update the lib for time to time.
- Collection/JSON
- content: graphviz’s code
- id: UUID, shortname, integer ..
- title: user friendly title
- description: description of the graph
- (image: generated graph from the graphviz’s code)
{
"collection" :
{
"version" : "1.0",
"href" : URI,
"links" : [ARRAY],
"items : [ARRAY],
"queries" : [ARRAY],
"template" : {OBJECT},
"error" : {OBJECT}
}
}
{ // based on Collection+JSON media type
// http://www.amundsen.com/media-types/collection/
"collection" : {
"href" : "...",
"version" : "1.0",
"links" : [
{"rel" : "author", "href" : "...", "prompt" : "Author"},
{"rel" : "profile", "href" : "...", "prompt" : "Profile"}
],
//Queries
"queries" : [
{"rel" : "all", "href" : "...", "prompt" : "All Graphs"},
{"rel" : "byName", "href" : "...", "prompt" : "byName",
"data" : [
{"name" : "name", "value" : "", "prompt" : "Graph Name"},
]
}
],
//Graph Collections
"items" : [
{"href" : "...",
"data" :[
{"name" : "title", "value" : "...", "prompt" :"Title"},
{"name" : "content", "value" : "...", "prompt" : "Graphviz Code"},
{"name" : "id", "value" : "...", "prompt" : "Id"},
{"name" : "description", "value" : "...", "prompt" : "Description"},
{"name" : "representation", "value" : "...", "prompt" : "Binary Representation"}
]
}
],
//Graph template
// Use this date to create a new Graph
"template" :
{"data" :[
{"name" : "title", "value" : "...",prompt:"Title"},
{"name" : "content", "value" : "...", "prompt" : "Graphviz Code"},
{"name" : "description", "value" : "...", "prompt" : "Description"}
]
}
}
}