Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve deploy server and test dbpedia music #131

Merged
merged 7 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .ci/dbpedia_music.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set -xe

java -jar target/oba-*-jar-with-dependencies.jar -c examples/dbpedia/config_music.yaml
pushd outputs/dbpedia_music/servers/python
bash generate-server.sh
pushd server
docker build -t openapi_server .
docker run --name dbpedia_music -d -p 8080:8080 openapi_server
popd
sleep 10s
curl -X GET "http://0.0.0.0:8080/v1.3.0/bands/Pink_Floyd" -H "accept: application/json"
docker logs dbpedia_music
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: java
script:
- mvn package
- bash .ci/dbpedia_music.sh
before_deploy:
- ls -lR
deploy:
Expand Down
2 changes: 1 addition & 1 deletion examples/dbpedia/config_full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ openapi:
## Ontologies
### List of ontologies
ontologies:
- https://gist.githubusercontent.com/mosoriob/cec147b24bd241295584dfcc21c21b93/raw/b6fa41ddf93212d967f35da20278f54d2ae2d40d/gistfile1.txt
- examples/dbpedia/ontology.xml

## SPARQL information
endpoint:
Expand Down
9 changes: 4 additions & 5 deletions examples/dbpedia/config_music.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ openapi:
## Ontologies
### List of ontologies
ontologies:
- https://gist.githubusercontent.com/mosoriob/cec147b24bd241295584dfcc21c21b93/raw/b6fa41ddf93212d967f35da20278f54d2ae2d40d/gistfile1.txt
- examples/dbpedia/ontology.xml

## SPARQL information
endpoint:
url: http://dbpedia.org/sparql
prefix: http://dbpedia.org/resource
graph_base: http://ontosoft.isi.edu:3030/modelCatalog-1.2.0/data/

## Filter the paths by methods
enable_get_paths: true
enable_post_paths: true
enable_delete_paths: true
enable_put_paths: true
enable_post_paths: false
enable_delete_paths: false
enable_put_paths: false

## Select the classes to add in the API
classes:
Expand Down
30,553 changes: 30,553 additions & 0 deletions examples/dbpedia/ontology.xml

Large diffs are not rendered by default.

Binary file modified src/main/resources/servers.zip
Binary file not shown.
6 changes: 5 additions & 1 deletion src/main/resources/servers/python/generate-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ dir=${PWD}
cp ../openapi.yaml ${PWD}

SERVER_DIR=server
docker run -ti --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v4.1.2 \


docker run -ti --rm -v ${PWD}:/local \
-u "$(id -u):$(id -u)" \
openapitools/openapi-generator-cli:v4.1.2 \
generate \
-i /local/openapi.yaml\
-g python-flask \
Expand Down