mirror of
https://github.com/valitydev/swag-dominant-cache.git
synced 2024-11-06 00:15:20 +00:00
Initial swag for dominant-cache
This commit is contained in:
parent
04e3d8acc5
commit
bdde9f87da
60
.gitignore
vendored
Normal file
60
.gitignore
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
# Dir for API portal deploy
|
||||
dist
|
||||
out
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directory
|
||||
node_modules
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# CI
|
||||
.wercker
|
||||
|
||||
# Generated
|
||||
web_deploy/
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/dictionaries
|
||||
.idea/vcs.xml
|
||||
.idea/jsLibraryMappings.xml
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/dataSources.ids
|
||||
.idea/dataSources.xml
|
||||
.idea/dataSources.local.xml
|
||||
.idea/sqlDataSources.xml
|
||||
.idea/dynamic.xml
|
||||
.idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/gradle.xml
|
||||
.idea/libraries
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "build_utils"]
|
||||
path = build_utils
|
||||
url = git@github.com:rbkmoney/build_utils.git
|
18
.redocly.yaml
Normal file
18
.redocly.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# See https://docs.redoc.ly/cli/configuration/ for more information.
|
||||
apiDefinitions:
|
||||
core: "openapi/openapi.yaml"
|
||||
lint:
|
||||
plugins:
|
||||
- './plugins/local.js'
|
||||
extends:
|
||||
- recommended
|
||||
rules:
|
||||
tag-description: off
|
||||
preprocessors:
|
||||
local/merge-schemas: on
|
||||
referenceDocs:
|
||||
showConsole: true
|
||||
layout:
|
||||
scope: section
|
||||
routingStrategy: browser
|
||||
htmlTemplate: ./web/index.html
|
58
Jenkinsfile
vendored
Normal file
58
Jenkinsfile
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
#!groovy
|
||||
// -*- mode: groovy -*-
|
||||
|
||||
build('swag-dominant-cache', 'docker-host') {
|
||||
checkoutRepo()
|
||||
loadBuildUtils('build_utils')
|
||||
|
||||
def pipeDefault
|
||||
def withWsCache
|
||||
def gitUtils
|
||||
runStage('load pipeline') {
|
||||
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
||||
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
||||
withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy")
|
||||
gitUtils = load("${env.JENKINS_LIB}/gitUtils.groovy")
|
||||
}
|
||||
|
||||
pipeDefault() {
|
||||
|
||||
runStage('install-deps') {
|
||||
withWsCache("node_modules") {
|
||||
sh 'make wc_install'
|
||||
}
|
||||
}
|
||||
|
||||
runStage('validate-spec') {
|
||||
sh 'make wc_validate'
|
||||
}
|
||||
|
||||
runStage('bundle') {
|
||||
sh 'make wc_build'
|
||||
}
|
||||
|
||||
// Java
|
||||
runStage('build java client & server') {
|
||||
withCredentials([[$class: 'FileBinding', credentialsId: 'java-maven-settings.xml', variable: 'SETTINGS_XML']]) {
|
||||
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic/')) {
|
||||
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.deploy_client'
|
||||
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.deploy_server'
|
||||
} else {
|
||||
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.compile_client'
|
||||
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.compile_server'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Release
|
||||
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic/')) {
|
||||
runStage('publish release bundle') {
|
||||
dir("web_deploy") {
|
||||
gitUtils.push(commitMsg: "Generated from commit: $COMMIT_ID \n\non $BRANCH_NAME in $RBK_REPO_URL\n\nChanges:\n$COMMIT_MSG",
|
||||
files: "*", branch: "release/$BRANCH_NAME", orphan: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
90
Makefile
Normal file
90
Makefile
Normal file
@ -0,0 +1,90 @@
|
||||
UTILS_PATH := build_utils
|
||||
TEMPLATES_PATH := .
|
||||
|
||||
SERVICE_NAME := swag-dominant-cache
|
||||
BUILD_IMAGE_TAG := 442c2c274c1d8e484e5213089906a4271641d95e
|
||||
|
||||
CALL_ANYWHERE := all install validate build java.compile java.deploy
|
||||
CALL_W_CONTAINER := $(CALL_ANYWHERE)
|
||||
|
||||
all: validate
|
||||
|
||||
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
||||
|
||||
.PHONY: $(CALL_W_CONTAINER)
|
||||
|
||||
install:
|
||||
npm install
|
||||
|
||||
validate:
|
||||
npm run validate
|
||||
|
||||
build:
|
||||
npm run build
|
||||
|
||||
# Java
|
||||
|
||||
ifdef SETTINGS_XML
|
||||
DOCKER_RUN_OPTS = -v $(SETTINGS_XML):$(SETTINGS_XML)
|
||||
DOCKER_RUN_OPTS += -e SETTINGS_XML=$(SETTINGS_XML)
|
||||
endif
|
||||
|
||||
ifdef LOCAL_BUILD
|
||||
DOCKER_RUN_OPTS += -v $$HOME/.m2:/home/$(UNAME)/.m2:rw
|
||||
endif
|
||||
|
||||
COMMIT_HASH := $(shell git --no-pager log -1 --pretty=format:"%h")
|
||||
NUMBER_COMMITS := $(shell git rev-list --count HEAD)
|
||||
|
||||
JAVA_PKG_VERSION := 1.$(NUMBER_COMMITS)-$(COMMIT_HASH)
|
||||
|
||||
ifdef BRANCH_NAME
|
||||
ifeq "$(findstring epic,$(BRANCH_NAME))" "epic"
|
||||
JAVA_PKG_VERSION := $(JAVA_PKG_VERSION)-epic
|
||||
endif
|
||||
endif
|
||||
|
||||
MVN = mvn -s $(SETTINGS_XML) -Dcommit.number="$(NUMBER_COMMITS)"
|
||||
|
||||
java.swag.compile_client: java.settings
|
||||
$(MVN) clean && \
|
||||
$(MVN) compile -P="client"
|
||||
|
||||
java.swag.deploy_client: java.settings
|
||||
$(MVN) clean && \
|
||||
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-client" && \
|
||||
$(MVN) deploy -P="client"
|
||||
|
||||
java.swag.install_client: java.settings
|
||||
$(MVN) clean && \
|
||||
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-client" && \
|
||||
$(MVN) install -P="client"
|
||||
|
||||
java.swag.compile_server: java.settings
|
||||
$(MVN) clean && \
|
||||
$(MVN) compile -P="server"
|
||||
|
||||
java.swag.deploy_server: java.settings
|
||||
$(MVN) clean && \
|
||||
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-server" && \
|
||||
$(MVN) deploy -P="server"
|
||||
|
||||
java.swag.install_server: java.settings
|
||||
$(MVN) clean && \
|
||||
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-server" && \
|
||||
$(MVN) install -P="server"
|
||||
|
||||
java.compile: java.settings
|
||||
$(MVN) compile
|
||||
|
||||
java.deploy: java.settings
|
||||
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)" && \
|
||||
$(MVN) deploy
|
||||
|
||||
java.install: java.settings
|
||||
$(MVN) clean && \
|
||||
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)" && \
|
||||
$(MVN) install
|
||||
|
||||
java.settings:
|
||||
$(if $(SETTINGS_XML),, echo "SETTINGS_XML not defined"; exit 1)
|
1
build_utils
Submodule
1
build_utils
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e1318727d4d0c3e48f5122bf3197158b6695f50e
|
8
openapi/components/parameters/categoryRef.yaml
Normal file
8
openapi/components/parameters/categoryRef.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
name: CategoryRefID
|
||||
in: query
|
||||
description: Идентификатор категории
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
minLength: 4
|
||||
maxLength: 64
|
16
openapi/components/parameters/categoryType.yaml
Normal file
16
openapi/components/parameters/categoryType.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
name: categoryType
|
||||
in: query
|
||||
description: Тип документов
|
||||
required: true
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- tariffAgreement
|
||||
- identityCardHeadOfOrganization
|
||||
- statementShareholdersRegister
|
||||
- locationInformation
|
||||
- clientQuestionnaire
|
||||
- financialPosition
|
||||
- businessReputation
|
17
openapi/components/responses/DefaultLogicError.yaml
Normal file
17
openapi/components/responses/DefaultLogicError.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
description: Ошибка бизнес-логики
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
description: Ошибка в переданных данных
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
enum:
|
||||
- invalidRequest
|
||||
- invalidDeadline
|
||||
- invalidPartyID
|
||||
message:
|
||||
type: string
|
18
openapi/components/schemas/Category.yaml
Normal file
18
openapi/components/schemas/Category.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
- categoryType
|
||||
properties:
|
||||
name:
|
||||
description: Название категории
|
||||
type: string
|
||||
maxLength: 40
|
||||
minLength: 1
|
||||
description:
|
||||
description: Описание категории
|
||||
type: string
|
||||
maxLength: 128
|
||||
minLength: 1
|
||||
categoryType:
|
||||
$ref: './CategoryType.yaml'
|
12
openapi/components/schemas/CategoryType.yaml
Normal file
12
openapi/components/schemas/CategoryType.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
type: object
|
||||
required:
|
||||
- categoryType
|
||||
properties:
|
||||
categoryType:
|
||||
description: Тип категории
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- test
|
||||
- live
|
14
openapi/docs/api.md
Normal file
14
openapi/docs/api.md
Normal file
@ -0,0 +1,14 @@
|
||||
RBKmoney Dominant Cache API.
|
||||
|
||||
Схема которого описывается в соответствии со стандартом [OpenAPI 3][OAS3].
|
||||
|
||||
[OAS3]: https://swagger.io/specification/
|
||||
|
||||
## Формат содержимого
|
||||
|
||||
Любой запрос к API должен выполняться в кодировке UTF-8 и с указанием
|
||||
содержимого в формате JSON.
|
||||
|
||||
```
|
||||
Content-Type: application/json; charset=utf-8
|
||||
```
|
25
openapi/openapi.yaml
Normal file
25
openapi/openapi.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: RBKmoney Dominant Cache API
|
||||
description: >
|
||||
## Описание
|
||||
|
||||
RBKmoney Dominant Cache API.
|
||||
|
||||
termsOfService: 'https://rbk.money/'
|
||||
contact:
|
||||
name: RBKmoney support team
|
||||
email: support@rbk.money
|
||||
url: 'https://developer.rbk.money'
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
paths:
|
||||
/category:
|
||||
$ref: ./paths/category.yaml
|
||||
tags:
|
||||
- name: category
|
||||
x-displayName: Категории
|
||||
servers:
|
||||
- url: 'https://api.rbk.money/v1/dominant/cache'
|
20
openapi/paths/category.yaml
Normal file
20
openapi/paths/category.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
get:
|
||||
summary: Получить категорию по Ref_Id
|
||||
tags:
|
||||
- category
|
||||
operationId: getCategory
|
||||
parameters:
|
||||
- $ref: '../components/parameters/categoryRef.yaml'
|
||||
responses:
|
||||
'200':
|
||||
description: Категория найдена
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/schemas/Category.yaml'
|
||||
'400':
|
||||
$ref: '../components/responses/DefaultLogicError.yaml'
|
||||
'401':
|
||||
description: Ошибка авторизации
|
||||
'404':
|
||||
description: Заданный ресурс не найден
|
6468
package-lock.json
generated
Normal file
6468
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
package.json
Normal file
15
package.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "swag-dominant-cache",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@redocly/openapi-cli": "^1.0.0-beta.25",
|
||||
"json-merge-patch": "^1.0.0",
|
||||
"redoc-cli": "^0.10.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "openapi preview-docs",
|
||||
"build": "openapi bundle -o web_deploy/openapi.yaml && openapi bundle -o web_deploy/openapi.json",
|
||||
"validate": "openapi lint"
|
||||
}
|
||||
}
|
50
plugins/local.js
Normal file
50
plugins/local.js
Normal file
@ -0,0 +1,50 @@
|
||||
const jsonmergepatch = require('json-merge-patch');
|
||||
|
||||
module.exports = {
|
||||
|
||||
id: 'local',
|
||||
|
||||
preprocessors: {
|
||||
oas3: {
|
||||
'merge-schemas': MergeSchemas
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function MergeSchemas() {
|
||||
const trigger = 'x-mergeSchemas';
|
||||
return {
|
||||
Schema: {
|
||||
leave(node, ctx) {
|
||||
if (!node[trigger]) {
|
||||
return;
|
||||
}
|
||||
var schemas = node[trigger];
|
||||
if (!Array.isArray(schemas)) {
|
||||
return ctx.report({
|
||||
message: "Argument should be an array of schemas",
|
||||
location: ctx.location.child(trigger)
|
||||
});
|
||||
}
|
||||
let merged = null;
|
||||
for (index = schemas.length - 1; index >= 0; --index) {
|
||||
let schema = schemas[index];
|
||||
if (typeof schema !== 'object') {
|
||||
return ctx.report({
|
||||
message: "Non-object value",
|
||||
location: ctx.location.child(trigger).child(index)
|
||||
});
|
||||
}
|
||||
if (schema.$ref && typeof schema.$ref === 'string') {
|
||||
schema = ctx.resolve(schema).node;
|
||||
}
|
||||
merged = jsonmergepatch.apply(merged, schema);
|
||||
console.log(merged);
|
||||
};
|
||||
Object.assign(node, merged);
|
||||
delete node[trigger];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
201
pom.xml
Normal file
201
pom.xml
Normal file
@ -0,0 +1,201 @@
|
||||
<?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>com.rbkmoney</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>swag-dominant-cache</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<default.package>com.rbkmoney.swag.dominant.cache</default.package>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<java.version>13</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<slf4j-version>1.7.30</slf4j-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
<servlet-api-version>2.5</servlet-api-version>
|
||||
<jackson-version>2.11.2</jackson-version>
|
||||
<spring-version>2.4.1</spring-version>
|
||||
<javax-annotation-api-version>1.3.2</javax-annotation-api-version>
|
||||
<jaxb-version>2.3.1</jaxb-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!--Spring dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot</artifactId>
|
||||
<version>${spring-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
<version>${spring-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
<version>${spring-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.8.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.8.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.6.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</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-annotation-api-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>${jaxb-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>jackson-databind-nullable</artifactId>
|
||||
<version>0.2.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/junit/junit -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>server</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>4.2.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>spring-server</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>web_deploy/openapi.yaml</inputSpec>
|
||||
<generatorName>spring</generatorName>
|
||||
<configOptions>
|
||||
<dateLibrary>java8</dateLibrary>
|
||||
</configOptions>
|
||||
<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>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>4.2.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>remote</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>web_deploy/openapi.yaml</inputSpec>
|
||||
|
||||
<generatorName>java</generatorName>
|
||||
|
||||
<configOptions>
|
||||
<dateLibrary>java8</dateLibrary>
|
||||
</configOptions>
|
||||
|
||||
<library>resttemplate</library>
|
||||
|
||||
<apiPackage>${default.package}.api</apiPackage>
|
||||
<modelPackage>${default.package}.model</modelPackage>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
25
web/index.html
Normal file
25
web/index.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>RBKmoney Dominant Cache API</title>
|
||||
<!-- needed for adaptive design -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
|
||||
<!--
|
||||
ReDoc uses font options from the parent element
|
||||
So override default browser styles
|
||||
-->
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{{{redocHead}}}
|
||||
</head>
|
||||
<body>
|
||||
{{{redocHTML}}}
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user