regulaforensics / DocumentReader-web-java-client

Regula Document Reader web API java client compatible with jvm and android
https://regulaforensics.com
5 stars 6 forks source link

Jürgen Leonhardt observations #22

Closed hleb-albau closed 3 years ago

hleb-albau commented 3 years ago

Original text

 There must be a bug in the code in updating the model in this project which references to https://github.com/regulaforensics/DocumentReader-web-openapi.git

1.

\DocumentReader-web-java-client\client\generator-templates\modelEnum.mustache must be replaced with the original version from OpenApi (https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache)

2.

\DocumentReader-web-openapi\rt-authenticity.yml (original file: https://github.com/regulaforensics/DocumentReader-web-openapi/blob/master/rt-authenticity.yml)

has wrong mapping, you need to replace the following line:

$ref: './authenticity/e-security-feature-type.yml#/components/schemas/SecurityFeatureType'

with

$ref: './authenticity/e-result-type.yml#/components/schemas/AuthenticityResultType'

3.

Java 11 has problems with threetenbp

You shoul change the file https://github.com/regulaforensics/DocumentReader-web-java-client/blob/master/java-generator-config.json

And add:

"dateLibrary": "java8",

to make use of java native date types
hleb-albau commented 3 years ago
  1. Could you, please, clarify concrete problem, that u face with current enum implementation? Our logic - we replace all enum values with primitive to support compatibility with new service versions. In new versions we introduce new fields types, docs types and etc. If we keep using raw enum, we will have de-serialization error of new values.
  2. nice catch! fixed https://github.com/regulaforensics/DocumentReader-web-openapi/commit/894cad10d5bc38a2225576b8c5382e6821f35041
  3. will investigate today

btw, we will provide new lib version asap p.s. you could provide PR for small fixes to speed up process

hleb-albau commented 3 years ago

Could you, please, add links for threetenbp java 11 problems? We try to keep minimal-supported client version of Java7 (still around 7% оf users use it) and thus do not migrate to pure java 8.

hleb-albau commented 3 years ago

Closed as not active. Feel free to reopen.