✨ feat(schema): enhance API configuration schemas with new properties and validations
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- Updated collection.json to include upload defaults, audit logging, query limits, and more. - Enhanced collectionNavigation.json with viewHint configurations. - Added project-wide upload defaults and hook configurations in config.json. - Expanded field.json to support new field types, validations, and properties. - Improved fieldMeta.json with additional widget configurations and properties. - Updated hooks.json to include new bulk operation hooks and audit logging. - Enhanced imageFilter.json with additional image processing options. - Added timeout properties to job.json for better execution control. - Refined permissions.json to allow more granular control over HTTP method permissions and added filter and field visibility options.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "JSON Schema tibi-server hooks configuration",
|
||||
"description": "tibi-server hooks linter",
|
||||
"description": "tibi-server hooks configuration",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
@@ -22,6 +22,10 @@
|
||||
"return": {
|
||||
"description": "hook before returning entries read from database",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
},
|
||||
"file": {
|
||||
"description": "hook for file download requests (GET /collection/:id/:field/*path)",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -45,6 +49,14 @@
|
||||
"return": {
|
||||
"description": "hook before returning result (after database write)",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
},
|
||||
"bulkCreate": {
|
||||
"description": "hook for bulk create (POST with JSON array) — optimised single-DB-call path",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
},
|
||||
"bulkReturn": {
|
||||
"description": "hook before returning bulk create result",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -68,6 +80,14 @@
|
||||
"return": {
|
||||
"description": "hook before returning result (after database write)",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
},
|
||||
"bulkUpdate": {
|
||||
"description": "hook for bulk update (PUT without ID) — optimised single-DB-call path",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
},
|
||||
"bulkReturn": {
|
||||
"description": "hook before returning bulk update result",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -83,6 +103,25 @@
|
||||
"return": {
|
||||
"description": "hook before returning result (after database write)",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
},
|
||||
"bulkDelete": {
|
||||
"description": "hook for bulk delete (DELETE without ID) — optimised single-DB-call path",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
},
|
||||
"bulkReturn": {
|
||||
"description": "hook before returning bulk delete result",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
}
|
||||
}
|
||||
},
|
||||
"audit": {
|
||||
"type": "object",
|
||||
"description": "hooks for audit log entries",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"return": {
|
||||
"description": "hook before returning audit log entries for this collection, can be used to remove sensitive fields from snapshots",
|
||||
"$ref": "#/definitions/hookDef"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,6 +136,10 @@
|
||||
"file": {
|
||||
"type": "string",
|
||||
"description": "location of javascript hook file relative to config.yml base"
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"description": "execution timeout in seconds"
|
||||
}
|
||||
},
|
||||
"required": ["type", "file"]
|
||||
|
||||
Reference in New Issue
Block a user