Giter Club home page Giter Club logo

Comments (6)

TommyLemon avatar TommyLemon commented on May 8, 2024 2

@Bonelol 昨晚做着做着就睡着了,今天中午已更新Java-Server Eclipse版

from apijson.

TommyLemon avatar TommyLemon commented on May 8, 2024 1

@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.

TommyLemon avatar TommyLemon commented on May 8, 2024

@Bonelol 感谢建议,这个功能已经在做了,Structure#parseResponse就是对返回结果的过滤功能,执行在Reponse表中的JSON结构及内容过滤配置。目前还需要把这个方法接入Parser#getSQLObject。

from apijson.

TommyLemon avatar TommyLemon commented on May 8, 2024

@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.

TommyLemon avatar TommyLemon commented on May 8, 2024

@ about 查看字段key属性、@ correct 自动化校正字段key名称、verify自动化校验字段对应值value 等新功能还未上传到github,明天更新下

from apijson.

Bonelol avatar Bonelol commented on May 8, 2024

感谢更新

from apijson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.