api-platform / api-platform/schema-generator

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

未關閉
#72 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
PHP
星號
474
分支
107
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。