Gathering detailed insights and metrics for generator-jhipster-swagger-cli
Gathering detailed insights and metrics for generator-jhipster-swagger-cli
Gathering detailed insights and metrics for generator-jhipster-swagger-cli
Gathering detailed insights and metrics for generator-jhipster-swagger-cli
generator-jhipster
Spring Boot + Angular/React/Vue in one handy generator
ng-jhipster
A Jhipster util library for Angular
generator-jhipster-nav-element
Add simple and nested pages to your JHipster app
generator-fastboot
Spring Boot + Angular/React/Vue in one handy generator
npm install generator-jhipster-swagger-cli
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
15 Stars
80 Commits
7 Forks
5 Watching
13 Branches
2 Contributors
Updated on 02 Feb 2020
Java (46.16%)
TypeScript (29.47%)
HTML (18.26%)
JavaScript (4.4%)
CSS (1.38%)
Shell (0.26%)
Dockerfile (0.07%)
Cumulative downloads
Total Downloads
Last day
4,233.3%
650
Compared to previous day
Last week
-69.7%
1,284
Compared to previous week
Last month
706%
9,616
Compared to previous month
Last year
266.3%
13,591
Compared to previous year
JHipster module to generate client code from an OpenAPI/Swagger definition
This is a JHipster module, that is meant to be used in a JHipster application.
This module generates client code using Spring-Cloud FeignClients in your JHipster app from an OpenAPI/Swagger definition.
The generated FeignClient can be used in both Monolithic and Micro-service applications.
This module works for JHipster v5+ apps. For older JHipster version, use version 2.x of this module (branch v2.x-JHipster2-3-4)
This module works with both Swagger v2 and OpenAPI v3 definitions.
As this is a JHipster module, we expect you have JHipster and its related tools already installed:
To install this module:
1npm install -g generator-jhipster-swagger-cli
To update this module:
1npm update -g generator-jhipster-swagger-cli
Run:
1yo jhipster-swagger-cli
then answer the questions. You have the possibility to store a client configuration for future regeneration (eg. if there is an API update). If you do so, next time you launch the module, you will have the choice to generate a new client or to reuse one or several stored configurations.
You can configure the generated FeignClients directly from the application.yml.
RequestInterceptor
beans are generated from the OpenAPI securitySchemes
and are only activated if relevant properties are set.
If the OpenAPI spec doesn't contain the securitySchemes
, then you will need to configure the clients by yourself (see spring-cloud doc for details.)
The basic auth RequestInterceptor is activated if <clientName>.security.<securityName>.username
is set.
1petstore: 2 security: 3 basicAuth: 4 username: admin 5 password: admin
The API key RequestInterceptor is activated if <clientName>.security.<securityName>.key
is set.
1petstore: 2 security: 3 apiKey: 4 key: 12345
The OAuth2 RequestInterceptor is activated if <clientName>.security.<securityName>.key
is set.
For details on configuring OAuth2, see the spring-security-oauth2 doc.
1petstore: 2 security: 3 passwordOauth: 4 client-id: myClientId 5 client-secret: myClientSecret 6 username: myUsername 7 password: myPassword 8 scopes: 9 - read 10 - write
The remote URL will default to the one from the OpenAPI spec but can be changed with the <clientName>.url
property.
1petstore: 2 url: http://petstore-uat.swagger.io/v2
You need to add spring-cloud-starter-ribbon to your pom.xml if needed.
Note that it seems to cause an issue with form-login on monoliths so it is not done by this module.
Then set <cliName>.url
to blank.
1petstore: 2 url: 3 ribbon: 4 listOfServers: petstore1.swagger.io,petstore2.swagger.io
If the generated clients don't fit your needs because you want to use Hystrix fallbacks, change the Ribbon context path or use different Feign client configuration, then simply create your own FeignClient beans extending the generated xxxApi classes.
For instance if you generated the petstore API, you can call the addPet method like this:
1@Inject 2private PetApiClient petApiClient; 3... 4Pet myPet = new Pet(); 5petApiClient.addPet(myPet);
Apache-2.0 © [Christophe Bornet]
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/27 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
187 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More