✨ feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Introduced `field-list.schema.json`, `field-meta.schema.json`, and `field.schema.json` for field configurations. - Added `hooks.schema.json` for defining hooks in the Tibi project. - Created `image-filter.schema.json` for image processing configurations. - Implemented `job.schema.json` for job scheduling configurations. - Added `openapi.schema.json` for OpenAPI metadata generation. - Introduced `permissions.schema.json` for managing permissions in the project. - Created `project.schema.json` for overall project configuration. - Added `projections.schema.json` for defining projections in the project. - Implemented a validation script `validate-schemas.mjs` to ensure schema compliance.
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# yaml-language-server: $schema=../../schemas/config/action.schema.json
|
||||
name: demo-action
|
||||
|
||||
meta:
|
||||
label: { de: Demo Aktion, en: Demo Action }
|
||||
methods:
|
||||
get:
|
||||
query:
|
||||
title: { de: Demo Query, en: Demo Query }
|
||||
fields:
|
||||
- name: verbose
|
||||
type: boolean
|
||||
execution:
|
||||
kind: sync
|
||||
post:
|
||||
data:
|
||||
title: { de: Demo Input, en: Demo Input }
|
||||
fields:
|
||||
- name: dryRun
|
||||
type: boolean
|
||||
execution:
|
||||
kind: sse
|
||||
cancellable: true
|
||||
output:
|
||||
title: { de: Demo Ergebnis, en: Demo Result }
|
||||
mapping:
|
||||
summary:
|
||||
fields:
|
||||
- source: result.status
|
||||
type: string
|
||||
meta:
|
||||
label: { de: Status, en: Status }
|
||||
|
||||
permissions:
|
||||
public:
|
||||
methods:
|
||||
get: true
|
||||
post: false
|
||||
user:
|
||||
methods:
|
||||
get: true
|
||||
post: false
|
||||
admin:
|
||||
methods:
|
||||
get: true
|
||||
post: true
|
||||
|
||||
hooks:
|
||||
get:
|
||||
handle:
|
||||
type: javascript
|
||||
file: hooks/demo-action/get_handle.js
|
||||
post:
|
||||
handle:
|
||||
type: javascript
|
||||
file: hooks/demo-action/post_handle.js
|
||||
Reference in New Issue
Block a user