Refactoring, new translations, cleaning up warnings.

Refactored to standard Maven layout:
src/main/java
src/main/resources
src/test/java
etc.

New translation code that uses locale-specific ResourceBundles
to load translations on demand.

Reworked API error/exceptions code to a shorter, simpler
@ApiErrors annotation. Processing of @ApiErrors annotations
produces an example for each possible API error and includes
API error string in HTTP response code, e.g.
400 INVALID_SIGNATURE
Missing API error cases added to each API call.

Translation of openAPI.json removed (for now).

block-explorer.html and BIP39 wordlists now read as resources
instead of direct from disk.

Java compile warnings fixed.
Some runtime warnings remain:

WARNING: A provider api.resource.ApiDefinition registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime.
WARNING: A provider api.resource.AnnotationPostProcessor registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime.
WARN org.reflections.Reflections - given scan urls are empty. set urls in the configuration
This commit is contained in:
catbref
2018-12-21 11:14:16 +00:00
parent aab6b69da1
commit c4ed4b378c
284 changed files with 835 additions and 2781 deletions

11
pom.xml
View File

@@ -17,8 +17,8 @@
<swagger-ui.version>3.19.0</swagger-ui.version>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>tests</testSourceDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -119,14 +119,13 @@
<packages>
<package>
<pattern>data.**</pattern>
<template>${project.basedir}/src/data/package-info.java</template>
<template>${project.build.sourceDirectory}/data/package-info.java</template>
</package>
<package>
<pattern>api.models**</pattern>
<template>${project.basedir}/src/data/package-info.java</template>
<template>${project.build.sourceDirectory}/data/package-info.java</template>
</package>
</packages>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-sources/package-info</outputDirectory>
</configuration>
<executions>
@@ -391,4 +390,4 @@
<version>${bouncycastle.version}</version>
</dependency>
</dependencies>
</project>
</project>