refactor: Fix yellow code smells #27

Merged
jank merged 11 commits from refactor/fix-yellow-code-smells into main 2024-10-02 08:43:02 +00:00
Showing only changes of commit e237e5741e - Show all commits

@ -1,7 +1,6 @@
package de.szut.lf8_starter.config;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
@ -33,15 +32,33 @@ public class OpenAPIConfiguration {
.addServersItem(new Server().url(this.context.getContextPath()))
.info(new Info()
.title("LF8 project starter")
.description("\n## Auth\n" +
"\n## Authentication\n" + "\nThis Hello service uses JWTs to authenticate requests. You will receive a bearer token by making a POST-Request in IntelliJ on:\n\n" +
"\n" +
"```\nPOST http://keycloak.szut.dev/auth/realms/szut/protocol/openid-connect/token\nContent-Type: application/x-www-form-urlencoded\ngrant_type=password&client_id=employee-management-service&username=user&password=test\n```\n" +
"\n" +
"\nor by CURL\n" +
"```\ncurl -X POST 'http://keycloak.szut.dev/auth/realms/szut/protocol/openid-connect/token'\n--header 'Content-Type: application/x-www-form-urlencoded'\n--data-urlencode 'grant_type=password'\n--data-urlencode 'client_id=employee-management-service'\n--data-urlencode 'username=user'\n--data-urlencode 'password=test'\n```\n" +
"\nTo get a bearer-token in Postman, you have to follow the instructions in \n [Postman-Documentation](https://documenter.getpostman.com/view/7294517/SzmfZHnd).")
.description("""
## Auth
## Authentication
This Hello service uses JWTs to authenticate requests. You will receive a bearer token by making a POST-Request in IntelliJ on:
```
POST http://keycloak.szut.dev/auth/realms/szut/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded
grant_type=password&client_id=employee-management-service&username=user&password=test
```
or by CURL:
```
curl -X POST 'http://keycloak.szut.dev/auth/realms/szut/protocol/openid-connect/token'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'grant_type=password'
--data-urlencode 'client_id=employee-management-service'
--data-urlencode 'username=user'
--data-urlencode 'password=test'
```
To get a bearer-token in Postman, you have to follow the instructions in
[Postman-Documentation](https://documenter.getpostman.com/view/7294517/SzmfZHnd).
""")
.version("0.1"))
.addSecurityItem(new SecurityRequirement().addList(securitySchemeName))
.components(