api-platform / api-platform/schema-generator

[enhancement] don't make abstract classes and embeddables api resources

Abierto
#72 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
474
Forks
107
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Right now if I have this `schema.yml`

```yaml
types:
Thing:
properties:
name: ~

Person:
properties:
familyName: ~

Country:
parent: false
embeddable: true
properties:
address: { range: "Text" }

PostalAddress:
parent: false
properties:
addressCountry: { range: "Country", embedded: true }
```

It will generate all the entities and all entities are marked as an api resource in the class annotations. The only problem is that you don't want `Thing` and `Country` to be api resources. `Thing` is an abstract class so it can't even be initialized. And since `Country` is an embeddable it isn't linked to any database table so you can never fetch any countries from the api.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.