Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,29 +286,29 @@ client.deleteState(r -> r.activityId("https://example.com/activity/1")

The samples folder in this repository contains [sample applications](samples) that use the xAPI client.

## xAPI Model Spring Boot Autoconfigure
## xAPI Model Spring Boot Starter

The xAPI specification has strict rules for API requests/responses formatting. The xAPI Model has inbuilt validation for all of these rules. However, if you plan to use the xAPI Model, you should keep in mind that some activity providers do not fully conform to these rules.

In some cases it may be desirable to turn off some or all of the rules in order to be compatible with a wider range of xAPI activity providers. However, it should be noted that doing this is in violation of the xAPI specification.

The xAPI Model Spring Boot Autoconfigure package provides an easy way to turn on/off these validation rules.
The xAPI Model Spring Boot Starter package provides an easy way to turn on/off these validation rules.

### Getting started

To use the xAPI Model Spring Boot Autoconfigure include the appropriate XML in the `dependencies` section of your `pom.xml`, as shown in the following example:
To use the xAPI Model Spring Boot Starter include the appropriate XML in the `dependencies` section of your `pom.xml`, as shown in the following example:

```
<dependency>
<groupId>dev.learning.xapi</groupId>
<artifactId>xapi-model-spring-boot-autoconfigure</artifactId>
<artifactId>xapi-model-spring-boot-starter</artifactId>
<version>1.1.5</version>
</dependency>
```

### Configuration

The xAPI Model Spring Boot Autoconfigure has a Spring AutoConfiguration bean which picks up the following properties:
The xAPI Model Spring Boot Starter has a Spring AutoConfiguration bean which picks up the following properties:

| Property | Description |
| ----------------------------------------- | -------------------------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<module>xapi-model</module>
<module>xapi-client</module>
<module>samples</module>
<module>xapi-model-spring-boot-autoconfigure</module>
<module>xapi-model-spring-boot-starter</module>
</modules>
<build>
<pluginManagement>
Expand Down Expand Up @@ -266,7 +266,7 @@
</dependency>
<dependency>
<groupId>dev.learning.xapi</groupId>
<artifactId>xapi-model-spring-boot-autoconfigure</artifactId>
<artifactId>xapi-model-spring-boot-starter</artifactId>
<version>1.1.5-SNAPSHOT</version>
</dependency>
<dependency>
Expand Down
17 changes: 2 additions & 15 deletions samples/xapi-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,13 @@
<description>Basic xAPI Statement Resource implementation</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- If the hibernate validator is on the class path the model will be validated -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<groupId>dev.learning.xapi</groupId>
<artifactId>xapi-model-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>dev.learning.xapi</groupId>
<artifactId>xapi-model</artifactId>
</dependency>
<dependency>
<groupId>dev.learning.xapi</groupId>
<artifactId>xapi-model-spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
<artifactId>xapi-build</artifactId>
<version>1.1.5-SNAPSHOT</version>
</parent>
<artifactId>xapi-model-spring-boot-autoconfigure</artifactId>
<name>xAPI Spring Boot Autoconfigure</name>
<description>learning.dev Spring Boot Autoconfigure</description>
<artifactId>xapi-model-spring-boot-starter</artifactId>
<name>xAPI Spring Boot Starter</name>
<description>learning.dev Spring Boot Starter</description>

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright 2016-2023 Berry Cloud Ltd. All rights reserved.
*/

package dev.learning.xapi;
package dev.learning.xapi.autoconfigure.model;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.cfg.CoercionAction;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev.learning.xapi.autoconfigure.model.XapiModelAutoConfiguration