Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Application enabling people to validate Open Referral's Human Service Data Specification data.

Running the service

Running locally with NodeJS

In order to run the project locally you need to have the latest NodeJS and npm installed.

Once your environment is all set up, clone the repository, go into the root directory and install all dependencies by running

$ npm install

Once all the dependencies have been downloaded, run the application with

$ npm start

Using the validator service

Once the service has been launched you can verify that the API is up by hitting http://localhost:1400/health. If everything is ok you should get a blank page (or a 200 response).

API operations

GET /health


Returns a 200 OK response

GET /validate/datapackage


Validate an HSDS data package. The operation requires the URI of valid datapackage.json file to be provided as a query parameter. The service will parse the contents of the data package and try to validate all enlisted resources.

Query parameters

  • uri: A valid local or remote URI of a datapackage.json descriptor file.
  • relations: (optional) A boolean flag indicating whether to enable data relations check through defined foreign keys - default is false


The operation returns a collection of validation results, one per resource as defined within the data package descriptor.

Example call

Given we have a sample datapackage.json file at that contains a small subset of resources, we can run the following command to validate the contained resources:

$ curl 'http://localhost:1400/validate/datapackage?uri='

If all data resources are valid, the service will return a response like:

  "valid": true,
  "resource": "organization"
}, {
  "valid": true,
  "resource": "program"

In case something is wrong, the response would be something like:

        "valid": true,
        "resource": "organization"
        "valid": false,
        "errors": [
                "row": 3,
                "description": "Foreign key \"organization_id\" violation in row 3"
        "resource": "program"

POST /validate/csv


Validate an HSDS data resource file. The operation validates an uploaded CSV data stream using the definition of a specified resource as found in the standard Open Referral data packagespecification. Clients should send a form payload containg a type field with the name of the HSDS logical resource and a file that contains the CSV data stream.


  • multipart/form-data


  • type: A valid HSDS resource name, e.g. contact
  • file: The CSV file to be validated

Example call

$ curl -F 'type=contact' -F 'file=@/home/chris/contacts.csv' 'http://localhost:1400/validate/csv'

A successful validation would return something like:

    "valid": true,
    "errors": []


Application enabling people to validate Open Referral's Human Service Data Specification data.




No releases published


No packages published