[go: nahoru, domu]

Skip to content

Commit

Permalink
update docs and labs
Browse files Browse the repository at this point in the history
  • Loading branch information
andifalk committed Jun 4, 2019
1 parent b11f0c7 commit f3493b8
Show file tree
Hide file tree
Showing 33 changed files with 984 additions and 678 deletions.
142 changes: 71 additions & 71 deletions docs/api-doc.html

Large diffs are not rendered by default.

758 changes: 457 additions & 301 deletions docs/workshop-tutorial.html

Large diffs are not rendered by default.

Binary file modified docs/workshop-tutorial.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.filter(
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
.withRequestDefaults(prettyPrint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.filter(
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
.withRequestDefaults(prettyPrint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.filter(
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
.withRequestDefaults(prettyPrint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.filter(
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
.withRequestDefaults(prettyPrint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import static org.springframework.restdocs.webtestclient.WebTestClientRestDocumentation.document;
import static org.springframework.restdocs.webtestclient.WebTestClientRestDocumentation.documentationConfiguration;
import static org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.csrf;
import static org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.springSecurity;

@ExtendWith({RestDocumentationExtension.class, SpringExtension.class})
@WebFluxTest
Expand All @@ -63,8 +62,8 @@ class BookApiDocumentationTest {
void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.apply(springSecurity())
.configureClient()
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.filter(
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
.withRequestDefaults(prettyPrint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
WebTestClient.bindToApplicationContext(applicationContext)
.apply(springSecurity())
.configureClient()
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.filter(
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
.withRequestDefaults(prettyPrint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
WebTestClient.bindToApplicationContext(applicationContext)
.apply(springSecurity())
.configureClient()
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
this.webTestClient =
WebTestClient.bindToApplicationContext(applicationContext)
.configureClient()
.filter(
.baseUrl("http://localhost:9091")
.filter(
documentationConfiguration(restDocumentation)
.operationPreprocessors()
.withRequestDefaults(prettyPrint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import static org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction.clientRegistrationId;

@Controller
@RequestMapping("/users")
public class UserController {
Expand All @@ -44,7 +42,6 @@ Flux<UserResource> allUsers() {
return webClient
.get()
.uri(libraryServer + "/users")
.attributes(clientRegistrationId("keycloak"))
.retrieve()
.onStatus(
httpStatus -> HttpStatus.FORBIDDEN.value() == httpStatus.value(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h1>Library Client</h1>
<hr>

<div class="jumbotron">
<a class="btn btn-primary" href="#" role="button" th:href="@{/createbook}"
th:unless="${isCurator}">Create Book</a>
<a class="btn btn-primary" href="#" role="button" th:unless="${isCurator}"
th:href="@{/createbook}">Create Book</a>
</div>

<table class="table table-striped">
Expand All @@ -47,11 +47,10 @@ <h1>Library Client</h1>
<td th:text="${bookResource.description}">descr</td>
<td th:text="${bookResource.isbn}">isbn</td>
<td><a class="btn btn-primary" href="#" role="button"
th:href="@{'/return?identifier=' + ${bookResource.id}}"
th:unless="${!bookResource.borrowed}">Return</a><a class="btn btn-primary" href="#"
role="button"
th:href="@{'/borrow?identifier=' + ${bookResource.id}}"
th:unless="${bookResource.borrowed}">Borrow</a>
th:href="@{'/return?identifier=' + ${bookResource.id}}" th:unless="${!bookResource.borrowed}">Return</a><a class="btn btn-primary" href="#"
role="button"
th:href="@{'/borrow?identifier=' + ${bookResource.id}}"
th:unless="${bookResource.borrowed}">Borrow</a>
</td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit f3493b8

Please sign in to comment.