syntax = "v1"

info (
	title:   "platform"
	desc:    "AppBlueprint publish + dynamic CRUD skeleton"
	author:  "aijianzhan"
	version: "v1"
)

@server (
	prefix: /api/v1
)

service platform {
	@handler IssueToken
	post /auth/token

	@handler PublishApp
	post /apps/:slug/publish

	@handler GetBlueprint
	get /apps/:slug/blueprint

	@handler ListRows
	get /apps/:slug/:resource

	@handler CreateRow
	post /apps/:slug/:resource

	@handler GetRow
	get /apps/:slug/:resource/:id

	@handler UpdateRow
	patch /apps/:slug/:resource/:id

	@handler DeleteRow
	delete /apps/:slug/:resource/:id
}
