api-okhttp-gson-client

api-okhttp-gson-client Generated Open API client for nem2-sdk-java

License

License

Categories

Categories

CLI User Interface Gson Data JSON
GroupId

GroupId

io.nem
ArtifactId

ArtifactId

api-okhttp-gson-client
Last Version

Last Version

0.8.4
Release Date

Release Date

Type

Type

jar
Description

Description

api-okhttp-gson-client
api-okhttp-gson-client Generated Open API client for nem2-sdk-java
Project URL

Project URL

https://github.com/NEMStudios/nem2-open-api-generator
Source Code Management

Source Code Management

https://github.com/NEMStudios/nem2-open-api-generator

Download api-okhttp-gson-client

How to add to project

<!-- https://jarcasting.com/artifacts/io.nem/api-okhttp-gson-client/ -->
<dependency>
    <groupId>io.nem</groupId>
    <artifactId>api-okhttp-gson-client</artifactId>
    <version>0.8.4</version>
</dependency>
// https://jarcasting.com/artifacts/io.nem/api-okhttp-gson-client/
implementation 'io.nem:api-okhttp-gson-client:0.8.4'
// https://jarcasting.com/artifacts/io.nem/api-okhttp-gson-client/
implementation ("io.nem:api-okhttp-gson-client:0.8.4")
'io.nem:api-okhttp-gson-client:jar:0.8.4'
<dependency org="io.nem" name="api-okhttp-gson-client" rev="0.8.4">
  <artifact name="api-okhttp-gson-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.nem', module='api-okhttp-gson-client', version='0.8.4')
)
libraryDependencies += "io.nem" % "api-okhttp-gson-client" % "0.8.4"
[io.nem/api-okhttp-gson-client "0.8.4"]

Dependencies

compile (8)

Group / Artifact Type Version
javax.annotation : javax.annotation-api jar 1.3.2
io.swagger : swagger-annotations jar 1.5.22
com.google.code.findbugs : jsr305 jar 3.0.2
com.squareup.okhttp3 : okhttp jar 3.14.2
com.squareup.okhttp3 : logging-interceptor jar 3.14.2
com.google.code.gson : gson jar 2.8.5
io.gsonfire : gson-fire jar 1.8.3
org.apache.commons : commons-lang3 jar 3.9

Project Modules

There are no modules declared in this project.

symbol-openapi-generator

Build Status

Project in charge of generating the API client libraries used by the Symbol SDKs.

The generate script creates different flavours of clients according to the current OpenAPI specification.

Supported languages

Language Template
Typescript typescript-node
typescript-fetch
Java vertx
jersey2
okhttp-gson
Python python

See possible options for languages and flavours here.

Requirements

  • NPM 8
  • Java 8

Usage

Once you have installed the dependencies, run:

npm install @openapitools/[email protected] [email protected]  -g
bash download-and-patch.sh
bash generate.sh [template]

The script will:

  1. Download the released openapi3.yml from symbol-openapi of the current version (version.txt).
  2. Create a patched version of the open api specification (see notes below).
  3. Generate one library per language / template / framework.
  4. Build each library.
  5. Build and install libraries using PyPI, NPM and Gradle.

Notes for SDKs developers

  • Running the generator is not required to build the SDKs. The generated libs are published into a central repository (e.g. maven, npm). The SDKs depend on those libraries like any other third party dependency.
  • The generated lib version (artifact version) should be consistent with the OpenAPI spec. For instance, if the current version is 0.7.19, the generated libraries should have version 0.7.19. If the descriptor changes and the version is updated, the libraries should be upgraded, regenerated, and deployed.
  • The generator uses a patched version of the descriptor due to the AnyOf bug.
  • There is a small tune in the java generation that uses BigInteger attributes instead of String when a field is a String number. The tune is by using typeMappings = ["x-number-string": "java.math.BigInteger"] and by replacing the string type to x-number-string in the openapi3-any-of-patch.yaml.
  • ⚠️ Generated code must not be changed not committed!!! Note that the build folder is gitignored. If there is something wrong with the generated code, you need to customize the generator.

License

Copyright (c) 2020-present NEM Licensed under the Apache License 2.0

Versions

Version
0.8.4
0.8.3
0.8.2
0.7.22
0.7.21
0.7.20.7
0.7.20.6.1
0.7.20.6
0.7.20.1
0.7.19