From 5f08b4172469c812c9df4f30a38e70956f8171f2 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Wed, 3 Aug 2022 09:06:21 +0200 Subject: [PATCH] add SwaggerUI --- README.md | 7 ++++--- build.gradle | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e4bd4f02..319988be 100644 --- a/README.md +++ b/README.md @@ -60,13 +60,14 @@ If you have at least Docker, the Java JDK and Gradle installed in appropriate ve -d '{ "prefix":"baa", "reference":80001, "adminUserName":"admin@baa.example.com" }' \ -X POST http://localhost:8080/api/customers -**ⓘ** -'mike@hostsharing.net' and 'sven@hostsharing.net' are Hostsharing hostmaster accounts coming from the example data which is automatically inserted in Testcontainers and Development environments. +If you wonder who 'mike@hostsharing.net' and 'sven@hostsharing.net' are and where the data comes from: +Mike and Sven are just example Hostsharing hostmaster accounts as part of the example data which is automatically inserted in Testcontainers and Development environments. Also try for example 'admin@aaa.example.com' or 'unknown@example.org'. -**ⓘ** If you want a formatted JSON output, you can pipe the result to `jq` or similar. +And to see the full, currently implemented, API, open http://localhost:8080/swagger-ui/index.html. + If you still need to install some of these tools, find some hints in the next chapters. diff --git a/build.gradle b/build.gradle index f2325df4..22b61874 100644 --- a/build.gradle +++ b/build.gradle @@ -28,6 +28,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-hateoas' implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springdoc:springdoc-openapi-ui:1.6.9' implementation 'org.liquibase:liquibase-core' implementation 'org.springframework.data:spring-data-rest-hal-explorer' implementation 'com.vladmihalcea:hibernate-types-55:2.17.1'