diff --git a/docs/getting-started.md b/docs/getting-started.md index 3e05d15943f035a2c49000328330ae24c4c4d308..dc47c004a5b6b585785c5d10d9ff2b050df83042 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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: -``` -$ git clone git@gitlab.phaidra.org:fair-data-austria-db-repository/fda-services.git -$ make build +```console +git clone git@gitlab.phaidra.org:fair-data-austria-db-repository/fda-services.git +make build ``` #### Swagger Codegen @@ -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 the [`swagger-codegen-cli.jar`](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/) and start the services: -``` -$ docker-compose up -d +```console +docker-compose up -d ``` Run the codegen tool: -``` -$ java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l python -o ./api-container +```console +java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l python -o ./api-container ``` ### Debugging @@ -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: -``` -$ docker-compose up -d -$ 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-compose logs -f +```console +docker-compose up -d +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-compose logs -f ``` 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: -``` -$ docker-compose up -d -$ docker container stop fda-ui && docker container rm fda-ui -$ docker-compose logs -f +```console +docker-compose up -d +docker container stop fda-ui && docker container rm fda-ui +docker-compose logs -f ``` Then start the frontend in another console window: -``` -$ yarn --cwd=./fda-ui dev +```console +yarn --cwd=./fda-ui dev ``` diff --git a/docs/system.md b/docs/system.md index 31ed1104d00f7da17853f0b0957e20d9ce5a0453..11f9b596567ed97fc086050c1f385a3c261b192c 100644 --- a/docs/system.md +++ b/docs/system.md @@ -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. -``` -$ curl -X POST -d '{"username":"username","password":"password"}' -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth +```console +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, e.g. cURL. -``` -$ curl -X PUT -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth +```console +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) @@ -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*. -``` -$ psql -d fda -h localhost -p 5432 -U postgres -W +```console +psql -d fda -h localhost -p 5432 -U postgres -W ``` !!! debug "Debug Information" @@ -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 queried. -``` -$ curl -X POST -d '{"offset":0,"ustring":"met"}' https://dbrepo.ossdip.at/api/units/suggest +```console +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. -``` -$ curl -X POST -d '{"name":"metre","uri":...}' https://dbrepo.ossdip.at/api/units/saveconcept +```console +curl -X POST -d '{"name":"metre","uri":...}' https://dbrepo.ossdip.at/api/units/saveconcept ``` Then the column can be assigned to a table column. -``` -$ curl -X POST -d '{"cdbid":1,"tid":1,"cid":1,"uri":...}' https://dbrepo.ossdip.at/api/units/savecolumnsconcept +```console +curl -X POST -d '{"cdbid":1,"tid":1,"cid":1,"uri":...}' https://dbrepo.ossdip.at/api/units/savecolumnsconcept ``` !!! debug "Debug Information" @@ -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 to e.g. match the term "Airquality" -``` -$ curl http://dbrepo.ossdip.at:9200/databaseindex/_search?q=name:Airquality +```console +curl http://dbrepo.ossdip.at:9200/databaseindex/_search?q=name:Airquality ``` !!! debug "Debug Information"