API improvements (#1826)
This commit is contained in:
@@ -14,9 +14,6 @@ jms_serializer:
|
||||
FOSUB:
|
||||
namespace_prefix: "FOS\\UserBundle"
|
||||
path: "%kernel.root_dir%/../config/serializer/FOS/UserBundle"
|
||||
App:
|
||||
namespace_prefix: "App"
|
||||
path: "%kernel.root_dir%/../config/serializer/App"
|
||||
warmup:
|
||||
paths:
|
||||
included:
|
||||
|
||||
@@ -2,41 +2,40 @@ nelmio_api_doc:
|
||||
models:
|
||||
use_jms: true
|
||||
names:
|
||||
- { alias: CustomerEditForm, type: App\Form\API\CustomerApiEditForm, groups: [Default, Entity, Customer] }
|
||||
- { alias: CustomerEntity, type: App\Entity\Customer, groups: [Default, Entity, Customer] }
|
||||
- { alias: CustomerRate, type: App\Entity\CustomerRate, groups: [Default, Entity, CustomerRate] }
|
||||
- { alias: CustomerRateForm, type: App\Form\API\CustomerRateApiForm, groups: [Default, Entity, CustomerRate] }
|
||||
- { alias: CustomerMetaField, type: App\Entity\CustomerMeta, groups: [Default, Customer] }
|
||||
- { alias: CustomerCollection, type: App\Entity\Customer, groups: [Default, Collection, Customer] }
|
||||
- { alias: ProjectEditForm, type: App\Form\API\ProjectApiEditForm, groups: [Default, Entity, Project] }
|
||||
- { alias: ProjectEntity, type: App\Entity\Project, groups: [Default, Entity, Project] }
|
||||
- { alias: ProjectRate, type: App\Entity\ProjectRate, groups: [Default, Entity, ProjectRate] }
|
||||
- { alias: ProjectRateForm, type: App\Form\API\ProjectRateApiForm, groups: [Default, Entity, ProjectRate] }
|
||||
- { alias: ProjectMetaField, type: App\Entity\ProjectMeta, groups: [Default, Project] }
|
||||
- { alias: ProjectCollection, type: App\Entity\Project, groups: [Default, Collection, Project] }
|
||||
- { alias: ActivityEditForm, type: App\Form\API\ActivityApiEditForm, groups: [Default, Entity, Activity] }
|
||||
- { alias: ActivityEntity, type: App\Entity\Activity, groups: [Default, Entity, Activity] }
|
||||
- { alias: ActivityRate, type: App\Entity\ActivityRate, groups: [Default, Entity, ActivityRate] }
|
||||
- { alias: ActivityRateForm, type: App\Form\API\ActivityRateApiForm, groups: [Default, Entity, ActivityRate] }
|
||||
- { alias: ActivityMetaField, type: App\Entity\ActivityMeta, groups: [Default, Activity] }
|
||||
- { alias: ActivityCollection, type: App\Entity\Activity, groups: [Default, Collection, Activity] }
|
||||
- { alias: TagEditForm, type: App\Form\API\TagApiEditForm, groups: [Default, Entity, Tag] }
|
||||
- { alias: TagEntity, type: App\Entity\Tag, groups: [Default, Entity, Tag] }
|
||||
- { alias: TimesheetEditForm, type: App\Form\API\TimesheetApiEditForm, groups: [Default, Entity, Timesheet] }
|
||||
- { alias: TimesheetEntity, type: App\Entity\Timesheet, groups: [Default, Entity, Timesheet] }
|
||||
- { alias: TimesheetMeta, type: App\Entity\TimesheetMeta, groups: [Default, Timesheet] }
|
||||
- { alias: TimesheetCollection, type: App\Entity\Timesheet, groups: [Default, Collection, Timesheet] }
|
||||
- { alias: TimesheetSubCollection, type: App\Entity\Timesheet, groups: [Default, Subresource, Timesheet] }
|
||||
- { alias: UserCreateForm, type: App\Form\API\UserApiCreateForm, groups: [Default, Entity, User, User_Entity] }
|
||||
- { alias: UserEditForm, type: App\Form\API\UserApiEditForm, groups: [Default, Entity, User, User_Entity] }
|
||||
- { alias: User, type: App\Entity\User, groups: [Default, Entity, User] }
|
||||
- { alias: UserEntity, type: App\Entity\User, groups: [Default, Entity, User, User_Entity] }
|
||||
- { alias: UserCollection, type: App\Entity\User, groups: [Default, Collection, User] }
|
||||
- { alias: TeamEditForm, type: App\Form\API\TeamApiEditForm, groups: [Default, Entity, Team] }
|
||||
- { alias: TeamEntity, type: App\Entity\Team, groups: [Default, Entity, Team, Team_Entity] }
|
||||
- { alias: TeamCollection, type: App\Entity\Team, groups: [Default, Collection, Team] }
|
||||
- { alias: I18nConfig, type: App\API\Model\I18n, groups: [Default] }
|
||||
- { alias: TimesheetConfig, type: App\API\Model\TimesheetConfig, groups: [Default] }
|
||||
- { alias: CustomerEditForm, type: App\Form\API\CustomerApiEditForm, groups: [Default, Entity, Customer] }
|
||||
- { alias: CustomerEntity, type: App\Entity\Customer, groups: [Default, Entity, Customer, Customer_Entity] }
|
||||
- { alias: Customer, type: App\Entity\Customer, groups: [Default] }
|
||||
- { alias: CustomerRate, type: App\Entity\CustomerRate, groups: [Default, Entity, Customer_Rate] }
|
||||
- { alias: CustomerRateForm, type: App\Form\API\CustomerRateApiForm, groups: [Default, Entity, Customer_Rate] }
|
||||
- { alias: CustomerCollection, type: App\Entity\Customer, groups: [Default, Collection, Customer] }
|
||||
- { alias: ProjectEditForm, type: App\Form\API\ProjectApiEditForm, groups: [Default, Entity, Project] }
|
||||
- { alias: ProjectEntity, type: App\Entity\Project, groups: [Default, Entity, Project, Project_Entity] }
|
||||
- { alias: Project, type: App\Entity\Project, groups: [Default] }
|
||||
- { alias: ProjectExpanded, type: App\Entity\Project, groups: [Default, Expanded] }
|
||||
- { alias: ProjectRate, type: App\Entity\ProjectRate, groups: [Default, Entity, Project_Rate] }
|
||||
- { alias: ProjectRateForm, type: App\Form\API\ProjectRateApiForm, groups: [Default, Entity, Project_Rate] }
|
||||
- { alias: ProjectCollection, type: App\Entity\Project, groups: [Default, Collection, Project] }
|
||||
- { alias: ActivityEditForm, type: App\Form\API\ActivityApiEditForm, groups: [Default, Entity, Activity] }
|
||||
- { alias: ActivityEntity, type: App\Entity\Activity, groups: [Default, Entity, Activity, Activity_Entity] }
|
||||
- { alias: Activity, type: App\Entity\Activity, groups: [Default] }
|
||||
- { alias: ActivityExpanded, type: App\Entity\Activity, groups: [Default, Expanded] }
|
||||
- { alias: ActivityRate, type: App\Entity\ActivityRate, groups: [Default, Entity, Activity_Rate] }
|
||||
- { alias: ActivityRateForm, type: App\Form\API\ActivityRateApiForm, groups: [Default, Entity, Activity_Rate] }
|
||||
- { alias: ActivityCollection, type: App\Entity\Activity, groups: [Default, Collection, Activity] }
|
||||
- { alias: TagEditForm, type: App\Form\API\TagApiEditForm, groups: [Default, Entity, Tag] }
|
||||
- { alias: TagEntity, type: App\Entity\Tag, groups: [Default, Entity, Tag] }
|
||||
- { alias: TimesheetEditForm, type: App\Form\API\TimesheetApiEditForm, groups: [Default, Entity, Timesheet, Not_Expanded] }
|
||||
- { alias: TimesheetEntity, type: App\Entity\Timesheet, groups: [Default, Entity, Timesheet, Timesheet_Entity, Not_Expanded] }
|
||||
- { alias: TimesheetCollection, type: App\Entity\Timesheet, groups: [Default, Collection, Timesheet, Not_Expanded] }
|
||||
- { alias: TimesheetCollectionExpanded, type: App\Entity\Timesheet, groups: [Default, Collection, Timesheet, Subresource, Expanded] }
|
||||
- { alias: UserCreateForm, type: App\Form\API\UserApiCreateForm, groups: [Default, Entity, User, User_Entity] }
|
||||
- { alias: UserEditForm, type: App\Form\API\UserApiEditForm, groups: [Default, Entity, User, User_Entity] }
|
||||
- { alias: User, type: App\Entity\User, groups: [Default] }
|
||||
- { alias: UserEntity, type: App\Entity\User, groups: [Default, Entity, User, User_Entity] }
|
||||
- { alias: UserCollection, type: App\Entity\User, groups: [Default, Collection, User] }
|
||||
- { alias: TeamEditForm, type: App\Form\API\TeamApiEditForm, groups: [Default, Entity, Team, Team_Entity] }
|
||||
- { alias: TeamEntity, type: App\Entity\Team, groups: [Default, Entity, Team, Team_Entity] }
|
||||
- { alias: TeamCollection, type: App\Entity\Team, groups: [Default, Collection, Team] }
|
||||
areas:
|
||||
path_patterns:
|
||||
- ^/api(?!/doc)
|
||||
@@ -49,8 +48,9 @@ nelmio_api_doc:
|
||||
title: Kimai 2 - API Docs
|
||||
description: |
|
||||
JSON API for the Kimai 2 time-tracking software. Read more about its usage in the [API documentation](https://www.kimai.org/documentation/rest-api.html) and then download a [Swagger file](doc.json) for import e.g. in Postman.
|
||||
Be aware: it is not yet considered stable and BC breaks might happen.
|
||||
version: '0.5'
|
||||
Be aware: it is not yet considered stable and BC breaks might happen, especially when using code generation.
|
||||
The order of JSON attributes is not guaranteed.
|
||||
version: '0.6'
|
||||
securityDefinitions:
|
||||
apiUser:
|
||||
type: apiKey
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
App\API\Model\I18n:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [formDateTime, formDate, dateTime, date, time, duration, is24hours]
|
||||
properties:
|
||||
formDateTime:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
formDate:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
dateTime:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
time:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
date:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
duration:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
is24hours:
|
||||
include: true
|
||||
type: boolean
|
||||
groups: [Default]
|
||||
@@ -1,25 +0,0 @@
|
||||
App\API\Model\Version:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [version, candidate, semver, name, copyright]
|
||||
properties:
|
||||
version:
|
||||
include: true
|
||||
type: string
|
||||
example: 0.9
|
||||
groups: [Default]
|
||||
candidate:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
semver:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
name:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
copyright:
|
||||
include: true
|
||||
type: string
|
||||
groups: [Default]
|
||||
@@ -1,46 +0,0 @@
|
||||
App\Entity\Activity:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, name, comment, visible, project, color, budget, timeBudget, metaFields, parentTitle]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
groups: [Default]
|
||||
name:
|
||||
include: true
|
||||
groups: [Default]
|
||||
comment:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
visible:
|
||||
include: true
|
||||
groups: [Default]
|
||||
budget:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
timeBudget:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
project:
|
||||
include: false
|
||||
exclude: true
|
||||
groups: [Default]
|
||||
color:
|
||||
include: true
|
||||
metaFields:
|
||||
exclude: true
|
||||
virtual_properties:
|
||||
parentTitle:
|
||||
serialized_name: parentTitle
|
||||
include: true
|
||||
exp: "object.getProject() === null ? null : object.getProject().getName()"
|
||||
groups: [Default]
|
||||
getProject:
|
||||
serialized_name: project
|
||||
exp: "object.getProject() === null ? null : object.getProject().getId()"
|
||||
type: integer
|
||||
groups: [Default]
|
||||
getMetaFields:
|
||||
serialized_name: metaFields
|
||||
exp: "object.getVisibleMetaFields()"
|
||||
type: array<App\Entity\ActivityMeta>
|
||||
groups: [Default]
|
||||
@@ -1,15 +0,0 @@
|
||||
App\Entity\ActivityMeta:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [name, value]
|
||||
properties:
|
||||
name:
|
||||
include: false
|
||||
value:
|
||||
include: false
|
||||
virtual_properties:
|
||||
getName:
|
||||
serialized_name: name
|
||||
exp: "object.isVisible() ? object.getName() : null"
|
||||
getValue:
|
||||
serialized_name: value
|
||||
exp: "object.isVisible() ? object.getValue() : null"
|
||||
@@ -1,21 +0,0 @@
|
||||
App\Entity\ActivityRate:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, rate, internalRate, isFixed, user]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
groups: [Default]
|
||||
activity:
|
||||
exclude: true
|
||||
user:
|
||||
include: true
|
||||
groups: [Default]
|
||||
rate:
|
||||
include: true
|
||||
groups: [Default]
|
||||
internalRate:
|
||||
include: true
|
||||
groups: [Default]
|
||||
isFixed:
|
||||
include: true
|
||||
groups: [Default]
|
||||
@@ -1,68 +0,0 @@
|
||||
App\Entity\Customer:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, name, number, comment, visible, company, contact, address, country, currency, phone, fax, mobile, email, homepage, timezone, color, budget, timeBudget, metaFields, teams]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
name:
|
||||
include: true
|
||||
number:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
comment:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
visible:
|
||||
include: true
|
||||
budget:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
timeBudget:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
company:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
contact:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
address:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
country:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
currency:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
phone:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
fax:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
mobile:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
email:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
homepage:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
timezone:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
color:
|
||||
include: true
|
||||
metaFields:
|
||||
exclude: true
|
||||
teams:
|
||||
include: true
|
||||
groups: [Customer]
|
||||
virtual_properties:
|
||||
getMetaFields:
|
||||
serialized_name: metaFields
|
||||
exp: "object.getVisibleMetaFields()"
|
||||
type: array<App\Entity\CustomerMeta>
|
||||
groups: [Default]
|
||||
@@ -1,15 +0,0 @@
|
||||
App\Entity\CustomerMeta:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [name, value]
|
||||
properties:
|
||||
name:
|
||||
include: false
|
||||
value:
|
||||
include: false
|
||||
virtual_properties:
|
||||
getName:
|
||||
serialized_name: name
|
||||
exp: "object.isVisible() ? object.getName() : null"
|
||||
getValue:
|
||||
serialized_name: value
|
||||
exp: "object.isVisible() ? object.getValue() : null"
|
||||
@@ -1,21 +0,0 @@
|
||||
App\Entity\CustomerRate:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, rate, internalRate, isFixed, user]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
groups: [Default]
|
||||
customer:
|
||||
exclude: true
|
||||
user:
|
||||
include: true
|
||||
groups: [Default]
|
||||
rate:
|
||||
include: true
|
||||
groups: [Default]
|
||||
internalRate:
|
||||
include: true
|
||||
groups: [Default]
|
||||
isFixed:
|
||||
include: true
|
||||
groups: [Default]
|
||||
@@ -1,56 +0,0 @@
|
||||
App\Entity\Project:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, name, comment, visible, orderNumber, orderDate, customer, start, end, color, budget, timeBudget, metaFields, parentTitle, teams]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
name:
|
||||
include: true
|
||||
comment:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
visible:
|
||||
include: true
|
||||
budget:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
timeBudget:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
orderNumber:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
orderDate:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
start:
|
||||
include: true
|
||||
groups: [Project]
|
||||
end:
|
||||
include: true
|
||||
groups: [Project]
|
||||
customer:
|
||||
groups: [Subresource]
|
||||
color:
|
||||
include: true
|
||||
metaFields:
|
||||
exclude: true
|
||||
teams:
|
||||
include: true
|
||||
groups: [Project]
|
||||
virtual_properties:
|
||||
parentTitle:
|
||||
serialized_name: parentTitle
|
||||
include: true
|
||||
exp: "object.getCustomer() === null ? null : object.getCustomer().getName()"
|
||||
groups: [Default]
|
||||
getCustomer:
|
||||
serialized_name: customer
|
||||
exp: "object.getCustomer() === null ? null : object.getCustomer().getId()"
|
||||
type: integer
|
||||
groups: [Entity, Collection]
|
||||
getMetaFields:
|
||||
serialized_name: metaFields
|
||||
exp: "object.getVisibleMetaFields()"
|
||||
type: array<App\Entity\ProjectMeta>
|
||||
groups: [Default]
|
||||
@@ -1,15 +0,0 @@
|
||||
App\Entity\ProjectMeta:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [name, value]
|
||||
properties:
|
||||
name:
|
||||
include: false
|
||||
value:
|
||||
include: false
|
||||
virtual_properties:
|
||||
getName:
|
||||
serialized_name: name
|
||||
exp: "object.isVisible() ? object.getName() : null"
|
||||
getValue:
|
||||
serialized_name: value
|
||||
exp: "object.isVisible() ? object.getValue() : null"
|
||||
@@ -1,21 +0,0 @@
|
||||
App\Entity\ProjectRate:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, rate, internalRate, isFixed, user]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
groups: [Default]
|
||||
project:
|
||||
exclude: true
|
||||
user:
|
||||
include: true
|
||||
groups: [Default]
|
||||
rate:
|
||||
include: true
|
||||
groups: [Default]
|
||||
internalRate:
|
||||
include: true
|
||||
groups: [Default]
|
||||
isFixed:
|
||||
include: true
|
||||
groups: [Default]
|
||||
@@ -1,12 +0,0 @@
|
||||
App\Entity\Tag:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, name, color]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
name:
|
||||
include: true
|
||||
color:
|
||||
include: true
|
||||
timesheets:
|
||||
exclude: true
|
||||
@@ -1,20 +0,0 @@
|
||||
App\Entity\Team:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, name, teamlead, users, customers, projects]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
name:
|
||||
include: true
|
||||
teamlead:
|
||||
include: true
|
||||
groups: [Team_Entity]
|
||||
users:
|
||||
include: true
|
||||
groups: [Team_Entity]
|
||||
customers:
|
||||
include: true
|
||||
groups: [Team_Entity]
|
||||
projects:
|
||||
include: true
|
||||
groups: [Team_Entity]
|
||||
@@ -1,67 +0,0 @@
|
||||
App\Entity\Timesheet:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, begin, end, duration, rate, activity, project, user, description, fixedRate, hourlyRate, tags, exported, metaFields]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
begin:
|
||||
exclude: true
|
||||
end:
|
||||
exclude: true
|
||||
duration:
|
||||
include: true
|
||||
description:
|
||||
include: true
|
||||
rate:
|
||||
include: true
|
||||
internalRate:
|
||||
include: true
|
||||
fixedRate:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
hourlyRate:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
exported:
|
||||
include: true
|
||||
groups: [Entity]
|
||||
activity:
|
||||
groups: [Subresource]
|
||||
project:
|
||||
groups: [Subresource]
|
||||
user:
|
||||
exclude: true
|
||||
metaFields:
|
||||
exclude: true
|
||||
virtual_properties:
|
||||
getBegin:
|
||||
serialized_name: begin
|
||||
exp: "object.getBegin() === null ? null : object.getBegin()"
|
||||
type: DateTime
|
||||
getEnd:
|
||||
serialized_name: end
|
||||
exp: "object.getEnd() === null ? null : object.getEnd()"
|
||||
type: DateTime
|
||||
getActivity:
|
||||
serialized_name: activity
|
||||
exp: "object.getActivity() === null ? null : object.getActivity().getId()"
|
||||
type: integer
|
||||
groups: [Entity, Collection]
|
||||
getProject:
|
||||
serialized_name: project
|
||||
exp: "object.getProject() === null ? null : object.getProject().getId()"
|
||||
type: integer
|
||||
groups: [Entity, Collection]
|
||||
getUser:
|
||||
serialized_name: user
|
||||
exp: "object.getUser().getId()"
|
||||
type: integer
|
||||
getTags:
|
||||
serialized_name: tags
|
||||
exp: "object.getTagsAsArray()"
|
||||
type: array<string>
|
||||
getMetaFields:
|
||||
serialized_name: metaFields
|
||||
exp: "object.getVisibleMetaFields()"
|
||||
type: array<App\Entity\TimesheetMeta>
|
||||
groups: [Default]
|
||||
@@ -1,15 +0,0 @@
|
||||
App\Entity\TimesheetMeta:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [name, value]
|
||||
properties:
|
||||
name:
|
||||
include: false
|
||||
value:
|
||||
include: false
|
||||
virtual_properties:
|
||||
getName:
|
||||
serialized_name: name
|
||||
exp: "object.isVisible() ? object.getName() : null"
|
||||
getValue:
|
||||
serialized_name: value
|
||||
exp: "object.isVisible() ? object.getValue() : null"
|
||||
@@ -1,30 +0,0 @@
|
||||
App\Entity\User:
|
||||
exclusion_policy: All
|
||||
custom_accessor_order: [id, alias, title, avatar, language, timezone, teams]
|
||||
properties:
|
||||
id:
|
||||
include: true
|
||||
groups: [Default]
|
||||
alias:
|
||||
include: true
|
||||
groups: [Default]
|
||||
title:
|
||||
include: true
|
||||
groups: [User_Entity]
|
||||
avatar:
|
||||
include: true
|
||||
groups: [User_Entity]
|
||||
teams:
|
||||
include: true
|
||||
groups: [User_Entity]
|
||||
virtual_properties:
|
||||
getLanguage:
|
||||
serialized_name: language
|
||||
exp: "object.getPreferenceValue('language') === null ? null : object.getPreferenceValue('language')"
|
||||
type: string
|
||||
groups: [User_Entity]
|
||||
getTimezone:
|
||||
serialized_name: timezone
|
||||
exp: "object.getPreferenceValue('timezone') === null ? null : object.getPreferenceValue('timezone')"
|
||||
type: string
|
||||
groups: [User_Entity]
|
||||
@@ -1,16 +1,16 @@
|
||||
App\Entity\User:
|
||||
properties:
|
||||
roles:
|
||||
- App\Validator\Constraints\Role: ~
|
||||
- App\Validator\Constraints\Role: { groups: [RolesUpdate] }
|
||||
username:
|
||||
- NotBlank: ~
|
||||
- Length: { min: 2, max: 60 }
|
||||
- NotBlank: { groups: [Registration, UserCreate, Profile] }
|
||||
- Length: { min: 2, max: 60, groups: [Registration, UserCreate, Profile] }
|
||||
email:
|
||||
- NotBlank: ~
|
||||
- Email: ~
|
||||
- NotBlank: { groups: [Registration, UserCreate, Profile] }
|
||||
- Email: { groups: [Registration, UserCreate, Profile] }
|
||||
plainPassword:
|
||||
- NotBlank: { groups: [Registration, PasswordUpdate] }
|
||||
- Length: { min: 8, max: 60, groups: [Registration, PasswordUpdate] }
|
||||
- NotBlank: { groups: [Registration, PasswordUpdate, UserCreate] }
|
||||
- Length: { min: 8, max: 60, groups: [Registration, PasswordUpdate, UserCreate] }
|
||||
plainApiToken:
|
||||
- NotBlank: { groups: [ApiTokenUpdate] }
|
||||
- Length: { min: 8, max: 60, groups: [ApiTokenUpdate] }
|
||||
|
||||
Reference in New Issue
Block a user