cbornet / generator-jhipster-grpc

JHipster module, Adds support for gRPC and generates gRPC CRUD services
Apache License 2.0
44 stars 7 forks source link
generator grpc jhipster spring-boot yeoman-generator

generator-jhipster-grpc

NPM version Build Status Dependency Status

JHipster module, Adds support for gRPC and generates gRPC CRUD services

Introduction

This is a JHipster module, that is meant to be used in a JHipster application.

WARN : Under developpement. See list of limitations and TODOs

Prerequisites

As this is a JHipster module, we expect you have JHipster and its related tools already installed:

Installation

To install this module:

npm install -g generator-jhipster-grpc

Compatibility :

Usage

At the root of your project directory:

yo jhipster-grpc

This will configure reactive-grpc and grpc-spring-boot-starter so that the proto files present in src/main/proto are compiled. If you want to add CRUD gRPC services for an entity, just (re)generate it and confirm when the question is asked. The endpoints use Reactor implementation of reactive-streams (Flux) with back-pressure.

Notes :

TODOs:

Mappings:

JHipster Protobuf
Integer int32
Long int64
String string
Float float
Double double
Boolean bool
Blob (byte[]) bytes
ByteBuffer bytes
Instant google.protobuf.Timestamp
ZonedDateTime google.protobuf.Timestamp
LocalDate util.Date
BigDecimal util.Decimal
enum enum

util.Date and util.Decimal are custom definitions. Non-required protobuf scalar types and enums are wrapped in OneOf types to provide nullability.

License

Apache-2.0 © [Christophe Bornet]