Sign inSign up

umids/d2s-api

By umids

•Updated about 6 years ago

HTTP RESTful Smart API to serve data from a SPARQL endpoint

Image
0

1.9K

umids/d2s-api repository overview

⁠About

This project aims to generate useful web services described following the OpenAPI 3.0⁠ specifications using SpringDoc⁠. The generated services enable the user to query a BioLink-compliant⁠ RDF knowledge graph using HTTP request following the Reasoner API Specifications⁠.

This services has been developed for the NCATS Translator project⁠.

⁠Pull or build

You can pull the image from DockerHub⁠

docker pull umids/d2s-api

Or build from the git repository. Builds after modifying pom.xml might take some time, since the Dockerfile will resolve all dependencies from scratch. Once cached, builds should be significantly faster.

docker build -t umids/d2s-api .

⁠Run

docker run -it --rm -p 80:8080 umids/d2s-api

Use -e ENDPOINT=<biolink_sparql_endpoint_url> environment switch to override default endpoint.

Using a specific endpoint and the DockerHub image⁠:

docker run -it --rm -p 80:8080 --net d2s-core_network -e ENDPOINT="http://graphdb:7200/repositories/test" umids/d2s-api

Access the Swagger Apidoc at http://localhost/v3/api-docs⁠

⁠Development

Change the default endpoint in src/main/resources/application.yml⁠

Use the convenience script⁠:

./restart_local.sh

Or manually:

# Build
mvn package spring-boot:repackage
# Run
java -jar target/d2s-api-0.9.0.jar

⁠Acknowledgments

Alexander Malic for his concept and contribution with rdfServices⁠

Desson Ariawan for its detailed tutorial on documenting Spring Boot REST API with SpringDoc + OpenAPI 3⁠.

Tutorial about documenting a Spring REST API Using OpenAPI 3.0⁠.

Tag summary

Content type

Image

Digest

Size

110.8 MB

Last updated

over 6 years ago

docker pull umids/d2s-api