Skip to content

api: offer activities collection under subresource /camps/{:id}/activ…#7141

Merged
BacLuc merged 1 commit intoecamp:develfrom
BacLuc:activites-subresource
Apr 12, 2025
Merged

api: offer activities collection under subresource /camps/{:id}/activ…#7141
BacLuc merged 1 commit intoecamp:develfrom
BacLuc:activites-subresource

Conversation

@BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Mar 30, 2025

…ities

That we can cache the endpoint.

@BacLuc BacLuc requested review from a team and pmattmann March 30, 2025 16:36
@BacLuc
Copy link
Contributor Author

BacLuc commented Mar 30, 2025

The tests failed because i did not yet do:

Will rebase this branch as soon as #7142 is merged.

@carlobeltrame
Copy link
Member

Offering this as subresource is fine if api platform support is better by now. But why is this a blocker for caching the endpoint?

@BacLuc
Copy link
Contributor Author

BacLuc commented Mar 31, 2025

Offering this as subresource is fine if api platform support is better by now. But why is this a blocker for caching the endpoint?

They are currently queried with get parameters, and we don't support that right now when caching.
But we support caching for path parameters.

(maybe not related, but: and in the far future, we might even share the cache for one camp, which is easier when we can share the cache for all people who have the access to the camp /camps/1a2b3c4d can access the cache, and we don't have check all camp= get parameters etc)

@carlobeltrame
Copy link
Member

They are currently queried with get parameters, and we don't support that right now when caching.

I see, I didn't know / remember this. Seems like a pretty big limitation to the caching system, no? There will always be cases where query parameter filtering will be required, e.g. when filtering by multiple attributes, or filtering by a nested attribute of a related entity. Is it not possible to support caching for this?

@BacLuc BacLuc force-pushed the activites-subresource branch 2 times, most recently from 7a2592c to d1471a6 Compare April 11, 2025 21:07
@BacLuc BacLuc requested a review from a team April 11, 2025 21:07
@BacLuc BacLuc force-pushed the activites-subresource branch from d1471a6 to 8dce41a Compare April 11, 2025 22:10
@BacLuc BacLuc force-pushed the activites-subresource branch from 8dce41a to 8e5aab9 Compare April 11, 2025 22:22
@BacLuc BacLuc requested review from a team and removed request for a team April 11, 2025 22:23
@manuelmeister manuelmeister requested a review from simfeld April 11, 2025 22:32
Comment on lines -46 to 48
new GetCollection(
normalizationContext: [
'groups' => [
'read',
'Activity:ActivityProgressLabel',
'Activity:ActivityResponsibles',
'Activity:ScheduleEntries',
],
],
normalizationContext: self::COLLECTION_NORMALIZATION_CONTEXT,
security: 'is_authenticated()'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to remove this in a next step?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As soon we know we dont use the Ressource anymore

@BacLuc BacLuc added this pull request to the merge queue Apr 12, 2025
Merged via the queue into ecamp:devel with commit 53cc5cc Apr 12, 2025
30 checks passed
@BacLuc BacLuc deleted the activites-subresource branch April 12, 2025 06:36
@carlobeltrame carlobeltrame mentioned this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants