diff --git a/.github/workflows/publish-documentation.yaml b/.github/workflows/publish-documentation.yaml index b21dc78dd4..dc3ea64e2f 100644 --- a/.github/workflows/publish-documentation.yaml +++ b/.github/workflows/publish-documentation.yaml @@ -45,11 +45,6 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - - name: Build API documentation with Maven - run: | - mvn clean package -pl irs-common,irs-models,irs-policy-store,irs-testing,irs-edc-client,irs-registry-client,irs-api -DskipTests --batch-mode - cp irs-api/target/generated-sources/openapi/index.html docs/src/docs/api-specification/index.html - - name: Build with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any @@ -112,10 +107,26 @@ jobs: run: | mv docs/src/diagram-replacer/assets/ docs/target/generated-docs/assets/ + - name: Generate Swagger UI + uses: Legion2/swagger-ui-action@v1 + with: + output: swagger-ui + spec-file: docs/src/api/irs-api.yaml + - name: Update documentation on GitHub Pages if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3.9.3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: "./docs/target/generated-docs" destination_dir: "docs" + + - name: Deploy Swagger UI to GitHub Pages + if: github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: "swagger-ui" + destination_dir: "docs/swagger-ui" + + diff --git a/docs/src/docs/api-specification/api-specification.adoc b/docs/src/docs/api-specification/api-specification.adoc deleted file mode 100644 index d12cda4300..0000000000 --- a/docs/src/docs/api-specification/api-specification.adoc +++ /dev/null @@ -1,5 +0,0 @@ -= API specification - -:toc: - -include::api.adoc[leveloffset=1] \ No newline at end of file diff --git a/docs/src/docs/api-specification/api.adoc b/docs/src/docs/api-specification/api.adoc deleted file mode 100644 index 6b3235b426..0000000000 --- a/docs/src/docs/api-specification/api.adoc +++ /dev/null @@ -1,5 +0,0 @@ -= OpenAPI Specification - -++++ -include::index.html[] -++++ diff --git a/docs/src/docs/api-specification/index.html b/docs/src/docs/api-specification/index.html deleted file mode 100644 index bb1634c9d5..0000000000 --- a/docs/src/docs/api-specification/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - -
-This will be automatically generated when workflow "publish-documentation.yaml" is executed.
- - diff --git a/docs/src/docs/index.adoc b/docs/src/docs/index.adoc index 42ba1b47a3..787214f3f2 100644 --- a/docs/src/docs/index.adoc +++ b/docs/src/docs/index.adoc @@ -3,8 +3,8 @@ == Administration Guide xref:administration/administration-guide.adoc[] -== API-Documentation -xref:api-specification/api-specification.adoc[OpenApi specification] +== Swagger-UI +xref:swagger-ui/index.adoc[Swagger-UI] == Architecture Documentation (arc42) - xref:arc42/index.adoc[Single chapters] diff --git a/docs/src/docs/swagger-ui/index.adoc b/docs/src/docs/swagger-ui/index.adoc new file mode 100644 index 0000000000..dd7fc44618 --- /dev/null +++ b/docs/src/docs/swagger-ui/index.adoc @@ -0,0 +1,13 @@ += Swagger-UI + +== NOTICE + +This work is licensed under the https://www.apache.org/licenses/LICENSE-2.0[Apache-2.0]. + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2021, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +- SPDX-FileCopyrightText: 2022, 2023 BOSCH AG +- SPDX-FileCopyrightText: 2021, 2022 ZF Friedrichshafen AG +- SPDX-FileCopyrightText: 2022 ISTOS GmbH +- SPDX-FileCopyrightText: 2021, 2023 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/item-relationship-service \ No newline at end of file