Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion api/src/Entity/CampCollaboration.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
),
new GetCollection(
security: 'is_fully_authenticated()',
normalizationContext: self::ITEM_NORMALIZATION_CONTEXT
normalizationContext: self::COLLECTION_NORMALIZATION_CONTEXT
),
new Post(
processor: CampCollaborationCreateProcessor::class,
Expand Down Expand Up @@ -89,6 +89,10 @@
#[ORM\Index(columns: ['status'])]
class CampCollaboration extends BaseEntity implements BelongsToCampInterface {
public const ITEM_NORMALIZATION_CONTEXT = [
'groups' => ['read', 'CampCollaboration:User'],
'swagger_definition_name' => 'read',
];
public const COLLECTION_NORMALIZATION_CONTEXT = [
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need the embedding of the camp in the collection request?

'groups' => ['read', 'CampCollaboration:Camp', 'CampCollaboration:User'],
'swagger_definition_name' => 'read',
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,5 @@
{
"_embedded": {
"camp": {
"_links": {
"activities": {
"href": "escaped_value"
},
"campCollaborations": {
"href": "escaped_value"
},
"categories": {
"href": "escaped_value"
},
"checklists": {
"href": "escaped_value"
},
"creator": {
"href": "escaped_value"
},
"materialLists": {
"href": "escaped_value"
},
"periods": {
"href": "escaped_value"
},
"profiles": {
"href": "escaped_value"
},
"progressLabels": {
"href": "escaped_value"
},
"self": {
"href": "escaped_value"
}
},
"addressCity": "escaped_value",
"addressName": "escaped_value",
"addressStreet": "escaped_value",
"addressZipcode": "escaped_value",
"coachName": "escaped_value",
"courseKind": "escaped_value",
"courseNumber": "escaped_value",
"id": "escaped_value",
"isPrototype": "escaped_value",
"kind": "escaped_value",
"motto": "escaped_value",
"organizer": "escaped_value",
"printYSLogoOnPicasso": "escaped_value",
"shortTitle": "escaped_value",
"title": "escaped_value",
"trainingAdvisorName": "escaped_value"
},
"user": {
"_links": {
"profile": {
Expand Down
Loading