Initial implementation of BFF, search-api integration and eureka
This commit is contained in:
167
anyame-kodik-search-api/pom.xml
Normal file
167
anyame-kodik-search-api/pom.xml
Normal file
@ -0,0 +1,167 @@
|
||||
<?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>
|
||||
<artifactId>anyame-bff-parent</artifactId>
|
||||
<groupId>com.backend.vue.bff.service</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.backend.vue.bff.service</groupId>
|
||||
<artifactId>anyame-kodik-search-api</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>anyame-kodik-search-api</name>
|
||||
<description>Search API for anyame-kodik</description>
|
||||
|
||||
<url />
|
||||
<licenses>
|
||||
<license />
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer />
|
||||
</developers>
|
||||
<scm>
|
||||
<connection />
|
||||
<developerConnection />
|
||||
<tag />
|
||||
<url />
|
||||
</scm>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-annotations-version>1.6.3</swagger-annotations-version>
|
||||
<jackson-databind-version>2.17.1</jackson-databind-version>
|
||||
<jackson-version>2.17.1</jackson-version>
|
||||
<jakarta.ws.rs-api-version>4.0.0</jakarta.ws.rs-api-version>
|
||||
<retrofit-version>2.11.0</retrofit-version>
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
<beanvalidation-version>3.0.2</beanvalidation-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>5.10.3</junit-version>
|
||||
<javax-annotation-api.version>1.3.2</javax-annotation-api.version>
|
||||
<jakarta-validation-api.version>3.1.1</jakarta-validation-api.version>
|
||||
<jsr305.version>3.0.2</jsr305.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
</dependency>
|
||||
<!-- @Nullable annotation -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>${jsr305.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.retrofit2</groupId>
|
||||
<artifactId>retrofit</artifactId>
|
||||
<version>${retrofit-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.retrofit2</groupId>
|
||||
<artifactId>converter-scalars</artifactId>
|
||||
<version>${retrofit-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.oltu.oauth2</groupId>
|
||||
<artifactId>org.apache.oltu.oauth2.client</artifactId>
|
||||
<version>${oltu-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.oltu.oauth2</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- JSON processing: jackson -->
|
||||
<dependency>
|
||||
<groupId>com.squareup.retrofit2</groupId>
|
||||
<artifactId>converter-jackson</artifactId>
|
||||
<version>${retrofit-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson-databind-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.ws.rs</groupId>
|
||||
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||
<version>${jakarta.ws.rs-api-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>${jakarta-annotation-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${javax-annotation-api.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api -->
|
||||
<dependency>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
<version>${jakarta-validation-api.version}</version>
|
||||
</dependency>
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>7.14.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>${project.basedir}/src/main/resources/openapi.json</inputSpec>
|
||||
<generatorName>java</generatorName>
|
||||
<configOptions>
|
||||
<library>retrofit2</library>
|
||||
<apiPackage>com.backend.search.kodik.api</apiPackage>
|
||||
<modelPackage>com.backend.search.kodik.model</modelPackage>
|
||||
<openApiNullable>false</openApiNullable>
|
||||
<useJakartaEe>true</useJakartaEe>
|
||||
<serializationLibrary>jackson</serializationLibrary>
|
||||
</configOptions>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
365
anyame-kodik-search-api/src/main/resources/openapi.json
Normal file
365
anyame-kodik-search-api/src/main/resources/openapi.json
Normal file
@ -0,0 +1,365 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "OpenAPI definition",
|
||||
"version": "v0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8080",
|
||||
"description": "Generated server url"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/search": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"search-controller"
|
||||
],
|
||||
"operationId": "search",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "title",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"*/*": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/KodikResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"KodikResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Result"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"MaterialData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"year": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"screenshots": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"duration": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"countries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"genres": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"actors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"directors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"producers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"writers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"composers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"designers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"operators": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"anime_title": {
|
||||
"type": "string"
|
||||
},
|
||||
"title_en": {
|
||||
"type": "string"
|
||||
},
|
||||
"other_titles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"other_titles_en": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"other_titles_jp": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"anime_license_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"anime_licensed_by": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"anime_kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"all_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"anime_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"anime_description": {
|
||||
"type": "string"
|
||||
},
|
||||
"poster_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"anime_poster_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"all_genres": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"anime_genres": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"anime_studios": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"kinopoisk_rating": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"kinopoisk_votes": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"imdb_rating": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"imdb_votes": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"shikimori_rating": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"shikimori_votes": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"premiere_world": {
|
||||
"type": "string"
|
||||
},
|
||||
"aired_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"released_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"rating_mpaa": {
|
||||
"type": "string"
|
||||
},
|
||||
"minimal_age": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"episodes_total": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"episodes_aired": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Result": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"translation": {
|
||||
"$ref": "#/components/schemas/Translation"
|
||||
},
|
||||
"year": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"quality": {
|
||||
"type": "string"
|
||||
},
|
||||
"camrip": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"lgbt": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"screenshots": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title_orig": {
|
||||
"type": "string"
|
||||
},
|
||||
"other_title": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_season": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"last_episode": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"episodes_count": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"kinopoisk_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"imdb_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"worldart_link": {
|
||||
"type": "string"
|
||||
},
|
||||
"shikimori_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"blocked_countries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"material_data": {
|
||||
"$ref": "#/components/schemas/MaterialData"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Translation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user