Hydra Generated Java RestTemplate Client

This is a swagger-codegen generated REST client to access Hydra API

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

ca.pjer
ArtifactId

ArtifactId

hydra-client-resttemplate
Last Version

Last Version

1.0.1-beta.9-8555973
Release Date

Release Date

Type

Type

jar
Description

Description

Hydra Generated Java RestTemplate Client
This is a swagger-codegen generated REST client to access Hydra API

Download hydra-client-resttemplate

How to add to project

<!-- https://jarcasting.com/artifacts/ca.pjer/hydra-client-resttemplate/ -->
<dependency>
    <groupId>ca.pjer</groupId>
    <artifactId>hydra-client-resttemplate</artifactId>
    <version>1.0.1-beta.9-8555973</version>
</dependency>
// https://jarcasting.com/artifacts/ca.pjer/hydra-client-resttemplate/
implementation 'ca.pjer:hydra-client-resttemplate:1.0.1-beta.9-8555973'
// https://jarcasting.com/artifacts/ca.pjer/hydra-client-resttemplate/
implementation ("ca.pjer:hydra-client-resttemplate:1.0.1-beta.9-8555973")
'ca.pjer:hydra-client-resttemplate:jar:1.0.1-beta.9-8555973'
<dependency org="ca.pjer" name="hydra-client-resttemplate" rev="1.0.1-beta.9-8555973">
  <artifact name="hydra-client-resttemplate" type="jar" />
</dependency>
@Grapes(
@Grab(group='ca.pjer', module='hydra-client-resttemplate', version='1.0.1-beta.9-8555973')
)
libraryDependencies += "ca.pjer" % "hydra-client-resttemplate" % "1.0.1-beta.9-8555973"
[ca.pjer/hydra-client-resttemplate "1.0.1-beta.9-8555973"]

Dependencies

compile (5)

Group / Artifact Type Version
io.swagger : swagger-annotations jar 1.5.21
javax.annotation : javax.annotation-api jar 1.3.2
org.springframework : spring-context jar 5.0.9.RELEASE
org.springframework : spring-web jar 5.0.9.RELEASE
com.fasterxml.jackson.core : jackson-databind jar 2.9.8

Project Modules

There are no modules declared in this project.

hydra-client-resttemplate

This is a swagger-codegen generated REST client to access Hydra API

Usage

Add a dependency to your project's pom.xml

<dependency>
    <groupId>ca.pjer</groupId>
    <artifactId>hydra-client-resttemplate</artifactId>
    <version>1.0.2-beta.9-8555973</version>
</dependency>

Add a package to be scanned to your @SpringBootApplication and define a @Bean to customize the URI and the RestTemplate of the ApiClient:

package mypackage;

import ca.pjer.hydra.client.ApiClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(scanBasePackageClasses = {
        mypackage.App.class,
        ca.pjer.hydra.client.api.OAuth2Api.class
})
public class App {

    @Value("${hydra.api.uri:http://hydra.lvh.me:4445}")
    String hydraApiUri;

    @Bean
    ApiClient apiClient(RestTemplateBuilder restTemplateBuilder) {
        var bean = new ApiClient(restTemplateBuilder.build());
        bean.setBasePath(hydraApiUri);
        return bean;
    }

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
}

Then you are ready to inject any of the components in the ca.pjer.hydra.client.api package:

    @Autowired
    protected OAuth2Api oAuth2Api;

Versions

Version
1.0.1-beta.9-8555973
1.0.0-beta.9-8555973
0.1.0