/sbr-api

Statistical Business Register API

Primary LanguageScalaMIT LicenseMIT

sbr-api

license Dependency Status

Prerequisites

Development Setup (MacOS)

To install SBT quickly you can use Homebrew (Brew):

brew install sbt

Similarly we can get Scala (for development purposes) using brew:

brew install scala

Running the App

To compile, build and run the application use the following command:

sbt api/run `-Dhttp.port=9002`

The default application port is 9000. To specify an alternative port use -Dhttp.port=8080.

Assembly

To package the project in a runnable fat-jar:

sbt assembly

Test

To test all test suites we can use:

sbt test

Testing an individual test suite can be specified by using the testOnly.

SBR Api uses its own test configuration settings for integration tests, the details of which can be found on theONS Confluence.

To run integration test run:

sbt it:test

SeeCONTRIBUTING for more details on creating tests.

Approach

API Documentation

Swagger API is used to document and expose swagger definitions of the routes and capabilities for this project.

To see the full definition set use path: http://localhost:9000/swagger.json

For a graphical interface using Swagger Ui use path: http://localhost:9000/docs

Troubleshooting

See FAQ for possible and common solutions.

Contributing

See CONTRIBUTING for details.

License

Copyright ©‎ 2017, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.