From d252b1d3822bdb4d79856afb32202d072f641040 Mon Sep 17 00:00:00 2001 From: Andreas Maierhofer Date: Wed, 6 Mar 2024 12:34:09 +0100 Subject: [PATCH] Add events to json_api fixes hitobito/hitobito_sac_cas#229 --- spec/support/graphiti/schema.json | 273 +++++++++++++++++++++++++++--- 1 file changed, 250 insertions(+), 23 deletions(-) diff --git a/spec/support/graphiti/schema.json b/spec/support/graphiti/schema.json index 966c2c73..1b6f6dff 100644 --- a/spec/support/graphiti/schema.json +++ b/spec/support/graphiti/schema.json @@ -143,6 +143,242 @@ ] } }, + { + "name": "EventResource", + "type": "events", + "graphql_entrypoint": "events", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "group_ids": { + "type": "array_of_integers", + "readable": true, + "writable": false, + "description": null + }, + "type": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "kind_id": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "name": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "state": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "number": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "motto": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "cost": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "location": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "dates": { + "type": "array_of_event_dates", + "readable": true, + "writable": false, + "description": null + }, + "application_opening_at": { + "type": "date", + "readable": true, + "writable": false, + "description": null + }, + "application_closing_at": { + "type": "date", + "readable": true, + "writable": false, + "description": null + }, + "participant_count": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "application_contact_id": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "applicant_count": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "maximum_participants": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "created_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + }, + "updated_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + }, + "training_days": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + }, + "training_days": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "kind_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "state": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "updated_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "type": { + "type": "string", + "operators": [ + "eq" + ] + }, + "group_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq" + ] + }, + "before_or_on": { + "type": "date", + "operators": [ + "eq" + ], + "single": true + }, + "after_or_on": { + "type": "date", + "operators": [ + "eq" + ], + "single": true + }, + "training_days": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + } + }, + "relationships": { + "contact": { + "type": "belongs_to", + "description": null, + "resource": "PersonResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, { "name": "GroupResource", "type": "groups", @@ -676,12 +912,6 @@ "readable": "guarded", "writable": "guarded", "description": null - }, - "language": { - "type": "string", - "readable": true, - "writable": true, - "description": null } }, "extra_attributes": { @@ -714,8 +944,6 @@ "gender": { }, "birthday": { - }, - "language": { } }, "filters": { @@ -909,21 +1137,6 @@ "lte" ] }, - "language": { - "type": "string", - "operators": [ - "eq", - "not_eq", - "eql", - "not_eql", - "prefix", - "not_prefix", - "suffix", - "not_suffix", - "match", - "not_match" - ] - }, "updated_at": { "type": "datetime", "operators": [ @@ -1458,6 +1671,16 @@ } ], "endpoints": { + "/api/events": { + "actions": { + "index": { + "resource": "EventResource" + }, + "show": { + "resource": "EventResource" + } + } + }, "/api/groups": { "actions": { "index": { @@ -1574,6 +1797,10 @@ "array_of_datetimes": { "kind": "array", "description": "Base Type." + }, + "array_of_event_dates": { + "kind": "array", + "description": "Base Type." } } } \ No newline at end of file