Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions api/src/Entity/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
denormalizationContext: ['groups' => ['write']],
normalizationContext: ['groups' => ['read']]
)]
#[ApiFilter(filterClass: SearchFilter::class, properties: ['user.collaborations.camp'])]
#[ApiFilter(filterClass: SearchFilter::class, properties: ['user.collaborations.camp', 'user'])]
#[ORM\Entity(repositoryClass: ProfileRepository::class)]
#[ORM\Table(name: '`profile`')]
class Profile extends BaseEntity {
Expand Down Expand Up @@ -199,7 +199,7 @@ class Profile extends BaseEntity {
#[ORM\Column(type: 'json')]
public array $roles = ['ROLE_USER'];

#[ApiProperty(writable: false, example: '/users/1a2b3c4d')]
#[ApiProperty(writable: false, readableLink: true, example: '/users/1a2b3c4d')]
#[Groups(['read'])]
#[ORM\OneToOne(targetEntity: User::class, mappedBy: 'profile')]
public User $user;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
"_embedded": {
"items": [
{
"_embedded": {
"user": {
"_links": {
"profile": {
"href": "escaped_value"
},
"self": {
"href": "escaped_value"
}
},
"abbreviation": "escaped_value",
"color": "escaped_value",
"displayName": "escaped_value",
"id": "escaped_value"
}
},
"_links": {
"self": {
"href": "escaped_value"
Expand All @@ -21,6 +37,22 @@
"surname": "escaped_value"
},
{
"_embedded": {
"user": {
"_links": {
"profile": {
"href": "escaped_value"
},
"self": {
"href": "escaped_value"
}
},
"abbreviation": "escaped_value",
"color": "escaped_value",
"displayName": "escaped_value",
"id": "escaped_value"
}
},
"_links": {
"self": {
"href": "escaped_value"
Expand All @@ -40,6 +72,22 @@
"surname": "escaped_value"
},
{
"_embedded": {
"user": {
"_links": {
"profile": {
"href": "escaped_value"
},
"self": {
"href": "escaped_value"
}
},
"abbreviation": "escaped_value",
"color": "escaped_value",
"displayName": "escaped_value",
"id": "escaped_value"
}
},
"_links": {
"self": {
"href": "escaped_value"
Expand All @@ -59,6 +107,22 @@
"surname": "escaped_value"
},
{
"_embedded": {
"user": {
"_links": {
"profile": {
"href": "escaped_value"
},
"self": {
"href": "escaped_value"
}
},
"abbreviation": "escaped_value",
"color": "escaped_value",
"displayName": "escaped_value",
"id": "escaped_value"
}
},
"_links": {
"self": {
"href": "escaped_value"
Expand All @@ -78,6 +142,22 @@
"surname": "escaped_value"
},
{
"_embedded": {
"user": {
"_links": {
"profile": {
"href": "escaped_value"
},
"self": {
"href": "escaped_value"
}
},
"abbreviation": "escaped_value",
"color": "escaped_value",
"displayName": "escaped_value",
"id": "escaped_value"
}
},
"_links": {
"self": {
"href": "escaped_value"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
{
"_embedded": {
"user": {
"_links": {
"profile": {
"href": "escaped_value"
},
"self": {
"href": "escaped_value"
}
},
"abbreviation": "escaped_value",
"color": "escaped_value",
"displayName": "escaped_value",
"id": "escaped_value"
}
},
"_links": {
"self": {
"href": "escaped_value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17167,12 +17167,13 @@ components:
- 'null'
- string
user:
anyOf:
-
$ref: '#/components/schemas/User-read'
-
type: 'null'
example: /users/1a2b3c4d
format: iri-reference
readOnly: true
type:
- 'null'
- string
required:
- email
type: object
Expand Down Expand Up @@ -17258,12 +17259,13 @@ components:
- 'null'
- string
user:
anyOf:
-
$ref: '#/components/schemas/User-read_User.create'
-
type: 'null'
example: /users/1a2b3c4d
format: iri-reference
readOnly: true
type:
- 'null'
- string
required:
- email
type: object
Expand Down Expand Up @@ -17621,12 +17623,13 @@ components:
- 'null'
- string
user:
anyOf:
-
$ref: '#/components/schemas/User.jsonhal-read'
-
type: 'null'
example: /users/1a2b3c4d
format: iri-reference
readOnly: true
type:
- 'null'
- string
required:
- email
type: object
Expand Down Expand Up @@ -17721,12 +17724,13 @@ components:
- 'null'
- string
user:
anyOf:
-
$ref: '#/components/schemas/User.jsonhal-read_User.create'
-
type: 'null'
example: /users/1a2b3c4d
format: iri-reference
readOnly: true
type:
- 'null'
- string
required:
- email
type: object
Expand Down Expand Up @@ -17928,12 +17932,13 @@ components:
- 'null'
- string
user:
anyOf:
-
$ref: '#/components/schemas/User.jsonld-read'
-
type: 'null'
example: /users/1a2b3c4d
format: iri-reference
readOnly: true
type:
- 'null'
- string
required:
- email
type: object
Expand Down Expand Up @@ -18042,12 +18047,13 @@ components:
- 'null'
- string
user:
anyOf:
-
$ref: '#/components/schemas/User.jsonld-read_User.create'
-
type: 'null'
example: /users/1a2b3c4d
format: iri-reference
readOnly: true
type:
- 'null'
- string
required:
- email
type: object
Expand Down Expand Up @@ -21976,9 +21982,7 @@ components:
type: object
User-read:
deprecated: false
description: |-
A person using eCamp.
The properties available for all other eCamp users are here.
description: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we loose the description here?

Copy link
Member Author

Choose a reason for hiding this comment

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

No clue, just ran update-snapshots

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say create an issue, i would rather have the performance improvements.
But we should readd the description later.

properties:
abbreviation:
description: 'A displayable name of the user.'
Expand Down Expand Up @@ -22269,9 +22273,7 @@ components:
type: object
User.jsonhal-read:
deprecated: false
description: |-
A person using eCamp.
The properties available for all other eCamp users are here.
description: ''
properties:
_links:
properties:
Expand Down Expand Up @@ -22514,9 +22516,7 @@ components:
type: object
User.jsonld-read:
deprecated: false
description: |-
A person using eCamp.
The properties available for all other eCamp users are here.
description: ''
properties:
'@context':
oneOf:
Expand Down Expand Up @@ -30108,6 +30108,18 @@ paths:
description: 'Retrieves the collection of Profile resources.'
operationId: api_profiles_get_collection
parameters:
-
allowEmptyValue: false
allowReserved: false
deprecated: false
description: ''
explode: false
in: query
name: user
required: false
schema:
type: string
style: form
-
allowEmptyValue: false
allowReserved: false
Expand All @@ -30134,6 +30146,20 @@ paths:
type: string
type: array
style: form
-
allowEmptyValue: false
allowReserved: false
deprecated: false
description: ''
explode: true
in: query
name: 'user[]'
required: false
schema:
items:
type: string
type: array
style: form
responses:
200:
content:
Expand Down
Loading
Loading