The Denner Mobile Web Service provides data and functions for the Denner Mobile Apps.
GET /featured-articles
(Startseitenartikel, example)GET /online-filters
(Angebotsfilter, example)GET /online-filters/{id}/online-publications
(Werbemittel, example)GET /online-filters/{id}/online-groups
(Internet-Sortimente, example)
GET /banners
(Banner, example)
To see the documentation page Swagger UI visit http://denner-mobile-api-docs.detailnet.ch/ or
for development start the Docker instance that presents the static HTML pages in /docs
(lando start
and then view http://denner-mobile-api-spec.detailnet.me/)
To build the specification we're using swagger-codegen.
Run the following commands to install swagger-codgen and it's dependencies in a separate directory:
cd ..
git clone git@github.com:swagger-api/swagger-codegen.git
sudo apt-get install maven
sudo apt install openjdk-11-jdk
cd swagger-codegen
git fetch origin 3.0.0:3.0.0
git checkout 3.0.0
# export JDK_JAVA_OPTIONS=-Djdk.attach.allowAttachSelf=true .. not sure if really needed
mvn clean package
Once installed, openapi.json
can be generated as follows:
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
-i ../denner-mobile-api-spec/src/swagger.yml \
-l openapi \
-o ../denner-mobile-api-spec/docs
The file will be located at docs/openapi.json
.
Important: after generation revert the servers section at beginning of docs/openapi.json
You can then review the changes in the local browser (lando start
and then view http://denner-mobile-api-spec.detailnet.me/) and commit them.
To compile the stylesheets for the swagger docs, globally install npm sass with install -g sass
and run sass:
sass docs/style/main.scss docs/swagger-ui.css --style=compressed
For continuous watch and build during development run:
sass docs/style/main.scss docs/swagger-ui.css --watch