api-platform / api-platform/schema-generator

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

オープン
#72 コメント 2 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。