Comments (8)
@cnlinjie 感谢你的关注。
1.APIJSON对自动生成的SQL语句做了优化,但确实不能在某些场景下做到最优,所以开发效率和运行性能需要使用者自己权衡。建议先用APIJSON实现,反正成本极低。测试过性能后,如果不符合需求就自己优化。
2.可以通过 "@about":true 来查询,而且这个文档是直接用数据库字段自动生成的(而不是人写的独立的文档),相当稳定不会出错。
3.如果是不同服务器,访问不同的URL就行了。如果是同一个服务器的不同数据库schema,可以用 "@Schema":schema 标记。(应该是小写,GitHub把@ 后的内容转成大写了)
最后,确实所有从外面进来的数据都是不可信的,APIJSON支持对请求内容方便地进行各种校验。你说这个例子是误解了这段话,最后一次是指 前端/客户端 不应该把明显有问题的数据提交到服务器,增加服务器压力。例如 用手机号登录,手机号格式是否合法后端虽然也会校验,不合法就返回报错,但前端/客户端在请求前就应该校验,只有所有输入都没有明显错误的前提下才发请求。这时服务器仍然会对手机号格式等校验,但只有最后一次,而不是每次用户点击登录不管对不对都发到服务器去校验。所以前面有明显错误的时候都能“无延时响应”。
from apijson.
@cnlinjie 公司已经在用自动化在线文档了
{
"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.
感谢,回复晚了。
我研究下,在个人私单中参与使用,感谢作者。
from apijson.
@cnlinjie 哈哈,这个场景可以的。APIJSON通用接口(get,post,put,delete等)适用范围是 简单的增删改查操作、复杂的查询操作、简单的事务型操作,可以替代80%左右的传统接口(互联网应用一般能到85%-90%,ERP等管理系统会低一些)。APIJSON能很好地兼容传统接口,不适用的接口建议还是用传统方式做,例如APIJSON Server Demo里的注册、登录、验证码等接口就是用传统方式实现的。
from apijson.
@cnlinjie 看看这个,自动生成markdown文档,可展开/收起的带高亮格式化JSON,嘿嘿
http://apijson.cn/
from apijson.
@cnlinjie
已支持自动化的 join。
例如
Moment INNER JOIN User LEFT JOIN Comment:
"[]":{
"join": "&/User/id@,</Comment/momentId@",
"Moment":{},
"User":{
"name?":"t",
"id@": "/Moment/userId"
},
"Comment":{
"momentId@": "/Moment/id"
}
}
详情见 通用文档/3.2 功能符/数组关键词 中的 join,感谢支持^_^
https://github.com/TommyLemon/APIJSON/blob/master/Document.md#3.2
from apijson.
收到,感谢哈。
from apijson.
@cnlinjie 目前最新版 5.0.0:
增强各种功能;腾讯负责人公开称赞;登记万科发起的采筑电商
https://github.com/Tencent/APIJSON/releases/tag/5.0.0
from apijson.
Related Issues (20)
- [SHEIN] The intranet of China's biggest cross-border e-commerce company SHEIN linked APIJSON and apijson-framework
- [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.