Skip to content

Commit

Permalink
fix: some remarks raised during Codeurs en Seine (1st round)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-touret committed Dec 15, 2023
1 parent ae34d15 commit e65bfb8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Empty file modified bin/secureRandomBook-header.sh
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions docs/01-without_versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ At this point we have our first customer : **John Doe** who uses our API with th

## Prerequisites

You have to start three new shells and run [rest-book](../rest-book), [rest-number](../rest-number) and [the gateway](../gateway) modules.
You must start three new shells and run [rest-book](../rest-book), [rest-number](../rest-number) and [the gateway](../gateway) modules.
As mentioned earlier, you must be at the root of the project (i.e., ``rest-apis-versioning-workshop``).

In the first shell, run:
Expand Down Expand Up @@ -238,7 +238,7 @@ public ResponseEntity<String> getBookExcerpt(Long id) {
Build it again:

```jshelllanguage
./gradlew build-p rest-book
./gradlew build -p rest-book
```

You have now added new data and functionality to your API without any version :exclamation:
Expand All @@ -260,7 +260,7 @@ i.e., without the ``exceprt`` attribute).
Run it, check the log output provided by [LogBook](https://github.com/zalando/logbook/).

```jshelllanguage
./gradlew-p rest-book test
./gradlew -p rest-book test
```
Check the [test log file](../rest-book/build/test-results/test/TEST-info.touret.bookstore.spring.book.controller.OldBookControllerIT.xml) and search the HTTP logs

Expand Down
6 changes: 3 additions & 3 deletions docs/02-first_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We will define in this chapter our first version in the URI and in a header mixi
## URI based version

In the current rest-book version,we have already defined define the version in the BookController's URI.
In the current rest-book version,we have already defined the version in the BookController's URI.

The pattern is ``/api/%VERSION%/books``.
For instance, we could have ``/api/v1/books``.
Expand Down Expand Up @@ -190,10 +190,10 @@ In this chapter, we will put in place a rewrite/redirection mechanism in the gat
regarding a header.

For this workshop we will extract the ``X-API-VERSION`` HTTP header and route to the appropriate backend.
For instance if we reach the API as following:
For instance if we reach the API as following :

```jshelllanguage
http :8080/books/count "X-API-VERSION: v1"
http :8080/... "X-API-VERSION: v1"
```
Our gateway will rewrite the URL and reach the good version (i.e., the version specified by the header).

Expand Down

0 comments on commit e65bfb8

Please sign in to comment.