api-jersey2-client

api-jersey2-client Generated Open API client for nem2-sdk-java

License

License

Categories

Categories

CLI User Interface Jersey Program Interface REST Frameworks
GroupId

GroupId

io.nem
ArtifactId

ArtifactId

api-jersey2-client
Last Version

Last Version

0.8.4
Release Date

Release Date

Type

Type

jar
Description

Description

api-jersey2-client
api-jersey2-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-jersey2-client

How to add to project

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

Dependencies

compile (10)

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
org.glassfish.jersey.core : jersey-client jar 2.27
org.glassfish.jersey.media : jersey-media-multipart jar 2.27
org.glassfish.jersey.media : jersey-media-json-jackson jar 2.27
com.fasterxml.jackson.core : jackson-core jar 2.9.9
com.fasterxml.jackson.core : jackson-annotations jar 2.9.9
com.fasterxml.jackson.core : jackson-databind jar 2.9.9
com.fasterxml.jackson.datatype : jackson-datatype-jsr310 jar 2.9.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