From 9bd4e85cc707ab15dd7556597ef979ce9c509e7b Mon Sep 17 00:00:00 2001 From: Egor Cherniak Date: Mon, 30 May 2022 11:14:02 +0300 Subject: [PATCH] Add java client build --- .github/workflows/build-client-jar.yml | 28 +++ .github/workflows/release-client-jar.yml | 28 +++ .gitignore | 1 + pom.xml | 197 ++++++++++++++++++ .../ContractPayoutToolCreation.yaml | 21 +- 5 files changed, 264 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build-client-jar.yml create mode 100644 .github/workflows/release-client-jar.yml create mode 100644 pom.xml diff --git a/.github/workflows/build-client-jar.yml b/.github/workflows/build-client-jar.yml new file mode 100644 index 0000000..99a28e4 --- /dev/null +++ b/.github/workflows/build-client-jar.yml @@ -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" \ No newline at end of file diff --git a/.github/workflows/release-client-jar.yml b/.github/workflows/release-client-jar.yml new file mode 100644 index 0000000..b085801 --- /dev/null +++ b/.github/workflows/release-client-jar.yml @@ -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" \ No newline at end of file diff --git a/.gitignore b/.gitignore index b435661..b5ff071 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ node_modules # Generated web_deploy/ +target/ # User-specific stuff: .idea/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..5cf3a08 --- /dev/null +++ b/pom.xml @@ -0,0 +1,197 @@ + + + 4.0.0 + + + dev.vality + library-parent-pom + 1.0.2 + + + swag-payments + 1.0.0-SNAPSHOT + jar + + + dev.vality.swag.payments + UTF-8 + 1.5.21 + 2.7 + 1.0.0 + 1.8 + ${java.version} + ${java.version} + 9.2.15.v20160210 + 1.7.21 + 4.13.1 + 2.5 + 3.0.0 + 2.13.3 + 2.6.4 + 5.3.20 + 1.3.2 + 2.3.1 + 2.0.1.Final + 4.5.13 + + + + + + org.springframework + spring-core + ${spring-version} + provided + + + org.springframework + spring-webmvc + ${spring-version} + provided + + + org.springframework + spring-web + ${spring-version} + provided + + + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + com.fasterxml.jackson.core + jackson-annotations + + + org.mapstruct + mapstruct + + + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + + junit + junit + ${junit-version} + test + + + javax.servlet + servlet-api + ${servlet-api-version} + provided + + + javax.annotation + javax.annotation-api + ${javax.version} + + + javax.xml.bind + jaxb-api + ${jaxb.version} + + + + javax.validation + validation-api + ${javax-validation.version} + provided + + + + org.apache.httpcomponents + httpclient + ${http-client.version} + test + + + + + + server + + + + io.swagger + swagger-codegen-maven-plugin + 2.3.1 + + + generate-server + generate-sources + + generate + + + web_deploy/swagger.yaml + + java8 + + + spring + spring-mvc + + ${default.package}.api + ${default.package}.model + + + + + + + + + client + + + + io.swagger + swagger-codegen-maven-plugin + 2.3.1 + + + generate-client + generate-sources + + generate + + + web_deploy/swagger.yaml + + java8 + + + java + resttemplate + + ${default.package}.api + ${default.package}.model + + + + + + + + + + + diff --git a/spec/definitions/ContractPayoutToolCreation.yaml b/spec/definitions/ContractPayoutToolCreation.yaml index 63d237e..b8c5161 100644 --- a/spec/definitions/ContractPayoutToolCreation.yaml +++ b/spec/definitions/ContractPayoutToolCreation.yaml @@ -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'