diff --git a/api/src/Entity/Day.php b/api/src/Entity/Day.php index e1e065d774..7b490cf5ef 100644 --- a/api/src/Entity/Day.php +++ b/api/src/Entity/Day.php @@ -8,7 +8,6 @@ use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; -use ApiPlatform\Metadata\Link; use App\Repository\DayRepository; use App\Serializer\Normalizer\RelatedCollectionLink; use Doctrine\Common\Collections\ArrayCollection; @@ -34,13 +33,6 @@ normalizationContext: self::COLLECTION_NORMALIZATION_CONTEXT, security: 'is_authenticated()' ), - new GetCollection( - uriTemplate: self::PERIOD_SUBRESOURCE_URI_TEMPLATE, - uriVariables: [ - 'periodId' => new Link(toProperty: 'period', fromClass: Period::class), - ], - security: 'is_fully_authenticated()', - ), ], denormalizationContext: ['groups' => ['write']], normalizationContext: ['groups' => ['read']], @@ -51,8 +43,6 @@ #[ORM\Entity(repositoryClass: DayRepository::class)] #[ORM\UniqueConstraint(name: 'offset_period_idx', columns: ['periodId', 'dayOffset'])] class Day extends BaseEntity implements BelongsToCampInterface { - public const PERIOD_SUBRESOURCE_URI_TEMPLATE = '/periods/{periodId}/days{._format}'; - public const ITEM_NORMALIZATION_CONTEXT = [ 'groups' => [ 'read', @@ -71,11 +61,7 @@ class Day extends BaseEntity implements BelongsToCampInterface { /** * The list of people who have a whole-day responsibility on this day. */ - #[ApiProperty( - writable: false, - uriTemplate: DayResponsible::DAY_SUBRESOURCE_URI_TEMPLATE, - example: '/days/1a2b3c4d/day_responsibles' - )] + #[ApiProperty(writable: false, example: '["/day_responsibles/1a2b3c4d"]')] #[Groups(['read'])] #[ORM\OneToMany(targetEntity: DayResponsible::class, mappedBy: 'day', orphanRemoval: true)] public Collection $dayResponsibles; @@ -175,10 +161,7 @@ public function getEnd(): ?\DateTime { /** * @return DayResponsible[] */ - #[ApiProperty( - readableLink: true, - uriTemplate: DayResponsible::DAY_SUBRESOURCE_URI_TEMPLATE, - )] + #[ApiProperty(readableLink: true)] #[SerializedName('dayResponsibles')] #[Groups(['Day:DayResponsibles'])] public function getEmbeddedDayResponsibles(): array { diff --git a/api/src/Entity/DayResponsible.php b/api/src/Entity/DayResponsible.php index 68448793eb..a4acf15864 100644 --- a/api/src/Entity/DayResponsible.php +++ b/api/src/Entity/DayResponsible.php @@ -9,7 +9,6 @@ use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; -use ApiPlatform\Metadata\Link; use ApiPlatform\Metadata\Post; use App\Repository\DayResponsibleRepository; use App\Validator\AssertBelongsToSameCamp; @@ -32,13 +31,6 @@ new GetCollection( security: 'is_authenticated()' ), - new GetCollection( - uriTemplate: self::DAY_SUBRESOURCE_URI_TEMPLATE, - uriVariables: [ - 'dayId' => new Link(toProperty: 'day', fromClass: Day::class), - ], - security: 'is_fully_authenticated()', - ), new Post( securityPostDenormalize: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)' ), @@ -54,8 +46,6 @@ #[ORM\Entity(repositoryClass: DayResponsibleRepository::class)] #[ORM\UniqueConstraint(name: 'day_campCollaboration_unique', columns: ['dayId', 'campCollaborationId'])] class DayResponsible extends BaseEntity implements BelongsToCampInterface { - public const DAY_SUBRESOURCE_URI_TEMPLATE = '/days/{dayId}/day_responsibles{._format}'; - /** * The day on which the person is responsible. */ diff --git a/api/src/Entity/Period.php b/api/src/Entity/Period.php index 67f47430fa..f4f768646e 100644 --- a/api/src/Entity/Period.php +++ b/api/src/Entity/Period.php @@ -68,11 +68,7 @@ class Period extends BaseEntity implements BelongsToCampInterface { /** * The days in this time period. These are generated automatically. */ - #[ApiProperty( - writable: false, - uriTemplate: Day::PERIOD_SUBRESOURCE_URI_TEMPLATE, - example: '/periods/1a2b3c4d/days' - )] + #[ApiProperty(writable: false, example: '["/days?period=/periods/1a2b3c4d"]')] #[Groups(['read'])] #[ORM\OneToMany(targetEntity: Day::class, mappedBy: 'period', orphanRemoval: true, cascade: ['persist'])] #[ORM\OrderBy(['dayOffset' => 'ASC'])] @@ -84,11 +80,7 @@ class Period extends BaseEntity implements BelongsToCampInterface { * * @var Collection */ - #[ApiProperty( - writable: false, - uriTemplate: ScheduleEntry::PERIOD_SUBRESOURCE_URI_TEMPLATE, - example: '/periods/1a2b3c4d/schedule_entries' - )] + #[ApiProperty(writable: false, example: '["/schedule_entries/1a2b3c4d"]')] #[Groups(['read'])] #[ORM\OneToMany(targetEntity: ScheduleEntry::class, mappedBy: 'period')] #[ORM\OrderBy(['startOffset' => 'ASC', 'left' => 'ASC', 'endOffset' => 'DESC', 'id' => 'ASC'])] @@ -186,10 +178,7 @@ public function __construct() { /** * @return Day[] */ - #[ApiProperty( - readableLink: true, - uriTemplate: Day::PERIOD_SUBRESOURCE_URI_TEMPLATE, - )] + #[ApiProperty(readableLink: true)] #[SerializedName('days')] #[Groups('Period:Days')] public function getEmbeddedDays(): array { diff --git a/api/src/Entity/ScheduleEntry.php b/api/src/Entity/ScheduleEntry.php index 679d8acf0f..d526998ff6 100644 --- a/api/src/Entity/ScheduleEntry.php +++ b/api/src/Entity/ScheduleEntry.php @@ -9,7 +9,6 @@ use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; -use ApiPlatform\Metadata\Link; use ApiPlatform\Metadata\Patch; use ApiPlatform\Metadata\Post; use App\Doctrine\Filter\ExpressionDateTimeFilter; @@ -43,13 +42,6 @@ new GetCollection( security: 'is_authenticated()' ), - new GetCollection( - uriTemplate: self::PERIOD_SUBRESOURCE_URI_TEMPLATE, - uriVariables: [ - 'periodId' => new Link(toProperty: 'period', fromClass: Period::class), - ], - security: 'is_fully_authenticated()', - ), new Post( denormalizationContext: ['groups' => ['write', 'create']], normalizationContext: self::ITEM_NORMALIZATION_CONTEXT, @@ -69,8 +61,6 @@ #[ORM\Index(columns: ['startOffset'])] #[ORM\Index(columns: ['endOffset'])] class ScheduleEntry extends BaseEntity implements BelongsToCampInterface { - public const PERIOD_SUBRESOURCE_URI_TEMPLATE = '/periods/{periodId}/schedule_entries{._format}'; - public const ITEM_NORMALIZATION_CONTEXT = [ 'groups' => ['read', 'ScheduleEntry:Activity'], 'swagger_definition_name' => 'read', diff --git a/api/tests/Api/DayResponsibles/ListDayResponsiblesTest.php b/api/tests/Api/DayResponsibles/ListDayResponsiblesTest.php index f6ef4097c3..0ff94edf5b 100644 --- a/api/tests/Api/DayResponsibles/ListDayResponsiblesTest.php +++ b/api/tests/Api/DayResponsibles/ListDayResponsiblesTest.php @@ -101,34 +101,4 @@ public function testListDayResponsiblesFilteredByDayInCampPrototypeIsAllowedForU ['href' => $this->getIriFor('dayResponsible1day1period1campPrototype')], ], $response->toArray()['_links']['items']); } - - public function testListDayResponsiblesAsDaySubresourceIsAllowedForCollaborator() { - $day = static::getFixture('day1period1'); - $response = static::createClientWithCredentials()->request('GET', '/days/'.$day->getId().'/day_responsibles'); - $this->assertResponseStatusCodeSame(200); - $this->assertJsonContains([ - 'totalItems' => 1, - '_links' => [ - 'items' => [], - ], - '_embedded' => [ - 'items' => [], - ], - ]); - $this->assertEqualsCanonicalizing([ - ['href' => $this->getIriFor('dayResponsible1')], - ], $response->toArray()['_links']['items']); - } - - public function testListDayResponsiblesAsDaySubresourceIsDeniedForUnrelatedUser() { - $day = static::getFixture('day1period1'); - $response = static::createClientWithCredentials(['email' => static::$fixtures['user4unrelated']->getEmail()]) - ->request('GET', '/days/'.$day->getId().'/day_responsibles') - ; - - $this->assertResponseStatusCodeSame(200); - - $this->assertJsonContains(['totalItems' => 0]); - $this->assertArrayNotHasKey('items', $response->toArray()['_links']); - } } diff --git a/api/tests/Api/Days/ListDaysTest.php b/api/tests/Api/Days/ListDaysTest.php index 8c97ed6ae1..3962596481 100644 --- a/api/tests/Api/Days/ListDaysTest.php +++ b/api/tests/Api/Days/ListDaysTest.php @@ -122,36 +122,4 @@ public function testListDaysFilteredByPeriodInCampPrototypeIsAllowedForCollabora ['href' => $this->getIriFor('day1period1campPrototype')], ], $response->toArray()['_links']['items']); } - - public function testListDaysAsPeriodSubresourceIsAllowedForCollaborator() { - $period = static::getFixture('period1'); - $response = static::createClientWithCredentials()->request('GET', '/periods/'.$period->getId().'/days'); - $this->assertResponseStatusCodeSame(200); - $this->assertJsonContains([ - 'totalItems' => 3, - '_links' => [ - 'items' => [], - ], - '_embedded' => [ - 'items' => [], - ], - ]); - $this->assertEqualsCanonicalizing([ - ['href' => $this->getIriFor('day1period1')], - ['href' => $this->getIriFor('day2period1')], - ['href' => $this->getIriFor('day3period1')], - ], $response->toArray()['_links']['items']); - } - - public function testListDaysAsPeriodSubresourceIsDeniedForUnrelatedUser() { - $period = static::getFixture('period1'); - $response = static::createClientWithCredentials(['email' => static::$fixtures['user4unrelated']->getEmail()]) - ->request('GET', '/periods/'.$period->getId().'/days') - ; - - $this->assertResponseStatusCodeSame(200); - - $this->assertJsonContains(['totalItems' => 0]); - $this->assertArrayNotHasKey('items', $response->toArray()['_links']); - } } diff --git a/api/tests/Api/Days/ReadDayTest.php b/api/tests/Api/Days/ReadDayTest.php index 306334cdbb..a43af3a9d4 100644 --- a/api/tests/Api/Days/ReadDayTest.php +++ b/api/tests/Api/Days/ReadDayTest.php @@ -62,7 +62,7 @@ public function testGetSingleDayIsAllowedForGuest() { '_links' => [ 'period' => ['href' => $this->getIriFor('period1')], 'scheduleEntries' => ['href' => '/schedule_entries?period=%2Fperiods%2F'.$day->period->getId().'&start%5Bstrictly_before%5D='.urlencode($end).'&end%5Bafter%5D='.urlencode($start)], - 'dayResponsibles' => ['href' => '/days/'.$day->getId().'/day_responsibles'], + 'dayResponsibles' => ['href' => '/day_responsibles?day=%2Fdays%2F'.$day->getId()], ], ]); } @@ -83,7 +83,7 @@ public function testGetSingleDayIsAllowedForMember() { '_links' => [ 'period' => ['href' => $this->getIriFor('period1')], 'scheduleEntries' => ['href' => '/schedule_entries?period=%2Fperiods%2F'.$day->period->getId().'&start%5Bstrictly_before%5D='.urlencode($end).'&end%5Bafter%5D='.urlencode($start)], - 'dayResponsibles' => ['href' => '/days/'.$day->getId().'/day_responsibles'], + 'dayResponsibles' => ['href' => '/day_responsibles?day=%2Fdays%2F'.$day->getId()], ], ]); } @@ -102,7 +102,7 @@ public function testGetSingleDayIsAllowedForManager() { '_links' => [ 'period' => ['href' => $this->getIriFor('period1')], 'scheduleEntries' => ['href' => '/schedule_entries?period=%2Fperiods%2F'.$day->period->getId().'&start%5Bstrictly_before%5D='.urlencode($end).'&end%5Bafter%5D='.urlencode($start)], - 'dayResponsibles' => ['href' => '/days/'.$day->getId().'/day_responsibles'], + 'dayResponsibles' => ['href' => '/day_responsibles?day=%2Fdays%2F'.$day->getId()], ], ]); } @@ -121,7 +121,7 @@ public function testGetSingleDayFromCampPrototypeIsAllowedForUnrelatedUser() { '_links' => [ 'period' => ['href' => $this->getIriFor('period1campPrototype')], 'scheduleEntries' => ['href' => '/schedule_entries?period=%2Fperiods%2F'.$day->period->getId().'&start%5Bstrictly_before%5D='.urlencode($end).'&end%5Bafter%5D='.urlencode($start)], - 'dayResponsibles' => ['href' => '/days/'.$day->getId().'/day_responsibles'], + 'dayResponsibles' => ['href' => '/day_responsibles?day=%2Fdays%2F'.$day->getId()], ], ]); } diff --git a/api/tests/Api/Periods/ReadPeriodTest.php b/api/tests/Api/Periods/ReadPeriodTest.php index fd32d9febc..d382408357 100644 --- a/api/tests/Api/Periods/ReadPeriodTest.php +++ b/api/tests/Api/Periods/ReadPeriodTest.php @@ -62,8 +62,8 @@ public function testGetSinglePeriodIsAllowedForGuest() { '_links' => [ 'camp' => ['href' => $this->getIriFor('camp1')], 'materialItems' => ['href' => '/material_items?period=%2Fperiods%2F'.$period->getId()], - 'days' => ['href' => '/periods/'.$period->getId().'/days'], - 'scheduleEntries' => ['href' => '/periods/'.$period->getId().'/schedule_entries'], + 'days' => ['href' => '/days?period=%2Fperiods%2F'.$period->getId()], + 'scheduleEntries' => ['href' => '/schedule_entries?period=%2Fperiods%2F'.$period->getId()], 'contentNodes' => ['href' => '/content_nodes?period=%2Fperiods%2F'.$period->getId()], 'dayResponsibles' => ['href' => '/day_responsibles?day.period=%2Fperiods%2F'.$period->getId()], ], @@ -86,8 +86,8 @@ public function testGetSinglePeriodIsAllowedForMember() { '_links' => [ 'camp' => ['href' => $this->getIriFor('camp1')], 'materialItems' => ['href' => '/material_items?period=%2Fperiods%2F'.$period->getId()], - 'days' => ['href' => '/periods/'.$period->getId().'/days'], - 'scheduleEntries' => ['href' => '/periods/'.$period->getId().'/schedule_entries'], + 'days' => ['href' => '/days?period=%2Fperiods%2F'.$period->getId()], + 'scheduleEntries' => ['href' => '/schedule_entries?period=%2Fperiods%2F'.$period->getId()], ], ]); } @@ -105,8 +105,8 @@ public function testGetSinglePeriodIsAllowedForManager() { '_links' => [ 'camp' => ['href' => $this->getIriFor('camp1')], 'materialItems' => ['href' => '/material_items?period=%2Fperiods%2F'.$period->getId()], - 'days' => ['href' => '/periods/'.$period->getId().'/days'], - 'scheduleEntries' => ['href' => '/periods/'.$period->getId().'/schedule_entries'], + 'days' => ['href' => '/days?period=%2Fperiods%2F'.$period->getId()], + 'scheduleEntries' => ['href' => '/schedule_entries?period=%2Fperiods%2F'.$period->getId()], ], ]); } diff --git a/api/tests/Api/ScheduleEntries/ListScheduleEntriesTest.php b/api/tests/Api/ScheduleEntries/ListScheduleEntriesTest.php index 8bd4a298aa..65189423d2 100644 --- a/api/tests/Api/ScheduleEntries/ListScheduleEntriesTest.php +++ b/api/tests/Api/ScheduleEntries/ListScheduleEntriesTest.php @@ -375,36 +375,4 @@ public function testListScheduleEntriesFilteredByInvalidEndDoesntFilter() { ['href' => $this->getIriFor('scheduleEntry2period1campPrototype')], ], $response->toArray()['_links']['items']); } - - public function testListScheduleEntriesAsPeriodSubresourceIsAllowedForCollaborator() { - $period = static::getFixture('period1'); - $response = static::createClientWithCredentials()->request('GET', '/periods/'.$period->getId().'/schedule_entries'); - $this->assertResponseStatusCodeSame(200); - $this->assertJsonContains([ - 'totalItems' => 3, - '_links' => [ - 'items' => [], - ], - '_embedded' => [ - 'items' => [], - ], - ]); - $this->assertEqualsCanonicalizing([ - ['href' => $this->getIriFor('scheduleEntry1')], - ['href' => $this->getIriFor('scheduleEntry2')], - ['href' => $this->getIriFor('scheduleEntry1period1camp1')], - ], $response->toArray()['_links']['items']); - } - - public function testListScheduleEntriesAsPeriodSubresourceIsDeniedForUnrelatedUser() { - $period = static::getFixture('period1'); - $response = static::createClientWithCredentials(['email' => static::$fixtures['user4unrelated']->getEmail()]) - ->request('GET', '/periods/'.$period->getId().'/schedule_entries') - ; - - $this->assertResponseStatusCodeSame(200); - - $this->assertJsonContains(['totalItems' => 0]); - $this->assertArrayNotHasKey('items', $response->toArray()['_links']); - } } diff --git a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml index d1fa6836a2..7ff127bad6 100644 --- a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml +++ b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml @@ -13231,13 +13231,9 @@ components: example: test type: string type: object - Day-read: + Day-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User: deprecated: false - description: |- - A day in a time period of a camp. This is represented as a reference to the time period - along with a number of days offset from the period's starting date. This is to make it - easier to move the whole periods to different dates. Days are created automatically when - creating or updating periods, and are not writable through the API directly. + description: '' properties: dayOffset: description: "The 0-based offset in days from the period's start date when this day starts." @@ -13246,71 +13242,13 @@ components: type: integer dayResponsibles: description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference - readOnly: true - type: string - end: - description: 'The end date and time of the day. This is a read-only convenience property.' - example: '2022-01-03T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - id: - description: 'An internal, unique, randomly generated identifier of this entity.' - example: 1a2b3c4d - maxLength: 16 - readOnly: true - type: string - number: - description: 'The 1-based cardinal number of the day in the period. Not unique within the camp.' - example: '2' - readOnly: true - type: integer - period: - description: 'The time period that this day belongs to.' - example: /periods/1a2b3c4d - format: iri-reference - type: string - scheduleEntries: - description: "All scheduleEntries in this day's period which overlap with this day (using midnight as cutoff)." - example: '/schedule_entries?period=%2Fperiods%2F1a2b3c4d&start%5Bstrictly_before%5D=2022-01-03T00%3A00%3A00%2B00%3A00&end%5Bafter%5D=2022-01-02T00%3A00%3A00%2B00%3A00' + example: '["/day_responsibles/1a2b3c4d"]' items: example: 'https://example.com/' format: iri-reference type: string readOnly: true type: array - start: - description: 'The start date and time of the day. This is a read-only convenience property.' - example: '2022-01-02T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - required: - - dayOffset - - dayResponsibles - - period - type: object - Day-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User: - deprecated: false - description: '' - properties: - dayOffset: - description: "The 0-based offset in days from the period's start date when this day starts." - example: '1' - readOnly: true - type: integer - dayResponsibles: - description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference - readOnly: true - type: string end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13374,7 +13312,7 @@ components: items: $ref: '#/components/schemas/DayResponsible-read_Day.DayResponsibles' readOnly: true - type: unknown_type + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13432,75 +13370,13 @@ components: type: integer dayResponsibles: description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference - readOnly: true - type: string - end: - description: 'The end date and time of the day. This is a read-only convenience property.' - example: '2022-01-03T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - id: - description: 'An internal, unique, randomly generated identifier of this entity.' - example: 1a2b3c4d - maxLength: 16 - readOnly: true - type: string - number: - description: 'The 1-based cardinal number of the day in the period. Not unique within the camp.' - example: '2' - readOnly: true - type: integer - period: - description: 'The time period that this day belongs to.' - example: /periods/1a2b3c4d - format: iri-reference - type: string - scheduleEntries: - description: "All scheduleEntries in this day's period which overlap with this day (using midnight as cutoff)." - example: '/schedule_entries?period=%2Fperiods%2F1a2b3c4d&start%5Bstrictly_before%5D=2022-01-03T00%3A00%3A00%2B00%3A00&end%5Bafter%5D=2022-01-02T00%3A00%3A00%2B00%3A00' + example: '["/day_responsibles/1a2b3c4d"]' items: example: 'https://example.com/' format: iri-reference type: string readOnly: true type: array - start: - description: 'The start date and time of the day. This is a read-only convenience property.' - example: '2022-01-02T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - required: - - dayOffset - - dayResponsibles - - period - type: object - Day.jsonapi-read: - deprecated: false - description: |- - A day in a time period of a camp. This is represented as a reference to the time period - along with a number of days offset from the period's starting date. This is to make it - easier to move the whole periods to different dates. Days are created automatically when - creating or updating periods, and are not writable through the API directly. - properties: - dayOffset: - description: "The 0-based offset in days from the period's start date when this day starts." - example: '1' - readOnly: true - type: integer - dayResponsibles: - description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference - readOnly: true - type: string end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13558,10 +13434,13 @@ components: type: integer dayResponsibles: description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference + example: '["/day_responsibles/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13625,7 +13504,7 @@ components: items: $ref: '#/components/schemas/DayResponsible.jsonapi-read_Day.DayResponsibles' readOnly: true - type: unknown_type + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13683,10 +13562,13 @@ components: type: integer dayResponsibles: description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference + example: '["/day_responsibles/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13733,13 +13615,9 @@ components: - dayResponsibles - period type: object - Day.jsonhal-read: + Day.jsonhal-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User: deprecated: false - description: |- - A day in a time period of a camp. This is represented as a reference to the time period - along with a number of days offset from the period's starting date. This is to make it - easier to move the whole periods to different dates. Days are created automatically when - creating or updating periods, and are not writable through the API directly. + description: '' properties: _links: properties: @@ -13757,10 +13635,13 @@ components: type: integer dayResponsibles: description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference + example: '["/day_responsibles/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13807,9 +13688,13 @@ components: - dayResponsibles - period type: object - Day.jsonhal-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User: + Day.jsonhal-read_Day.DayResponsibles: deprecated: false - description: '' + description: |- + A day in a time period of a camp. This is represented as a reference to the time period + along with a number of days offset from the period's starting date. This is to make it + easier to move the whole periods to different dates. Days are created automatically when + creating or updating periods, and are not writable through the API directly. properties: _links: properties: @@ -13826,11 +13711,10 @@ components: readOnly: true type: integer dayResponsibles: - description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference + items: + $ref: '#/components/schemas/DayResponsible.jsonhal-read_Day.DayResponsibles' readOnly: true - type: string + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13877,13 +13761,9 @@ components: - dayResponsibles - period type: object - Day.jsonhal-read_Day.DayResponsibles: + Day.jsonhal-read_Period.Camp_Period.Days: deprecated: false - description: |- - A day in a time period of a camp. This is represented as a reference to the time period - along with a number of days offset from the period's starting date. This is to make it - easier to move the whole periods to different dates. Days are created automatically when - creating or updating periods, and are not writable through the API directly. + description: '' properties: _links: properties: @@ -13900,10 +13780,14 @@ components: readOnly: true type: integer dayResponsibles: + description: 'The list of people who have a whole-day responsibility on this day.' + example: '["/day_responsibles/1a2b3c4d"]' items: - $ref: '#/components/schemas/DayResponsible.jsonhal-read_Day.DayResponsibles' + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: unknown_type + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -13950,19 +13834,33 @@ components: - dayResponsibles - period type: object - Day.jsonhal-read_Period.Camp_Period.Days: + Day.jsonld-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User: deprecated: false description: '' properties: - _links: - properties: - self: + '@context': + oneOf: + - + additionalProperties: true properties: - href: - format: iri-reference + '@vocab': type: string + hydra: + enum: ['http://www.w3.org/ns/hydra/core#'] + type: string + required: + - '@vocab' + - hydra type: object - type: object + - + type: string + readOnly: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string dayOffset: description: "The 0-based offset in days from the period's start date when this day starts." example: '1' @@ -13970,10 +13868,13 @@ components: type: integer dayResponsibles: description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference + example: '["/day_responsibles/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -14020,7 +13921,7 @@ components: - dayResponsibles - period type: object - Day.jsonld-read: + Day.jsonld-read_Day.DayResponsibles: deprecated: false description: |- A day in a time period of a camp. This is represented as a reference to the time period @@ -14028,6 +13929,23 @@ components: easier to move the whole periods to different dates. Days are created automatically when creating or updating periods, and are not writable through the API directly. properties: + '@context': + oneOf: + - + additionalProperties: true + properties: + '@vocab': + type: string + hydra: + enum: ['http://www.w3.org/ns/hydra/core#'] + type: string + required: + - '@vocab' + - hydra + type: object + - + type: string + readOnly: true '@id': readOnly: true type: string @@ -14040,11 +13958,10 @@ components: readOnly: true type: integer dayResponsibles: - description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference + items: + $ref: '#/components/schemas/DayResponsible.jsonld-read_Day.DayResponsibles' readOnly: true - type: string + type: array end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -14091,7 +14008,7 @@ components: - dayResponsibles - period type: object - Day.jsonld-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User: + Day.jsonld-read_Period.Camp_Period.Days: deprecated: false description: '' properties: @@ -14125,181 +14042,13 @@ components: type: integer dayResponsibles: description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference - readOnly: true - type: string - end: - description: 'The end date and time of the day. This is a read-only convenience property.' - example: '2022-01-03T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - id: - description: 'An internal, unique, randomly generated identifier of this entity.' - example: 1a2b3c4d - maxLength: 16 - readOnly: true - type: string - number: - description: 'The 1-based cardinal number of the day in the period. Not unique within the camp.' - example: '2' - readOnly: true - type: integer - period: - description: 'The time period that this day belongs to.' - example: /periods/1a2b3c4d - format: iri-reference - type: string - scheduleEntries: - description: "All scheduleEntries in this day's period which overlap with this day (using midnight as cutoff)." - example: '/schedule_entries?period=%2Fperiods%2F1a2b3c4d&start%5Bstrictly_before%5D=2022-01-03T00%3A00%3A00%2B00%3A00&end%5Bafter%5D=2022-01-02T00%3A00%3A00%2B00%3A00' - items: - example: 'https://example.com/' - format: iri-reference - type: string - readOnly: true - type: array - start: - description: 'The start date and time of the day. This is a read-only convenience property.' - example: '2022-01-02T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - required: - - dayOffset - - dayResponsibles - - period - type: object - Day.jsonld-read_Day.DayResponsibles: - deprecated: false - description: |- - A day in a time period of a camp. This is represented as a reference to the time period - along with a number of days offset from the period's starting date. This is to make it - easier to move the whole periods to different dates. Days are created automatically when - creating or updating periods, and are not writable through the API directly. - properties: - '@context': - oneOf: - - - additionalProperties: true - properties: - '@vocab': - type: string - hydra: - enum: ['http://www.w3.org/ns/hydra/core#'] - type: string - required: - - '@vocab' - - hydra - type: object - - - type: string - readOnly: true - '@id': - readOnly: true - type: string - '@type': - readOnly: true - type: string - dayOffset: - description: "The 0-based offset in days from the period's start date when this day starts." - example: '1' - readOnly: true - type: integer - dayResponsibles: - items: - $ref: '#/components/schemas/DayResponsible.jsonld-read_Day.DayResponsibles' - readOnly: true - type: unknown_type - end: - description: 'The end date and time of the day. This is a read-only convenience property.' - example: '2022-01-03T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - id: - description: 'An internal, unique, randomly generated identifier of this entity.' - example: 1a2b3c4d - maxLength: 16 - readOnly: true - type: string - number: - description: 'The 1-based cardinal number of the day in the period. Not unique within the camp.' - example: '2' - readOnly: true - type: integer - period: - description: 'The time period that this day belongs to.' - example: /periods/1a2b3c4d - format: iri-reference - type: string - scheduleEntries: - description: "All scheduleEntries in this day's period which overlap with this day (using midnight as cutoff)." - example: '/schedule_entries?period=%2Fperiods%2F1a2b3c4d&start%5Bstrictly_before%5D=2022-01-03T00%3A00%3A00%2B00%3A00&end%5Bafter%5D=2022-01-02T00%3A00%3A00%2B00%3A00' - items: - example: 'https://example.com/' - format: iri-reference - type: string + example: '["/day_responsibles/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true type: array - start: - description: 'The start date and time of the day. This is a read-only convenience property.' - example: '2022-01-02T00:00:00+00:00' - format: date - readOnly: true - type: - - 'null' - - string - required: - - dayOffset - - dayResponsibles - - period - type: object - Day.jsonld-read_Period.Camp_Period.Days: - deprecated: false - description: '' - properties: - '@context': - oneOf: - - - additionalProperties: true - properties: - '@vocab': - type: string - hydra: - enum: ['http://www.w3.org/ns/hydra/core#'] - type: string - required: - - '@vocab' - - hydra - type: object - - - type: string - readOnly: true - '@id': - readOnly: true - type: string - '@type': - readOnly: true - type: string - dayOffset: - description: "The 0-based offset in days from the period's start date when this day starts." - example: '1' - readOnly: true - type: integer - dayResponsibles: - description: 'The list of people who have a whole-day responsibility on this day.' - example: /days/1a2b3c4d/day_responsibles - format: iri-reference - readOnly: true - type: string end: description: 'The end date and time of the day. This is a read-only convenience property.' example: '2022-01-03T00:00:00+00:00' @@ -17270,10 +17019,13 @@ components: type: array days: description: 'The days in this time period. These are generated automatically.' - example: /periods/1a2b3c4d/days - format: iri-reference + example: '["/days?period=/periods/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -17309,10 +17061,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -17358,7 +17113,7 @@ components: items: $ref: '#/components/schemas/Day-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -17394,10 +17149,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -17447,7 +17205,7 @@ components: items: $ref: '#/components/schemas/Day-read_Period.Camp_Period.Days' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -17483,10 +17241,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -17614,10 +17375,13 @@ components: type: array days: description: 'The days in this time period. These are generated automatically.' - example: /periods/1a2b3c4d/days - format: iri-reference + example: '["/days?period=/periods/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -17653,10 +17417,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -17702,7 +17469,7 @@ components: items: $ref: '#/components/schemas/Day.jsonapi-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -17738,10 +17505,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -17791,7 +17561,7 @@ components: items: $ref: '#/components/schemas/Day.jsonapi-read_Period.Camp_Period.Days' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -17827,10 +17597,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -17967,10 +17740,13 @@ components: type: array days: description: 'The days in this time period. These are generated automatically.' - example: /periods/1a2b3c4d/days - format: iri-reference + example: '["/days?period=/periods/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -18006,10 +17782,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -18064,7 +17843,7 @@ components: items: $ref: '#/components/schemas/Day.jsonhal-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -18100,10 +17879,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -18162,7 +17944,7 @@ components: items: $ref: '#/components/schemas/Day.jsonhal-read_Period.Camp_Period.Days' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -18198,11 +17980,14 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference - readOnly: true - type: string - start: + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string + readOnly: true + type: array + start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' format: date @@ -18323,10 +18108,13 @@ components: type: array days: description: 'The days in this time period. These are generated automatically.' - example: /periods/1a2b3c4d/days - format: iri-reference + example: '["/days?period=/periods/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -18362,10 +18150,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -18434,7 +18225,7 @@ components: items: $ref: '#/components/schemas/Day.jsonld-read_Camp.Periods_Period.Days_Camp.CampCollaborations_CampCollaboration.User' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -18470,10 +18261,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -18546,7 +18340,7 @@ components: items: $ref: '#/components/schemas/Day.jsonld-read_Period.Camp_Period.Days' readOnly: true - type: unknown_type + type: array description: description: 'A free text name for the period. Useful to distinguish multiple periods in the same camp.' example: Hauptlager @@ -18582,10 +18376,13 @@ components: description: |- All time slots for programme that are part of this time period. A schedule entry may span over multiple days, but may not end later than the period. - example: /periods/1a2b3c4d/schedule_entries - format: iri-reference + example: '["/schedule_entries/1a2b3c4d"]' + items: + example: 'https://example.com/' + format: iri-reference + type: string readOnly: true - type: string + type: array start: description: 'The day on which the period starts, as an ISO date string. Should not be after "end".' example: '2022-01-01' @@ -29349,120 +29146,6 @@ paths: tags: - Day parameters: [] - '/days/{dayId}/day_responsibles': - get: - deprecated: false - description: 'Retrieves the collection of DayResponsible resources.' - operationId: api_days_dayIdday_responsibles_get_collection - parameters: - - - allowEmptyValue: false - allowReserved: false - deprecated: false - description: 'DayResponsible identifier' - explode: false - in: path - name: dayId - required: true - schema: - type: string - style: simple - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: day - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: day.period - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: true - in: query - name: 'day.period[]' - required: false - schema: - items: - type: string - type: array - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: true - in: query - name: 'day[]' - required: false - schema: - items: - type: string - type: array - style: form - responses: - 200: - content: - application/hal+json: - schema: - properties: - _embedded: { anyOf: [{ properties: { item: { items: { $ref: '#/components/schemas/DayResponsible.jsonhal-read' }, type: array } }, type: object }, { type: object }] } - _links: { properties: { first: { properties: { href: { format: iri-reference, type: string } }, type: object }, last: { properties: { href: { format: iri-reference, type: string } }, type: object }, next: { properties: { href: { format: iri-reference, type: string } }, type: object }, previous: { properties: { href: { format: iri-reference, type: string } }, type: object }, self: { properties: { href: { format: iri-reference, type: string } }, type: object } }, type: object } - itemsPerPage: { minimum: 0, type: integer } - totalItems: { minimum: 0, type: integer } - required: - - _embedded - - _links - type: object - application/json: - schema: - items: - $ref: '#/components/schemas/DayResponsible-read' - type: array - application/ld+json: - schema: - properties: - 'hydra:member': { items: { $ref: '#/components/schemas/DayResponsible.jsonld-read' }, type: array } - 'hydra:search': { properties: { '@type': { type: string }, 'hydra:mapping': { items: { properties: { '@type': { type: string }, property: { type: ['null', string] }, required: { type: boolean }, variable: { type: string } }, type: object }, type: array }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string } }, type: object } - 'hydra:totalItems': { minimum: 0, type: integer } - 'hydra:view': { example: { '@id': string, 'hydra:first': string, 'hydra:last': string, 'hydra:next': string, 'hydra:previous': string, type: string }, properties: { '@id': { format: iri-reference, type: string }, '@type': { type: string }, 'hydra:first': { format: iri-reference, type: string }, 'hydra:last': { format: iri-reference, type: string }, 'hydra:next': { format: iri-reference, type: string }, 'hydra:previous': { format: iri-reference, type: string } }, type: object } - required: - - 'hydra:member' - type: object - application/vnd.api+json: - schema: - items: - $ref: '#/components/schemas/DayResponsible.jsonapi-read' - type: array - text/html: - schema: - items: - $ref: '#/components/schemas/DayResponsible-read' - type: array - description: 'DayResponsible collection' - summary: 'Retrieves the collection of DayResponsible resources.' - tags: - - DayResponsible - parameters: [] '/days/{id}': get: deprecated: false @@ -30456,330 +30139,6 @@ paths: summary: 'Updates the Period resource.' tags: - Period - '/periods/{periodId}/days': - get: - deprecated: false - description: 'Retrieves the collection of Day resources.' - operationId: api_periods_periodIddays_get_collection - parameters: - - - allowEmptyValue: false - allowReserved: false - deprecated: false - description: 'Day identifier' - explode: false - in: path - name: periodId - required: true - schema: - type: string - style: simple - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: period - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: period.camp - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: true - in: query - name: 'period.camp[]' - required: false - schema: - items: - type: string - type: array - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: true - in: query - name: 'period[]' - required: false - schema: - items: - type: string - type: array - style: form - responses: - 200: - content: - application/hal+json: - schema: - properties: - _embedded: { anyOf: [{ properties: { item: { items: { $ref: '#/components/schemas/Day.jsonhal-read' }, type: array } }, type: object }, { type: object }] } - _links: { properties: { first: { properties: { href: { format: iri-reference, type: string } }, type: object }, last: { properties: { href: { format: iri-reference, type: string } }, type: object }, next: { properties: { href: { format: iri-reference, type: string } }, type: object }, previous: { properties: { href: { format: iri-reference, type: string } }, type: object }, self: { properties: { href: { format: iri-reference, type: string } }, type: object } }, type: object } - itemsPerPage: { minimum: 0, type: integer } - totalItems: { minimum: 0, type: integer } - required: - - _embedded - - _links - type: object - application/json: - schema: - items: - $ref: '#/components/schemas/Day-read' - type: array - application/ld+json: - schema: - properties: - 'hydra:member': { items: { $ref: '#/components/schemas/Day.jsonld-read' }, type: array } - 'hydra:search': { properties: { '@type': { type: string }, 'hydra:mapping': { items: { properties: { '@type': { type: string }, property: { type: ['null', string] }, required: { type: boolean }, variable: { type: string } }, type: object }, type: array }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string } }, type: object } - 'hydra:totalItems': { minimum: 0, type: integer } - 'hydra:view': { example: { '@id': string, 'hydra:first': string, 'hydra:last': string, 'hydra:next': string, 'hydra:previous': string, type: string }, properties: { '@id': { format: iri-reference, type: string }, '@type': { type: string }, 'hydra:first': { format: iri-reference, type: string }, 'hydra:last': { format: iri-reference, type: string }, 'hydra:next': { format: iri-reference, type: string }, 'hydra:previous': { format: iri-reference, type: string } }, type: object } - required: - - 'hydra:member' - type: object - application/vnd.api+json: - schema: - items: - $ref: '#/components/schemas/Day.jsonapi-read' - type: array - text/html: - schema: - items: - $ref: '#/components/schemas/Day-read' - type: array - description: 'Day collection' - summary: 'Retrieves the collection of Day resources.' - tags: - - Day - parameters: [] - '/periods/{periodId}/schedule_entries': - get: - deprecated: false - description: 'Retrieves the collection of ScheduleEntry resources.' - operationId: api_periods_periodIdschedule_entries_get_collection - parameters: - - - allowEmptyValue: false - allowReserved: false - deprecated: false - description: 'ScheduleEntry identifier' - explode: false - in: path - name: periodId - required: true - schema: - type: string - style: simple - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: activity - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'end[after]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'end[before]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'end[strictly_after]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'end[strictly_before]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: period - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'start[after]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'start[before]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'start[strictly_after]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: false - in: query - name: 'start[strictly_before]' - required: false - schema: - type: string - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: true - in: query - name: 'activity[]' - required: false - schema: - items: - type: string - type: array - style: form - - - allowEmptyValue: true - allowReserved: false - deprecated: false - description: '' - explode: true - in: query - name: 'period[]' - required: false - schema: - items: - type: string - type: array - style: form - responses: - 200: - content: - application/hal+json: - schema: - properties: - _embedded: { anyOf: [{ properties: { item: { items: { $ref: '#/components/schemas/ScheduleEntry.jsonhal-read' }, type: array } }, type: object }, { type: object }] } - _links: { properties: { first: { properties: { href: { format: iri-reference, type: string } }, type: object }, last: { properties: { href: { format: iri-reference, type: string } }, type: object }, next: { properties: { href: { format: iri-reference, type: string } }, type: object }, previous: { properties: { href: { format: iri-reference, type: string } }, type: object }, self: { properties: { href: { format: iri-reference, type: string } }, type: object } }, type: object } - itemsPerPage: { minimum: 0, type: integer } - totalItems: { minimum: 0, type: integer } - required: - - _embedded - - _links - type: object - application/json: - schema: - items: - $ref: '#/components/schemas/ScheduleEntry-read' - type: array - application/ld+json: - schema: - properties: - 'hydra:member': { items: { $ref: '#/components/schemas/ScheduleEntry.jsonld-read' }, type: array } - 'hydra:search': { properties: { '@type': { type: string }, 'hydra:mapping': { items: { properties: { '@type': { type: string }, property: { type: ['null', string] }, required: { type: boolean }, variable: { type: string } }, type: object }, type: array }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string } }, type: object } - 'hydra:totalItems': { minimum: 0, type: integer } - 'hydra:view': { example: { '@id': string, 'hydra:first': string, 'hydra:last': string, 'hydra:next': string, 'hydra:previous': string, type: string }, properties: { '@id': { format: iri-reference, type: string }, '@type': { type: string }, 'hydra:first': { format: iri-reference, type: string }, 'hydra:last': { format: iri-reference, type: string }, 'hydra:next': { format: iri-reference, type: string }, 'hydra:previous': { format: iri-reference, type: string } }, type: object } - required: - - 'hydra:member' - type: object - application/vnd.api+json: - schema: - items: - $ref: '#/components/schemas/ScheduleEntry.jsonapi-read' - type: array - text/html: - schema: - items: - $ref: '#/components/schemas/ScheduleEntry-read' - type: array - description: 'ScheduleEntry collection' - summary: 'Retrieves the collection of ScheduleEntry resources.' - tags: - - ScheduleEntry - parameters: [] /personal_invitations: get: deprecated: false diff --git a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json index a9707dfd02..b99465930a 100644 --- a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json +++ b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json @@ -37,11 +37,11 @@ "templated": true }, "dayResponsibles": { - "href": "\/day_responsibles{\/id}{\/action}{?day,day[],day.period,day.period[]}", + "href": "\/day_responsibles{\/id}{?day,day[],day.period,day.period[]}", "templated": true }, "days": { - "href": "\/days{\/id}{\/action}{?period,period[],period.camp,period.camp[]}", + "href": "\/days{\/id}{?period,period[],period.camp,period.camp[]}", "templated": true }, "invitations": { @@ -88,7 +88,7 @@ "templated": true }, "personalInvitations": { - "href": "\/personal_invitations{\/id}{\/action}", + "href": "/personal_invitations{/id}{/action}", "templated": true }, "profiles": { @@ -104,7 +104,7 @@ "templated": true }, "scheduleEntries": { - "href": "\/schedule_entries{\/id}{\/action}{?period,period[],activity,activity[],start[before],start[strictly_before],start[after],start[strictly_after],end[before],end[strictly_before],end[after],end[strictly_after]}", + "href": "\/schedule_entries{\/id}{?period,period[],activity,activity[],start[before],start[strictly_before],start[after],start[strictly_after],end[before],end[strictly_before],end[after],end[strictly_after]}", "templated": true }, "self": { diff --git a/api/tests/Api/SnapshotTests/__snapshots__/performance_test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml b/api/tests/Api/SnapshotTests/__snapshots__/performance_test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml index 2d35e29ac9..2a4072392b 100644 --- a/api/tests/Api/SnapshotTests/__snapshots__/performance_test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml +++ b/api/tests/Api/SnapshotTests/__snapshots__/performance_test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml @@ -5,15 +5,15 @@ /activity_responsibles: 6 /activity_responsibles/item: 8 /camps: 39 -/camps/item: 32 +/camps/item: 38 /camp_collaborations: 25 /camp_collaborations/item: 25 /categories: 11 /categories/item: 9 /content_types: 6 /content_types/item: 6 -/days: 26 -/days/item: 12 +/days: 17 +/days/item: 11 /day_responsibles: 6 /day_responsibles/item: 9 /material_items: 207 @@ -21,7 +21,7 @@ /material_lists: 6 /material_lists/item: 7 /periods: 6 -/periods/item: 28 +/periods/item: 29 /profiles: 6 /profiles/item: 6 /schedule_entries: 23 diff --git a/api/tests/Api/SnapshotTests/__snapshots__/test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml b/api/tests/Api/SnapshotTests/__snapshots__/test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml index 97221dce67..b5d9cd6d16 100644 --- a/api/tests/Api/SnapshotTests/__snapshots__/test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml +++ b/api/tests/Api/SnapshotTests/__snapshots__/test_EndpointPerformanceTest__testPerformanceDidNotChangeForStableEndpoints__1.yml @@ -5,15 +5,15 @@ /activity_responsibles: 6 /activity_responsibles/item: 8 /camps: 29 -/camps/item: 22 +/camps/item: 28 /camp_collaborations: 25 /camp_collaborations/item: 15 /categories: 11 /categories/item: 9 /content_types: 6 /content_types/item: 6 -/days: 26 -/days/item: 12 +/days: 17 +/days/item: 11 /day_responsibles: 6 /day_responsibles/item: 9 /material_items: 7 @@ -21,7 +21,7 @@ /material_lists: 6 /material_lists/item: 7 /periods: 6 -/periods/item: 18 +/periods/item: 19 /profiles: 6 /profiles/item: 6 /schedule_entries: 23