networknt / light-codegen Goto Github PK
View Code? Open in Web Editor NEWA code generator based on rocker that can be used as an utility or web service
License: Apache License 2.0
A code generator based on rocker that can be used as an utility or web service
License: Apache License 2.0
In the following swagger.json, x-description will cause trouble because it is not an operation. Need to skip it while parsing all the http methods for a particular path.
"paths": {
"/party/address/get": {
"x-description": "Address for a party",
"post": {
"security": [
This change is due to light-4j issue networknt/light-4j#66
(to be committed to develop branch)
As there are multiple schema.json available in multiple jars, it is very important that these files can be merged together. The Config module cannot be used and we have to load all of them manually and merge them into the same HashMap.
Also add flag to enable client in config.json
Also add a flag to enable client in config.json
After generation, the target folder will be zipped and the content will be sent to the consumer directly instead of url to download the zip file.
This is the generate to create service and deploy to the server platform which can host multiple services.
In config.json, there are two properties to control if the handlers and handler tests should be overwritten when regenerate the same project into the same folder. The default value should be false in the logic unless it is true in config.json. In the normal case, developers only need to work on these handlers and tests and this provide a convenient way to upgrade to another version of the framework without impact what he/she is doing.
The server info needs to be projected with JWT but health check should be freely accessed.
So that in the light-codegen docker, we don't need to update the entry-point.sh every time a new version is released.
As rocker compiles all the templates into java code and use the folder name of the templates as package name. There are conflicts if we have the same folder name for templates in several frameworks. In order to eliminate the issue, the templates folder should be
resources/templates/{framework}/
It should be working the same way as swagger-codegen
The test case and test server will be updated to get port from config. Also for test resources/config we need to get server.yml there with customized ports.
From the readme (in progress of reviewing), i'm learning that a few of the folders in this projects more closely resemble sample/example code (for example light-rest-4j), and doesn't necessarily apply to the codegen functionality.
It was also a surprise to see light-hybrid-4j, a project which is functionally an api container, to be included in this repo.
Maybe it could be a consideration to split this up into light-codegen-demo, light-codegen, and you already have a light-hybrid-4j, so ... not sure.
The question is what type should we support? front, back or something else?
data field will include:
Currently only JSON format is accepted and we can detect the file type with "yml" or "yaml" and convert the file into json internally.
For example, generate backend and frontend at the same time.
java -jar -Dlogback.configurationFile=/opt/config/logback.xml /opt/rest.jar
Also, if you want the application to scan the config file to reflect the changes, please add scan="true" in configuration attribute.
<configuration scan="true">
...
...
</configuration>
By default logback-classic will scan the changes every one minute, but if we want to
change this then we have to add another attribute scanPeriod with the time interval and the unit as below.
swagger 1.5.28
mockito 2.7.21
server generator has it but the service need it for test cases.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.