用户工具

站点工具


light4j:rest
  • light-rest-4j,1.6.*分支和master分支很不同了,以下分析1.6.*分支
  • swagger-meta,com.networknt.swagger.SwaggerHandler
SwaggerHelper.swagger=io.swagger.parser.SwaggerParser.readWithInfo(swagger.json)
SwaggerEndpointSource.listEndpoints=SwaggerHelper.swagger.getPaths(),根据swagger.json计算endpoint
  • swagger-validator,com.networknt.validator.ValidatorHandler校验请求:path query header body
  • swagger-security,com.networknt.security.JwtVerifyHandler校验请求头Authorization
  • openapi-meta,com.networknt.openapi.OpenApiHandler,
com.networknt.oas.model.OpenApi3=com.networknt.oas.OpenApiParser.parse(spec, new URL("https://oas.lightapi.net/"))
OpenApiEndpointSource.listEndpoints=OpenApiHelper.openApi3.getPaths()
light-codegen可以生成OpenApiPathHandler,根据audit_info.endpoint调用new PetsGetHandler().handleRequest
  • openapi-validator,com.networknt.openapi.ValidatorHandler
  • openapi-security,com.networknt.openapi.JwtVerifyHandler
  • specification,com.networknt.specification
SpecSwaggerUIHandler,/specui.html,响应swagger页面
SpecDisplayHandler,/spec.yaml,响应openapi.yml内容

以下为master分支

  • openapi-helper,提供OpenApiHelper.openApi3
  • openapi-meta,OpenApiHandler,支持openapi-inject
  • openapi-validator,ValidatorHandler,openapi-validator.yml
  • openapi-security,JwtVerifyHandler
  • access-control,通过com.networknt.rule.RuleEngine鉴权接口
  • specification,同上
light4j/rest.txt · 最后更改: 2021/11/26 18:37 由 admin