Add java client build

This commit is contained in:
Egor Cherniak 2022-05-30 11:14:02 +03:00
parent b697f77b8f
commit 9bd4e85cc7
No known key found for this signature in database
GPG Key ID: 26F47333B7BE4ED9
5 changed files with 264 additions and 11 deletions

28
.github/workflows/build-client-jar.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Build java client
on:
- pull_request
env:
NODEJS_VERSION: '16'
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Maven
uses: actions/setup-java@v3
with:
java-version: '15'
distribution: 'adopt'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: npm
- run: npm install
- name: Bundle specification
run: npm run build
- name: Build client jar
run: mvn --batch-mode clean package -f pom.xml -P="client"

View File

@ -0,0 +1,28 @@
name: Release java client
on:
- pull_request
env:
NODEJS_VERSION: '16'
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Maven
uses: actions/setup-java@v3
with:
java-version: '15'
distribution: 'adopt'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: npm
- run: npm install
- name: Bundle specification
run: npm run build
- name: Release client jar
run: mvn --batch-mode clean install -f pom.xml -P="client"

1
.gitignore vendored
View File

@ -38,6 +38,7 @@ node_modules
# Generated
web_deploy/
target/
# User-specific stuff:
.idea/

197
pom.xml Normal file
View File

@ -0,0 +1,197 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.vality</groupId>
<artifactId>library-parent-pom</artifactId>
<version>1.0.2</version>
</parent>
<artifactId>swag-payments</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<default.package>dev.vality.swag.payments</default.package>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<swagger-annotations-version>1.5.21</swagger-annotations-version>
<jodatime-version>2.7</jodatime-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<jetty-version>9.2.15.v20160210</jetty-version>
<slf4j-version>1.7.21</slf4j-version>
<junit-version>4.13.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<springfox-version>3.0.0</springfox-version>
<jackson-version>2.13.3</jackson-version>
<jackson-threetenbp-version>2.6.4</jackson-threetenbp-version>
<spring-version>5.3.20</spring-version>
<javax.version>1.3.2</javax.version>
<jaxb.version>2.3.1</jaxb.version>
<javax-validation.version>2.0.1.Final</javax-validation.version>
<http-client.version>4.5.13</http-client.version>
</properties>
<dependencies>
<!--Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring-version}</version>
<scope>provided</scope>
</dependency>
<!--SpringFox dependencies-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox-version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${javax-validation.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${http-client.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>server</id>
<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>generate-server</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>web_deploy/swagger.yaml</inputSpec>
<configOptions>
<dateLibrary>java8</dateLibrary>
</configOptions>
<language>spring</language>
<library>spring-mvc</library>
<apiPackage>${default.package}.api</apiPackage>
<modelPackage>${default.package}.model</modelPackage>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>client</id>
<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>generate-client</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>web_deploy/swagger.yaml</inputSpec>
<configOptions>
<dateLibrary>java8</dateLibrary>
</configOptions>
<language>java</language>
<library>resttemplate</library>
<apiPackage>${default.package}.api</apiPackage>
<modelPackage>${default.package}.model</modelPackage>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -2,14 +2,13 @@ description: Создание инструмента вывода в рамка
type: object
allOf:
- $ref: '#/definitions/ContractModification'
- allOf:
- type: object
required:
- payoutToolID
properties:
payoutToolID:
description: Идентификатор средства вывода
type: string
maxLength: 40
minLength: 1
- $ref: '#/definitions/PayoutToolParams'
- type: object
required:
- payoutToolID
properties:
payoutToolID:
description: Идентификатор средства вывода
type: string
maxLength: 40
minLength: 1
- $ref: '#/definitions/PayoutToolParams'