Skip to content

Commit

Permalink
chore: Test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-touret committed Jan 31, 2024
1 parent 511948d commit bb5f96a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ subprojects {
bootJar {
enabled = true
}
test {
useJUnitPlatform()
include("**/*IT*")
include("**/Tests*")
}
}
project(':rest-book') {
apply plugin: 'org.openapi.generator'
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 @@ -4,7 +4,7 @@

> [!IMPORTANT]
> This chapter covers the following topics:
> 1. Pinpoint the impacts of the versioning in the OPENAPI Description file
> 1. Pinpoint the impacts of the versioning on the OPENAPI Description file
> 2. Implement a URL Based versioning
> 3. Implement a header based versioning
> 4. Deploy and configure a default version for your API
Expand Down Expand Up @@ -78,7 +78,7 @@ booknumbers:
#### Rest-Number
**CHECK** and modify the [rest-number's openAPI descriptor file](../rest-number/src/main/resources/openapi.yml) to indicate
**CHECK** and **UPDATE** the [rest-number's openAPI descriptor file](../rest-number/src/main/resources/openapi.yml) to indicate
the version:
```yaml
Expand All @@ -90,7 +90,7 @@ servers:
- url: http://localhost:8081/v1
```
**CHECK** the [rest-number configuration file](../config-server/src/main/resources/config/rest-number.yml) and the contex
**CHECK** the [rest-number configuration file](../config-server/src/main/resources/config/rest-number.yml) and the context
path:
```yaml
Expand Down
8 changes: 7 additions & 1 deletion docs/03-second_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ book:
limit: 10
```
Restart (**RUN**) the config server
```jshelllanguage
./gradlew bootRun -p config-server
```

## Running it

Now, you can start your new module, **RUN**:
Expand All @@ -196,7 +202,7 @@ You can test it and especially the new feature, **RUN**:
http :8082/v1/books --print b | jq '. | length'
```

You **MUST** only get ten elements.
You **MUST** only get up to ten elements.

> [!NOTE]
> In this chapter, we added a new feature creating a new version.
Expand Down
6 changes: 3 additions & 3 deletions docs/04-scm.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Test it using these HTTP requests:
```jshelllanguage
http :8888/rest-book/v1 --print b | jq ' .propertySources[0].source' | jq '."server.servlet.context-path"'
```
You must get this output:
You **MUST** get this output:

```jshelllanguage
"/v1"
Expand All @@ -60,7 +60,7 @@ and
```jshelllanguage
http :8888/rest-book/v2 --print b | jq ' .propertySources[0].source."server.servlet.context-path"'
```
You must get this output:
You **MUST** get this output:

```jshelllanguage
"/v2"
Expand All @@ -84,7 +84,7 @@ spring.profiles.active=v2

### OpenAPI

**UPDATE** [the rest-book v1 OpenAPI description file](../rest-book/src/main/resources/openapi.yml) to specify the new version:
**CHECK** [the rest-book v1 OpenAPI description file](../rest-book/src/main/resources/openapi.yml) to specify the new version:

```yaml
openapi: 3.0.0
Expand Down
4 changes: 2 additions & 2 deletions docs/05-conflicts.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Rename the fied ``author`` to ``authors`` and define it like this:
$ref: '#/components/schemas/Author'
```
Now, create the Author object below the ``Maintenance`` object:
Now, create the ``Author`` object below the ``Maintenance`` object:
```yaml
Author:
Expand Down Expand Up @@ -293,7 +293,7 @@ import info.touret.bookstore.spring.book.repository.AuthorRepository;

### Import data

You can remove all the data located in [``import.sql.ORI``](../rest-book-2/src/main/resources/import.sql.ORI) and replace it by:
You can remove all the data located in [``import.sql``](../rest-book-2/src/main/resources/import.sql) and replace it by:

```sql
INSERT INTO author(id,firstname,lastname,public_id) VALUES (1000,'Antonio','Concalves','7c11e1bf-1c74-4280-812b-cbc6038b7d21');
Expand Down

0 comments on commit bb5f96a

Please sign in to comment.