Skip to content

A new version of `eq-publisher` for translating questionnaires built in Author into Runner V3 format

License

Notifications You must be signed in to change notification settings

ONSdigital/eq-publisher-v3

Repository files navigation

eq-publisher-v3

A new version of eq-publisher for translating questionnaires built in Author into Runner V3 format. When finished, this project will replace eq-publisher within the eq-author-app repository.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. There are no deployment steps as this project is in development.

Prerequisites

eq-author-app is currently supports NodeJS version 10 and prior, therefore this application does the same. To swap to version 10, run nvm install 10 && nvm use 10 in the terminal, beneath the eq-publisher-v3 directory.

Installing

  1. Clone the repository
  2. Run yarn to install the dependencies
  3. Run yarn start to boot up the application

Development

Testing whether a converted schema is returned relies on passing author json to eq-publisher-v3.

It may be easier to set up an endpoint collection in Postman to view the converted schema.

If validating a schema during development envrionment variable EQ_VALIDATOR_URL is needed.

When the validator URL is set, it is possible to hit the /publish/validate endpoint for more detailed error messages.

Run yarn develop to start the application with Nodemon. Nodemon automatically refreshes the application when source files change, making development easy.

Running the tests

Run yarn test to kick-start the unit tests. Our unit tests are written in Jest, which allows a variety of flags to be passed along with the start command; you may use these at your leisure.

Run yarn test to run Jest on file changes.

We do not currently have end-to-end tests.

Coding style tests

Run yarn lint to examine the code for any common styling issues. We do this to ensure we write quality and consistent code.

Deployment

There are no deployment steps as this application is currently in development.

API Reference

Method Endpoint Description
POST /publish Convert author JSON into Eq/Runner JSON
POST /publish/validate Validates converted JSON with a schema validator

Publish

Converts author JSON to Eq/Runner V3 and returns the result

Validates converted questionnaire against schema

About

A new version of `eq-publisher` for translating questionnaires built in Author into Runner V3 format

Resources

License

Stars

Watchers

Forks

Packages

No packages published