The ElasticBeanstalk application looks for an object named `application` to run with `WSGI` this was previously created with the `create_app` method and used `app` as the name for the application object.
Removes a Swagger YAML file that is not currently used. It was too difficult to maintain swagger in a set of separate YAML files, so a single one was created and loaded in the main FLask app.
Add a basic `Flask` API that responds to queries for copyright data. This includes 5 basic endpoints:
- `/search/fulltext`: queries all text fields in the Registration and Renewal records
- `/search/registration/<regnum>`: queries the collection for a specific copyright registration by registration number
- `/search/renewal/<rennum>`: queries the collection for a specific copyright renewal by renewal number
- `/registration/<uuid>`: fetches a single registration record by internally assigned UUID
- `/registration/<uuid?`: fetches a single renewal record by internally assigned UUID
The api can be run with the standard `python -m flask run` from the root of the project and by default will run in `production` mode. To set `development` run `export FLASK_ENV=development` before starting the application.
This adds a full `Claimant` object to the ElasticSearch index, including the `claimant_type` field which helps users see the specific relationship a claimant has to a renewal. It would be good to provide translations of these codes in the future, but this is not currently necessary.
Includes an initial version of the utility script used to generate
the copyright entry/renewal database along with instructions on how
to run the script and create a version of the database locally