Comments (6)
@Bonelol 昨晚做着做着就睡着了,今天中午已更新Java-Server Eclipse版
from apijson.
@Bonelol 现在可以通过@ MethodAccess注解实现权限管理了,一般用 Model声明+权限注解+权限注册 3行代码就够了
https://github.com/TommyLemon/APIJSON/releases/tag/1.5.0
//注册表并添加权限,用默认配置
@MethodAccess
public class Comment {
//内容一般仅供表字段说明及Android App开发使用,服务端不用的可不写。
}
//Verifier内添加权限
accessMap.put(Comment.class.getSimpleName(), getAccessMap(Comment.class.getAnnotation(MethodAccess.class)));
话说公司已经在用自动化在线文档了,通过APIJSON的 @about:true 返回的表字段属性生成。
请求:
{
"Comment[]": {
"Comment": {
"@about": true
}
}
}
返回:
{
"Comment[]": [
{
"column_name": "id",
"column_type": "bigint(15)",
"is_nullable": "NO",
"column_comment": "唯一标识"
},
{
"column_name": "toId",
"column_type": "bigint(15)",
"is_nullable": "YES",
"column_comment": "回复的评论id"
},
{
"column_name": "userId",
"column_type": "bigint(15)",
"is_nullable": "NO",
"column_comment": "发布评论的用户id"
},
{
"column_name": "momentId",
"column_type": "bigint(15)",
"is_nullable": "NO",
"column_comment": "对应的动态id"
},
{
"column_name": "time",
"column_type": "timestamp",
"is_nullable": "YES",
"column_default": "CURRENT_TIMESTAMP",
"column_comment": "发布时间"
},
{
"column_name": "content",
"column_type": "varchar(1000)",
"is_nullable": "NO",
"column_comment": "内容"
}
],
"code": 200,
"msg": "success"
}
from apijson.
@Bonelol 感谢建议,这个功能已经在做了,Structure#parseResponse就是对返回结果的过滤功能,执行在Reponse表中的JSON结构及内容过滤配置。目前还需要把这个方法接入Parser#getSQLObject。
from apijson.
@Bonelol 已完成,Response中配置了User的GET返回结果:
{"remove": "phone", "put": {"extra": "Response works! Test:He(She) is lazy and wrote nothing here"}}
GET请求返回结果中去除了phone,并且添加了extra,用POST_GET才是原来的结果。目前还没同步服务器,需要自己下载运行
from apijson.
@ about 查看字段key属性、@ correct 自动化校正字段key名称、verify自动化校验字段对应值value 等新功能还未上传到github,明天更新下
from apijson.
感谢更新
from apijson.
Related Issues (20)
- [Lenovo][Fortune 500] The intranet of the biggest PC company Lenovo linked APIJSON
- 【Xiaomi 小米】【500 强】内网部署的飞书内部文档链接了 APIJSON-Demo
- [Xiaomi][Fortune 500] Linked APIJSON-Demo in its official Lark(by ByteDance) website
- [CHINA TELECOM][Fortune 500] China's biggest network provider CHINA TELECOM applied an OpenAPI patent for a low-code platform using APIJSON
- 两张表进行内链查询时,第二张表查询生成的库为默认sys HOT 7
- [Bug]字符 getMethodDefination(method,arguments,type,exceptions,language) 对应的远程函数 getMethodDefination(JSONObject request, String method, String arguments, String type, String exceptions, String language) 不在后端 apijson.demo.DemoFunctionParser 内,也不在父类中!如果需要则先新增对应方法! 请检查函数名和参数数量是否与已定义的函数一致! HOT 1
- [ORACLE] 子查询内部默认添加分页语句,导致in函数无法实现,提示Error Msg = ORA-00913: 值过多的报错 HOT 2
- 【AtlasMap】官网链接了 apijson-column
- [AtlasMap] official website linked apijson-column
- 文档醒目位置没有Getting started,没有说明如何运行这个项目 HOT 1
- [Bug] 达梦数据库做表左关联时提示有歧义的列名[RN] HOT 2
- 【Alibaba 阿里巴巴】【淘天集团】淘宝内网文档链接了 APIJSON
- [Alibaba][Fortune 500] taobao.com internal doc site linked APIJSON
- 希望新增“导出查询结果到excel”的功能 HOT 1
- 查询库表字段信息 HOT 2
- 请求信息中日期/时间的处理方法 HOT 1
- [Bug] 扩展@combine,同一个key在筛选/数据体中可同时存在,两者非互斥逻辑 HOT 4
- 【请教】将查询结果作为远程函数的入参 HOT 2
- [Bug] function校验失败和不允许 UNKNOWN 用户的 GET 请求 HOT 1
- 【问题咨询】响应结果的类型转换
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apijson.