GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HyperJSON/HyperJSON-Response: JSON Schema that closely resembles an HTTP Response Message but is completely decoupled from any specific application protocol, such as HTTP.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 
package.json
package.json
 
 
response-schema.json
response-schema.json
 
 
test.js
test.js
 
 

Repository files navigation

HyperJSON Response Message

Version 0.0.1

Prerequisites

  • What is HyperJSON
  • What is JSON-Schema Draft v4

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

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.