Skip to content
Snippets Groups Projects
Unverified Commit 1fd7a88a authored by Martin Weise's avatar Martin Weise
Browse files

Formatting

parent 870f4a37
No related branches found
No related tags found
No related merge requests found
Pipeline #2749 passed
...@@ -93,9 +93,9 @@ We develop all packages with the following software requirements: ...@@ -93,9 +93,9 @@ We develop all packages with the following software requirements:
For local development you need to clone the repository and build the services from scratch: For local development you need to clone the repository and build the services from scratch:
``` ```console
$ git clone git@gitlab.phaidra.org:fair-data-austria-db-repository/fda-services.git git clone git@gitlab.phaidra.org:fair-data-austria-db-repository/fda-services.git
$ make build make build
``` ```
#### Swagger Codegen #### Swagger Codegen
...@@ -104,14 +104,14 @@ It is possible to use the Swagger documentation of the services to generate HTTP ...@@ -104,14 +104,14 @@ It is possible to use the Swagger documentation of the services to generate HTTP
Clients can only begenerated when DBRepo is running. Just download Clients can only begenerated when DBRepo is running. Just download
the [`swagger-codegen-cli.jar`](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/) and start the services: the [`swagger-codegen-cli.jar`](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/) and start the services:
``` ```console
$ docker-compose up -d docker-compose up -d
``` ```
Run the codegen tool: Run the codegen tool:
``` ```console
$ java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l python -o ./api-container java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l python -o ./api-container
``` ```
### Debugging ### Debugging
...@@ -120,11 +120,11 @@ $ java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l pytho ...@@ -120,11 +120,11 @@ $ java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l pytho
Start all containers with docker-compose: Start all containers with docker-compose:
``` ```console
$ docker-compose up -d docker-compose up -d
$ docker container stop fda-xxxxx-service # <<< replace with the service you want to debug docker container stop fda-xxxxx-service # <<< replace with the service you want to debug
$ docker container rm fda-xxxxx-service # <<< replace with the service you want to debug docker container rm fda-xxxxx-service # <<< replace with the service you want to debug
$ docker-compose logs -f docker-compose logs -f
``` ```
Then start the container in your IDE and debug it. Then start the container in your IDE and debug it.
...@@ -133,14 +133,14 @@ Then start the container in your IDE and debug it. ...@@ -133,14 +133,14 @@ Then start the container in your IDE and debug it.
Start all containers with docker-compose: Start all containers with docker-compose:
``` ```console
$ docker-compose up -d docker-compose up -d
$ docker container stop fda-ui && docker container rm fda-ui docker container stop fda-ui && docker container rm fda-ui
$ docker-compose logs -f docker-compose logs -f
``` ```
Then start the frontend in another console window: Then start the frontend in another console window:
``` ```console
$ yarn --cwd=./fda-ui dev yarn --cwd=./fda-ui dev
``` ```
...@@ -53,15 +53,15 @@ metadata database. By default, a token is valid for 24 hours and is used on all ...@@ -53,15 +53,15 @@ metadata database. By default, a token is valid for 24 hours and is used on all
For the **HTTP API**, obtaining a new token can be done via, e.g. cURL. For the **HTTP API**, obtaining a new token can be done via, e.g. cURL.
``` ```console
$ curl -X POST -d '{"username":"username","password":"password"}' -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth curl -X POST -d '{"username":"username","password":"password"}' -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth
``` ```
Call a secured method by setting the JWT Token as [Bearer Token](https://www.rfc-editor.org/rfc/rfc6750.html) via, Call a secured method by setting the JWT Token as [Bearer Token](https://www.rfc-editor.org/rfc/rfc6750.html) via,
e.g. cURL. e.g. cURL.
``` ```console
$ curl -X PUT -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth curl -X PUT -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth
``` ```
For the **AMQP API**, the Authentication Service also creates a dedicated user at the [Broker Service](#broker-service) For the **AMQP API**, the Authentication Service also creates a dedicated user at the [Broker Service](#broker-service)
...@@ -84,8 +84,8 @@ use [PostgreSQL](https://www.postgresql.org/) for its rich capabilities in the r ...@@ -84,8 +84,8 @@ use [PostgreSQL](https://www.postgresql.org/) for its rich capabilities in the r
The default credentials are `postgres:postgres` for the database `fda`. Connect to the database via, e.g. *psql*. The default credentials are `postgres:postgres` for the database `fda`. Connect to the database via, e.g. *psql*.
``` ```console
$ psql -d fda -h localhost -p 5432 -U postgres -W psql -d fda -h localhost -p 5432 -U postgres -W
``` ```
!!! debug "Debug Information" !!! debug "Debug Information"
...@@ -106,20 +106,20 @@ and registers a unit. It is used to assign a unit of measurement to a table colu ...@@ -106,20 +106,20 @@ and registers a unit. It is used to assign a unit of measurement to a table colu
For the **HTTP API**, the Unit Service assigns a unit of measurement via, e.g. cURL. First the list of concepts can be For the **HTTP API**, the Unit Service assigns a unit of measurement via, e.g. cURL. First the list of concepts can be
queried. queried.
``` ```console
$ curl -X POST -d '{"offset":0,"ustring":"met"}' https://dbrepo.ossdip.at/api/units/suggest curl -X POST -d '{"offset":0,"ustring":"met"}' https://dbrepo.ossdip.at/api/units/suggest
``` ```
Then the concept needs to be saved into the metadata database. Then the concept needs to be saved into the metadata database.
``` ```console
$ curl -X POST -d '{"name":"metre","uri":...}' https://dbrepo.ossdip.at/api/units/saveconcept curl -X POST -d '{"name":"metre","uri":...}' https://dbrepo.ossdip.at/api/units/saveconcept
``` ```
Then the column can be assigned to a table column. Then the column can be assigned to a table column.
``` ```console
$ curl -X POST -d '{"cdbid":1,"tid":1,"cid":1,"uri":...}' https://dbrepo.ossdip.at/api/units/savecolumnsconcept curl -X POST -d '{"cdbid":1,"tid":1,"cid":1,"uri":...}' https://dbrepo.ossdip.at/api/units/savecolumnsconcept
``` ```
!!! debug "Debug Information" !!! debug "Debug Information"
...@@ -152,8 +152,8 @@ The Search Service implements ElasticSearch and creates a retrievable index on a ...@@ -152,8 +152,8 @@ The Search Service implements ElasticSearch and creates a retrievable index on a
with each save operation on databases in the metadata database. The database name can be queried with ElasticSearch with each save operation on databases in the metadata database. The database name can be queried with ElasticSearch
to e.g. match the term "Airquality" to e.g. match the term "Airquality"
``` ```console
$ curl http://dbrepo.ossdip.at:9200/databaseindex/_search?q=name:Airquality curl http://dbrepo.ossdip.at:9200/databaseindex/_search?q=name:Airquality
``` ```
!!! debug "Debug Information" !!! debug "Debug Information"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment