Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cf70002
Add api module
testower Mar 3, 2025
12840cd
Update schema
testower Mar 6, 2025
18fdc90
fix: use nullable not required
testower Mar 6, 2025
dcc765d
Update schema
testower Mar 11, 2025
782a489
Make feed url required in schema
testower May 5, 2025
630082b
Implement according to spec
testower May 5, 2025
6a5c260
In case of multiple language, only add discovery file once to result set
testower May 5, 2025
7924878
Skip setting language field on discovery file
testower May 5, 2025
c1e4e73
Adds keyword to result
testower May 6, 2025
59a83f3
Add url to result
testower May 6, 2025
1726cc7
Fix compilation errors
testower May 8, 2025
9f94a67
Remove params from schema
testower May 9, 2025
dce59c5
Fix file name for discovery file
testower May 9, 2025
2eedc1d
Use apache http client and implement connection pooling
testower May 9, 2025
6008717
Fix casting to Map
testower May 9, 2025
ae2af2e
Force plugin to not generate test file
testower May 10, 2025
05ec910
Add jackson annotations dependency
testower May 10, 2025
8573fd2
Run mvn package instead of verify
testower May 10, 2025
6534329
Use consistent junit version
testower May 10, 2025
6cd633e
Use install instead of package
testower May 10, 2025
29697b3
Use correct version
testower May 10, 2025
a13dfc0
Merge branch 'master' into feature/api-module
testower May 10, 2025
1891234
feat: Add systemErrors to GbfsFile for loader and parser issues
google-labs-jules[bot] May 27, 2025
58cf65e
fix: Correct compilation errors from previous commit
google-labs-jules[bot] May 27, 2025
e2cadf9
Fix(build): Resolve compilation and test execution errors (#1)
testower May 27, 2025
0c9df8f
Merge pull request #133 from testower/feat/system-errors
testower May 27, 2025
9f417ed
feat: Implement authentication for fetching GBFS files
google-labs-jules[bot] May 28, 2025
cec34fb
Merge pull request #135 from testower/feat/gbfs-auth
testower Jun 2, 2025
6613050
Cleanup after jules
testower Jun 5, 2025
7af305c
Fix module versioning
testower Jun 6, 2025
39d9e6b
Remove gitflow plugin
testower Jun 6, 2025
3981618
Remove versions plugin
testower Jun 6, 2025
a569866
Use same parent in api module
testower Jun 6, 2025
02b2370
Use parents version
testower Jun 6, 2025
80e0991
Merge branch 'master' into feature/api-module
testower Jun 6, 2025
7f18539
Set compiler source and target
testower Jun 6, 2025
cf5a5eb
feat: Create fat jar for gbfs-validator-java-api
google-labs-jules[bot] Jun 17, 2025
dbd2754
Merge pull request #137 from MobilityData/feature/create-fat-jar
testower Jun 18, 2025
d06b4a6
Fix cors and security auto configuration
testower Jun 19, 2025
5ca5293
Merge branch 'feature/api-module' of github.com:entur/gbfs-validator-…
testower Jun 19, 2025
488ed03
Merge branch 'master' into feature/api-module
testower Oct 3, 2025
c494a30
Inject loader as bean
testower Oct 3, 2025
7fbdf02
Inject configurable properties
testower Oct 3, 2025
0917ef3
Remove hard-coded customer headers
testower Oct 3, 2025
437c2bd
Replace excessive ai commentary with javadoc
testower Oct 3, 2025
5462cb1
Inject version from build properties
testower Oct 3, 2025
a2c1810
Fix versions
testower Oct 3, 2025
5c4f415
Remove unnecessary comment
testower Oct 3, 2025
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
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ jobs:
${{ runner.os }}-maven-
${{ runner.os }}-
- name: Run maven build
run: mvn verify

run: mvn install
33 changes: 33 additions & 0 deletions gbfs-validator-java-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
8 changes: 8 additions & 0 deletions gbfs-validator-java-api/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ${project.baseDir}/.openapi-generator-ignore

# https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#ignore-file-format
#
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

**/OpenApiGeneratorApplicationTests.java
288 changes: 288 additions & 0 deletions gbfs-validator-java-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.entur.gbfs</groupId>
<artifactId>gbfs-validator-java-parent</artifactId>
<version>2.0.49-SNAPSHOT</version>
</parent>

<artifactId>gbfs-validator-java-api</artifactId>
<name>gbfs-validator-java-api</name>
<description>gbfs-validator-java-api</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<junit.version>5.10.2</junit.version>
<mockito.version>5.11.0</mockito.version>
<junit-platform.version>1.10.2</junit-platform.version>
<openapi-generator-maven-plugin>6.0.0</openapi-generator-maven-plugin>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.4.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.28</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api -->
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>3.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>

<!-- Add Jackson annotations dependency -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.16.1</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.6.0</version>
</dependency>

<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>0.2.6</version>
</dependency>

<dependency>
<groupId>org.entur.gbfs</groupId>
<artifactId>gbfs-validator-java-loader</artifactId>
<version>2.0.49-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.entur.gbfs</groupId>
<artifactId>gbfs-validator-java</artifactId>
<version>2.0.49-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- JUnit dependencies with aligned versions -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
<scope>test</scope>
</dependency>

<!-- Spring Boot Test dependencies -->
<!-- Version managed by spring-boot-dependencies -->
<!-- JUnit version managed by properties -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>

<!-- Jetty servlet dependency required by Spring Boot Test -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.4.53.v20231009</version>
<scope>test</scope>
</dependency>

<!-- Jetty util dependency required by Spring Boot Test -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>9.4.53.v20231009</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.4.3</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>17</source>
<target>17</target>
<release>17</release>
</configuration>
</plugin>

<!-- Configure Surefire plugin for JUnit 5 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<useModulePath>false</useModulePath>
</configuration>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${junit-platform.version}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator-maven-plugin}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/public/openapi.yaml</inputSpec>
<generatorName>spring</generatorName>
<output>${project.build.directory}/generated-sources/openapi</output>
<apiPackage>org.entur.gbfs.validator.api.gen</apiPackage>
<modelPackage>org.entur.gbfs.validator.api.model</modelPackage>
<invokerPackage>org.entur.gbfs.validator.api.handler</invokerPackage>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<ignoreFileOverride>${project.basedir}/.openapi-generator-ignore</ignoreFileOverride>
<configOptions>
<delegatePattern>true</delegatePattern>
<interfaceOnly>false</interfaceOnly>
<skipDefaultInterface>false</skipDefaultInterface>
<dateLibrary>java8</dateLibrary>
<useOneOfInterfaces>false</useOneOfInterfaces>
<useOneOfDiscriminatorLookup>true</useOneOfDiscriminatorLookup>
<!-- <useEnumForDiscriminator>true</useEnumForDiscriminator>-->
<!-- <useOneOfInterfaces>true</useOneOfInterfaces>-->
</configOptions>
<typeMappings>
<typeMapping>Double=java.math.BigDecimal</typeMapping>
</typeMappings>
<!-- <library>spring-boot</library>-->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
*
* *
* *
* * * Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
* * * the European Commission - subsequent versions of the EUPL (the "Licence");
* * * You may not use this work except in compliance with the Licence.
* * * You may obtain a copy of the Licence at:
* * *
* * * https://joinup.ec.europa.eu/software/page/eupl
* * *
* * * Unless required by applicable law or agreed to in writing, software
* * * distributed under the Licence is distributed on an "AS IS" basis,
* * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * * See the Licence for the specific language governing permissions and
* * * limitations under the Licence.
* *
*
*/

package org.entur.gbfs.validator.api.handler;

import org.entur.gbfs.validator.loader.Loader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class LoaderConfiguration {

@Bean
public Loader loader(LoaderProperties properties) {
return new Loader(
properties.getHttp().getMaxTotalConnections(),
properties.getHttp().getMaxConnectionsPerRoute(),
properties.getHttp().getConnectTimeoutSeconds(),
properties.getHttp().getResponseTimeoutSeconds(),
properties.getThreadPool().getSize(),
properties.getHttp().getHeaders()
);
}
}
Loading