diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..fff59aa --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,35 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17', '21' ] + name: Build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + cache: maven + - name: Build with Maven + run: | + mvn -v + mvn -B package --file pom.xml diff --git a/.gitignore b/.gitignore index dabc478..c6c98eb 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ tmp/ hs_err_pid* # IntelliJ IDEA +**/*.iml **/.idea/artifacts/ **/.idea/codeStyles/ **/.idea/dictionaries/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8e0adbb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: java - -# this uses Ubuntu 18.04 (Bionic Beaver) as environment, with JDK openjdk11 and maven 3.6.0 -dist: bionic - -script: mvn verify diff --git a/README.adoc b/README.adoc index fccd70c..0746086 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,6 @@ = OpenAPI - code first or design first? -image:https://travis-ci.org/pe-st/apidocs.svg?branch=master["Build Status", link="https://travis-ci.org/pe-st/apidocs"] +image:https://github.com/pe-st/apidocs/actions/workflows/maven/badge.svg?branch=feature%2Fupdates["Build Status"] == Overview @@ -16,13 +16,12 @@ between the design-first and code-first approach. Accompanying presentation at https://www.eclipsecon.org/europe2019[eclipsecon Europe 2019] : https://www.eclipsecon.org/europe2019/sessions/microprofile-openapi-code-first-or-design-first[MicroProfile OpenAPI - code first or design first?] -The examples use https://quarkus.io/[Quarkus] and https://openliberty.io/[OpenLiberty] as servers -just because they not only support MicroProfile OpenAPI, but come also with an integrated UI. +The examples use https://quarkus.io/[Quarkus] as server +just because it not only supports MicroProfile OpenAPI, but comes also with an integrated UI. But the examples should run with very few code changes in any MicroProfile compatible server. === Code First -* link:code-first-openapi-openliberty/README.md[code-first with OpenLiberty server and MicroProfile OpenAPI] * link:code-first-openapi-quarkus/README.md[code-first with Quarkus server and MicroProfile OpenAPI] * link:code-first-swagger/README.md[code-first with Swagger scanner running with Quarkus server] @@ -30,7 +29,6 @@ But the examples should run with very few code changes in any MicroProfile compa * link:design-first-openapi-generator/README.md[design-first with OpenAPI Generator and Quarkus server] * link:design-first-swagger-quarkus/README.md[design-first with Swagger Codegen and Quarkus server] -* link:design-first-swagger-openliberty/README.md[design-first with Swagger Codegen and OpenLiberty server] == Project Structure @@ -48,7 +46,7 @@ when the project dependencies are updated (like it happened when I updated from (the txt suffix protects them from being recognized as Java files by the IDE and being reformatted), allowing to compare the result of openapi-generator and swagger-codegen. -In addition all example projects have a `rest-api.http` file which allows to run some example HTTP +In addition, all example projects have a `rest-api.http` file which allows to run some example HTTP request against a running service directly from within IntelliJ. And there is an `_idea` directory containing the IntelliJ project setup. But you can import the projects easily in any IDE with Maven support. @@ -89,4 +87,3 @@ Code, Documentation and Annotations generated from the same information ** https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md[OpenAPI Specification (OpenAPI Initiative)] ** https://swagger.io/specification/[OpenAPI Specification (Swagger)] * https://quarkus.io/guides/openapi-swaggerui-guide[Quarkus - Using OpenAPI and Swagger UI] -* https://openliberty.io/guides/microprofile-openapi.html[OpenLiberty Guide - Documenting RESTful APIs] diff --git a/_idea/.idea/_idea.iml b/_idea/.idea/_idea.iml deleted file mode 100644 index d6ebd48..0000000 --- a/_idea/.idea/_idea.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/_idea/.idea/compiler.xml b/_idea/.idea/compiler.xml index 38f6db0..6d843b1 100644 --- a/_idea/.idea/compiler.xml +++ b/_idea/.idea/compiler.xml @@ -7,12 +7,10 @@ - + - - diff --git a/_idea/.idea/encodings.xml b/_idea/.idea/encodings.xml index 4d7edf6..435c934 100644 --- a/_idea/.idea/encodings.xml +++ b/_idea/.idea/encodings.xml @@ -2,12 +2,22 @@ - + + + + + + - + + + + + + \ No newline at end of file diff --git a/_idea/.idea/misc.xml b/_idea/.idea/misc.xml index cce673c..26df1c0 100644 --- a/_idea/.idea/misc.xml +++ b/_idea/.idea/misc.xml @@ -101,6 +101,7 @@ +