Repository navigation
HyperJSON-Response
Public
About
JSON Schema that closely resembles an HTTP Response Message but is completely decoupled from any specific application protocol, such as HTTP.
Resources
Readme
Activity
Custom properties
Stars
0 stars
Watchers
1 watching
Forks
0 forks
Report repository
Branches
Tags
Go to Branches page Go to Tags page
Latest commit
History
2 Commits
View commit history for this file.
Folders and files
Repository files navigation
HyperJSON Response Message
Version 0.0.1
Prerequisites
Schema
./response-schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"name": "HyperJSON Response Message",
"type": "object",
"properties": {
"status": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"required": [
"code"
]
}
},
"body": {
"anyOf": [{
"type": "array"
}, {
"type": "boolean"
}, {
"type": "integer"
}, {
"type": "number"
}, {
"type": "null"
}, {
"type": "object"
}, {
"type": "string"
}]
}
},
"required": [
"status"
]
}
Valid Samples
// minimal
{
status: {
code: '200'
}
}
// with an optional status message and body included
{
status: {
code: '200',
message: 'Success'
},
body: 'rocking'
}
About
JSON Schema that closely resembles an HTTP Response Message but is completely decoupled from any specific application protocol, such as HTTP.
Resources
Readme
Activity
Custom properties
Stars
0 stars
Watchers
1 watching
Forks
0 forks
Report repository
Releases
Packages
Contributors
Languages