Skip to content
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
89 changes: 55 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,55 @@
name: Build and Check
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- develop
jobs:
build:
name: Build
uses: Logius-standaarden/Automatisering/.github/workflows/build.yml@main
check:
needs: build
name: Check
uses: Logius-standaarden/Automatisering/.github/workflows/check.yml@main
publish:
needs: build
name: Publish (Logius)
uses: Logius-standaarden/Automatisering/.github/workflows/publish.yml@main
secrets: inherit
spectral_linter:
needs: build
name: Spectral linter test cases
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Run test suite
run: |
npm install -g @stoplight/spectral-cli
node linter/run-linter-tests.mjs
name: Build and Check
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- develop
jobs:
build:
name: Build
uses: Logius-standaarden/Automatisering/.github/workflows/build.yml@main
check:
needs: build
name: Check
uses: Logius-standaarden/Automatisering/.github/workflows/check.yml@main
publish:
needs: build
name: Publish (Logius)
uses: Logius-standaarden/Automatisering/.github/workflows/publish.yml@main
secrets: inherit
spectral_linter:
needs: build
name: Spectral linter test cases
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Run test suite
run: |
npm install -g @stoplight/spectral-cli
node linter/run-linter-tests.mjs
examples_linter:
needs: spectral_linter
name: Examples linter tests
runs-on: ubuntu-22.04
strategy:
matrix:
# Minimum supported and maximum available.
example: [ quarkus ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Install Spectral
run: npm install -g @stoplight/spectral-cli
- name: Run linter on ${{ matrix.example }} example
run: ./examples/${{ matrix.example }}/build-and-check-project.sh
5 changes: 0 additions & 5 deletions examples/quarkus/.dockerignore

This file was deleted.

61 changes: 7 additions & 54 deletions examples/quarkus/README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,15 @@
# code-with-quarkus
# Quarkus example

This project uses Quarkus, the Supersonic Subatomic Java Framework.
Dit project gebruikt Quarkus: <https://quarkus.io/>, een Java framework waarmee onder andere API's kunnen worden gebruikt.

If you want to learn more about Quarkus, please visit its website: <https://quarkus.io/>.

## Running the application in dev mode

You can run your application in dev mode that enables live coding using:

```shell script
./mvnw quarkus:dev
```

> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at <http://localhost:8080/q/dev/>.

## Packaging and running the application

The application can be packaged using:
Om het project te bouwen en een `openapi.json` te genereren, run het volgende:

```shell script
./mvnw package
```

It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.

The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.

If you want to build an _über-jar_, execute the following command:

```shell script
./mvnw package -Dquarkus.package.jar.type=uber-jar
```

The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.

## Creating a native executable

You can create a native executable using:

```shell script
./mvnw package -Dnative
```

Or, if you don't have GraalVM installed, you can run the native executable build in a container using:

```shell script
./mvnw package -Dnative -Dquarkus.native.container-build=true
```

You can then execute your native executable with: `./target/code-with-quarkus-1.0.0-SNAPSHOT-runner`

If you want to learn more about building native executables, please consult <https://quarkus.io/guides/maven-tooling>.

## Provided Code

### REST

Easily start your REST Web Services
Dit genereert `target/generated/openapi/openapi.json` op basis van de classes in [`src/main/java/org/acme/`](src/main/java/org/acme/).
Daar kun je de verscheidene annotations bekijken die gebruikt worden om API's te documenteren.
Tevens is er enkele configuratie vereist in [`src/main/resources/application.properties`](src/main/resources/application.properties) om Quarkus goed in te stellen.

[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)
Met deze annotations en configuratie voldoet het example aan alle regels van de API Design Rules.
8 changes: 8 additions & 0 deletions examples/quarkus/build-and-check-project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
CURRENT_DIRECTORY=$(dirname "$0")

cd $CURRENT_DIRECTORY

./mvnw --no-transfer-progress package

../run-spectral-linter.sh $(realpath target/generated/openapi/openapi.json)
4 changes: 0 additions & 4 deletions examples/quarkus/run-spectral-linter.sh

This file was deleted.

98 changes: 0 additions & 98 deletions examples/quarkus/src/main/docker/Dockerfile.jvm

This file was deleted.

94 changes: 0 additions & 94 deletions examples/quarkus/src/main/docker/Dockerfile.legacy-jar

This file was deleted.

Loading