Skip to content

detailnet/denner-mobile-api-spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Denner Mobile API Spec

Data and resources

The Denner Mobile Web Service provides data and functions for the Denner Mobile Apps.

Stores

  • GET /stores (Filialen, example)
  • GET /store-filters (Filialfilter, example)

Promotions

  • 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)

Banners

Documentation and Building

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/)

Building

To build the specification we're using swagger-codegen.

Using Ubuntu on WSL2

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

JSON (used to update docs page too)

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.

Compiling Stylesheets

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

About

API Specification for Denner Mobile Web Service.

Resources

Stars

Watchers

Forks

Packages

No packages published