1
Perfil Hardware
Manuel Aranda Rosales edited this page 2024-08-02 09:13:14 +02:00
Documentación - API ogCore
Select Language / Seleccionar Idioma
English
Table of Contents
- Introduction
- Configuration
- Resource Definition
- API Operations
- Entity Properties
- Hardware Profile Input DTO
Introduction
This documentation describes the configuration of API Platform in a Symfony project. It details the resources, operations, and entity properties exposed through the API.
Configuration
API configuration is done in Symfony configuration files, usually in the config/packages/api_platform.yaml
file.
resources:
App\Entity\HardwareProfile:
processor: App\State\Processor\HardwareProfileProcessor
input: App\Dto\Input\HardwareProfileInput
output: App\Dto\Output\HardwareProfileOutput
normalizationContext:
groups: ['default', 'hardware-profile:read']
denormalizationContext:
groups: ['hardware-profile:write']
operations:
ApiPlatform\Metadata\GetCollection:
provider: App\State\Provider\HardwareProfileProvider
filters:
- 'api_platform.filter.hardware.order'
- 'api_platform.filter.hardware.search'
ApiPlatform\Metadata\Get:
provider: App\State\Provider\HardwareProfileProvider
ApiPlatform\Metadata\Put:
provider: App\State\Provider\HardwareProfileProvider
ApiPlatform\Metadata\Patch:
provider: App\State\Provider\HardwareProfileProvider
ApiPlatform\Metadata\Post: ~
ApiPlatform\Metadata\Delete: ~
properties:
App\Entity\HardwareProfile:
id:
identifier: false
uuid:
identifier: true
Resource Definition
App\Entity\HardwareProfile
- Processor:
App\State\Processor\HardwareProfileProcessor
- Input:
App\Dto\Input\HardwareProfileInput
- Output:
App\Dto\Output\HardwareProfileOutput
- Normalization Context:
['default', 'hardware-profile:read']
- Denormalization Context:
['hardware-profile:write']
API Operations
Hardware Profile Operations
Get Hardware Profile Collection (GetCollection)
- Provider:
App\State\Provider\HardwareProfileProvider
- Filters:
- Order hardware profiles:
api_platform.filter.hardware.order
- Search hardware profiles:
api_platform.filter.hardware.search
- Order hardware profiles:
Get Hardware Profile (Get)
- Provider:
App\State\Provider\HardwareProfileProvider
Update Hardware Profile (Put)
- Provider:
App\State\Provider\HardwareProfileProvider
Partially Update Hardware Profile (Patch)
- Provider:
App\State\Provider\HardwareProfileProvider
Create Hardware Profile (Post)
- Default Operation: ~
Delete Hardware Profile (Delete)
- Default Operation: ~
Entity Properties
App\Entity\HardwareProfile
-
id:
- Identifier:
false
- Identifier:
-
uuid:
- Identifier:
true
- Identifier:
Hardware Profile Input DTO
Fields Required in Hardware Profile Endpoint Input
-
profileName
- Type: string
- Validation: Not blank
- Groups:
hardware-profile:write
-
specifications
- Type: array
- Validation: Not blank
- Groups:
hardware-profile:write
-
isActive
- Type: boolean
- Validation: Not null
- Groups:
hardware-profile:write
- Default: true
Español
Índice
- Introducción
- Configuración
- Definición de Recursos
- Operaciones de API
- Propiedades de la Entidad
- DTO de Entrada de Perfil de Hardware
Introducción
Esta documentación describe la configuración de API Platform en un proyecto Symfony. Se detallan los recursos, operaciones y propiedades de las entidades expuestas a través de la API.
Configuración
La configuración de la API se realiza en los archivos de configuración de Symfony, generalmente en config/packages/api_platform.yaml
.
resources:
App\Entity\HardwareProfile:
processor: App\State\Processor\HardwareProfileProcessor
input: App\Dto\Input\HardwareProfileInput
output: App\Dto\Output\HardwareProfileOutput
normalizationContext:
groups: ['default', 'hardware-profile:read']
denormalizationContext:
groups: ['hardware-profile:write']
operations:
ApiPlatform\Metadata\GetCollection:
provider: App\State\Provider\HardwareProfileProvider
filters:
- 'api_platform.filter.hardware.order'
- 'api_platform.filter.hardware.search'
ApiPlatform\Metadata\Get:
provider: App\State\Provider\HardwareProfileProvider
ApiPlatform\Metadata\Put:
provider: App\State\Provider\HardwareProfileProvider
ApiPlatform\Metadata\Patch:
provider: App\State\Provider\HardwareProfileProvider
ApiPlatform\Metadata\Post: ~
ApiPlatform\Metadata\Delete: ~
properties:
App\Entity\HardwareProfile:
id:
identifier: false
uuid:
identifier: true
Definición de Recursos
App\Entity\HardwareProfile
- Processor:
App\State\Processor\HardwareProfileProcessor
- Input:
App\Dto\Input\HardwareProfileInput
- Output:
App\Dto\Output\HardwareProfileOutput
- Contexto de Normalización:
['default', 'hardware-profile:read']
- Contexto de Desnormalización:
['hardware-profile:write']
Operaciones de API
Operaciones de Perfil de Hardware
Obtener Colección de Perfiles de Hardware (GetCollection)
- Provider:
App\State\Provider\HardwareProfileProvider
- Filtros:
- Ordenar perfiles de hardware:
api_platform.filter.hardware.order
- Buscar perfiles de hardware:
api_platform.filter.hardware.search
- Ordenar perfiles de hardware:
Obtener Perfil de Hardware (Get)
- Provider:
App\State\Provider\HardwareProfileProvider
Actualizar Perfil de Hardware (Put)
- Provider:
App\State\Provider\HardwareProfileProvider
Actualización Parcial de Perfil de Hardware (Patch)
- Provider:
App\State\Provider\HardwareProfileProvider
Crear Perfil de Hardware (Post)
- Operación Predeterminada: ~
Eliminar Perfil de Hardware (Delete)
- Operación Predeterminada: ~
Propiedades de la Entidad
App\Entity\HardwareProfile
-
id:
- Identificador:
false
- Identificador:
-
uuid:
- Identificador:
true
- Identificador:
DTO de Entrada de Perfil de Hardware
Campos Requeridos en la Entrada del Endpoint de Perfil de Hardware
-
profileName
- Tipo: string
- Validación: No nulo
- Groups:
hardware-profile:write
-
specifications
- Tipo: array
- Validación: No nulo
- Groups:
hardware-profile:write
-
isActive
- Tipo: booleano
- Validación: No nulo
- Groups:
hardware-profile:write
- Predeterminado: true
Table of Contents
- Select Language / Seleccionar Idioma
- English
- Table of Contents
- Introduction
- Configuration
- Resource Definition
- API Operations
- Entity Properties
- Hardware Profile Input DTO
- Español