Skip to content

Commit ed05e70

Browse files
committed
2432: Added 'updated' filter to relevant api endpoints
1 parent 3917c6c commit ed05e70

File tree

6 files changed

+148
-37
lines changed

6 files changed

+148
-37
lines changed

public/spec.yaml

Lines changed: 113 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
openapi: 3.1.0
22
info:
3-
title: 'Event database API'
4-
description: ''
3+
title: 'Event Database'
4+
description: 'API for the Event Database'
5+
termsOfService: 'https://example.org'
6+
contact:
7+
name: 'Contact Name'
8+
url: 'https://github.com/itk-dev/event-database-api/'
9+
email: contact@example.org
510
version: 2.0.0
611
servers:
712
-
@@ -14,7 +19,7 @@ paths:
1419
tags:
1520
- DailyOccurrence
1621
responses:
17-
200:
22+
'200':
1823
description: 'DailyOccurrence collection'
1924
content:
2025
application/ld+json:
@@ -172,17 +177,28 @@ paths:
172177
style: form
173178
explode: false
174179
allowReserved: false
180+
-
181+
name: updated
182+
in: query
183+
description: 'Filter base on ISO 8601 datetime (yyyy-MM-dd''T''HH:mm:ssz), e.g. "2004-02-12T15:19:21+00:00" (greater then or equal to)'
184+
required: false
185+
deprecated: false
186+
allowEmptyValue: true
187+
schema:
188+
type: string
189+
style: form
190+
explode: false
191+
allowReserved: false
175192
deprecated: false
176-
parameters: []
177193
'/api/v2/daily_occurrences/{id}':
178194
get:
179195
operationId: api_daily_occurrences_id_get
180196
tags:
181197
- DailyOccurrence
182198
responses:
183-
200:
199+
'200':
184200
description: 'Single daily occurrence'
185-
404:
201+
'404':
186202
description: 'Resource not found'
187203
summary: 'Retrieves a DailyOccurrence resource.'
188204
description: 'Retrieves a DailyOccurrence resource.'
@@ -200,14 +216,13 @@ paths:
200216
explode: false
201217
allowReserved: false
202218
deprecated: false
203-
parameters: []
204219
/api/v2/events:
205220
get:
206221
operationId: api_events_get_collection
207222
tags:
208223
- Event
209224
responses:
210-
200:
225+
'200':
211226
description: 'Event collection'
212227
content:
213228
application/ld+json:
@@ -365,17 +380,28 @@ paths:
365380
style: form
366381
explode: false
367382
allowReserved: false
383+
-
384+
name: updated
385+
in: query
386+
description: 'Filter base on ISO 8601 datetime (yyyy-MM-dd''T''HH:mm:ssz), e.g. "2004-02-12T15:19:21+00:00" (greater then or equal to)'
387+
required: false
388+
deprecated: false
389+
allowEmptyValue: true
390+
schema:
391+
type: string
392+
style: form
393+
explode: false
394+
allowReserved: false
368395
deprecated: false
369-
parameters: []
370396
'/api/v2/events/{id}':
371397
get:
372398
operationId: api_events_id_get
373399
tags:
374400
- Event
375401
responses:
376-
200:
402+
'200':
377403
description: 'Single event'
378-
404:
404+
'404':
379405
description: 'Resource not found'
380406
summary: 'Retrieves a Event resource.'
381407
description: 'Retrieves a Event resource.'
@@ -393,14 +419,13 @@ paths:
393419
explode: false
394420
allowReserved: false
395421
deprecated: false
396-
parameters: []
397422
/api/v2/locations:
398423
get:
399424
operationId: api_locations_get_collection
400425
tags:
401426
- Location
402427
responses:
403-
200:
428+
'200':
404429
description: 'Location collection'
405430
content:
406431
application/ld+json:
@@ -468,17 +493,28 @@ paths:
468493
style: form
469494
explode: false
470495
allowReserved: false
496+
-
497+
name: updated
498+
in: query
499+
description: 'Filter base on ISO 8601 datetime (yyyy-MM-dd''T''HH:mm:ssz), e.g. "2004-02-12T15:19:21+00:00" (greater then or equal to)'
500+
required: false
501+
deprecated: false
502+
allowEmptyValue: true
503+
schema:
504+
type: string
505+
style: form
506+
explode: false
507+
allowReserved: false
471508
deprecated: false
472-
parameters: []
473509
'/api/v2/locations/{id}':
474510
get:
475511
operationId: api_locations_id_get
476512
tags:
477513
- Location
478514
responses:
479-
200:
515+
'200':
480516
description: 'Single location'
481-
404:
517+
'404':
482518
description: 'Resource not found'
483519
summary: 'Get single location based on identifier'
484520
description: 'Retrieves a Location resource.'
@@ -496,14 +532,13 @@ paths:
496532
explode: false
497533
allowReserved: false
498534
deprecated: false
499-
parameters: []
500535
/api/v2/occurrences:
501536
get:
502537
operationId: api_occurrences_get_collection
503538
tags:
504539
- Occurrence
505540
responses:
506-
200:
541+
'200':
507542
description: 'Occurrence collection'
508543
content:
509544
application/ld+json:
@@ -649,17 +684,28 @@ paths:
649684
style: form
650685
explode: false
651686
allowReserved: false
687+
-
688+
name: updated
689+
in: query
690+
description: 'Filter base on ISO 8601 datetime (yyyy-MM-dd''T''HH:mm:ssz), e.g. "2004-02-12T15:19:21+00:00" (greater then or equal to)'
691+
required: false
692+
deprecated: false
693+
allowEmptyValue: true
694+
schema:
695+
type: string
696+
style: form
697+
explode: false
698+
allowReserved: false
652699
deprecated: false
653-
parameters: []
654700
'/api/v2/occurrences/{id}':
655701
get:
656702
operationId: api_occurrences_id_get
657703
tags:
658704
- Occurrence
659705
responses:
660-
200:
706+
'200':
661707
description: 'Single occurrence'
662-
404:
708+
'404':
663709
description: 'Resource not found'
664710
summary: 'Get single occurrence based on identifier'
665711
description: 'Retrieves a Occurrence resource.'
@@ -677,14 +723,13 @@ paths:
677723
explode: false
678724
allowReserved: false
679725
deprecated: false
680-
parameters: []
681726
/api/v2/organizations:
682727
get:
683728
operationId: api_organizations_get_collection
684729
tags:
685730
- Organization
686731
responses:
687-
200:
732+
'200':
688733
description: 'Organization collection'
689734
content:
690735
application/ld+json:
@@ -740,17 +785,28 @@ paths:
740785
style: form
741786
explode: false
742787
allowReserved: false
788+
-
789+
name: updated
790+
in: query
791+
description: 'Filter base on ISO 8601 datetime (yyyy-MM-dd''T''HH:mm:ssz), e.g. "2004-02-12T15:19:21+00:00" (greater then or equal to)'
792+
required: false
793+
deprecated: false
794+
allowEmptyValue: true
795+
schema:
796+
type: string
797+
style: form
798+
explode: false
799+
allowReserved: false
743800
deprecated: false
744-
parameters: []
745801
'/api/v2/organizations/{id}':
746802
get:
747803
operationId: api_organizations_id_get
748804
tags:
749805
- Organization
750806
responses:
751-
200:
807+
'200':
752808
description: 'Single organization'
753-
404:
809+
'404':
754810
description: 'Resource not found'
755811
summary: 'Get single organization based on identifier'
756812
description: 'Retrieves a Organization resource.'
@@ -768,14 +824,13 @@ paths:
768824
explode: false
769825
allowReserved: false
770826
deprecated: false
771-
parameters: []
772827
/api/v2/tags:
773828
get:
774829
operationId: api_tags_get_collection
775830
tags:
776831
- Tag
777832
responses:
778-
200:
833+
'200':
779834
description: 'Tag collection'
780835
content:
781836
application/ld+json:
@@ -819,6 +874,18 @@ paths:
819874
style: form
820875
explode: false
821876
allowReserved: false
877+
-
878+
name: name
879+
in: query
880+
description: 'Search field based on value given'
881+
required: false
882+
deprecated: false
883+
allowEmptyValue: true
884+
schema:
885+
type: string
886+
style: form
887+
explode: false
888+
allowReserved: false
822889
-
823890
name: vocabulary
824891
in: query
@@ -832,16 +899,15 @@ paths:
832899
explode: false
833900
allowReserved: false
834901
deprecated: false
835-
parameters: []
836902
'/api/v2/tags/{slug}':
837903
get:
838904
operationId: api_tags_slug_get
839905
tags:
840906
- Tag
841907
responses:
842-
200:
908+
'200':
843909
description: 'Get single tag'
844-
404:
910+
'404':
845911
description: 'Resource not found'
846912
summary: 'Get single tag'
847913
description: 'Retrieves a Tag resource.'
@@ -859,14 +925,13 @@ paths:
859925
explode: false
860926
allowReserved: false
861927
deprecated: false
862-
parameters: []
863928
/api/v2/vocabularies:
864929
get:
865930
operationId: api_vocabularies_get_collection
866931
tags:
867932
- Vocabulary
868933
responses:
869-
200:
934+
'200':
870935
description: 'Vocabulary collection'
871936
content:
872937
application/ld+json:
@@ -910,6 +975,18 @@ paths:
910975
style: form
911976
explode: false
912977
allowReserved: false
978+
-
979+
name: name
980+
in: query
981+
description: 'Search field based on value given'
982+
required: false
983+
deprecated: false
984+
allowEmptyValue: true
985+
schema:
986+
type: string
987+
style: form
988+
explode: false
989+
allowReserved: false
913990
-
914991
name: tags
915992
in: query
@@ -923,16 +1000,15 @@ paths:
9231000
explode: false
9241001
allowReserved: false
9251002
deprecated: false
926-
parameters: []
9271003
'/api/v2/vocabularies/{slug}':
9281004
get:
9291005
operationId: api_vocabularies_slug_get
9301006
tags:
9311007
- Vocabulary
9321008
responses:
933-
200:
1009+
'200':
9341010
description: 'Get single vocabulary'
935-
404:
1011+
'404':
9361012
description: 'Resource not found'
9371013
summary: 'Get a vocabulary based on slug'
9381014
description: 'Retrieves a Vocabulary resource.'
@@ -950,7 +1026,6 @@ paths:
9501026
explode: false
9511027
allowReserved: false
9521028
deprecated: false
953-
parameters: []
9541029
components:
9551030
schemas:
9561031
DailyOccurrence.DailyOccurrenceRepresentationProvider.jsonld:
@@ -1178,3 +1253,4 @@ security:
11781253
-
11791254
ApiKeyAuth: []
11801255
tags: []
1256+
webhooks: { }

src/Api/Dto/DailyOccurrence.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
properties: [
7272
'start' => 'start',
7373
'end' => 'end',
74+
'updated' => 'start',
7475
],
7576
arguments: [
7677
'config' => [

src/Api/Dto/Event.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
properties: [
7272
'occurrences.start' => 'start',
7373
'occurrences.end' => 'end',
74+
'updated' => 'start',
7475
],
7576
arguments: [
7677
'config' => [

0 commit comments

Comments
 (0)