Configuration

The following options can be used in the configuration file.

構成ファイルでは、次のオプションを使用できます。

Customizing PHP Namespaces

Namespaces of generated PHP classes can be set globally, respectively for entities, enumerations and interfaces (if used with Doctrine Resolve Target Entity Listener option).

生成された PHP クラスの名前空間は、エンティティ、列挙型、インターフェースに対してそれぞれグローバルに設定できます (Doctrine Resolve Target Entity Listener オプションを使用する場合)。

Example:

例:

namespaces:
    entity: "App\ECommerce\Entity"
    enum: "App\ECommerce\Enum"
    interface: "App\ECommerce\Model"

Namespaces can also be specified for a specific type. It will take precedence over any globally configured namespace.

特定の型に対して名前空間を指定することもできます。これは、グローバルに構成された名前空間よりも優先されます。

Example:

例:

types:
    Thing:
        namespaces:
            class: "App\Common\Entity" # Namespace for the Thing entity (works for enumerations too)
            interface: "App\Schema\Model" # Namespace of the related interface

Forcing a Field Type (Range)

RDF allows a property to have several types (ranges). However, the generator allows only one type by property. If not configured, it will use the first defined type. The range option is useful to set the type of a given property. It can also be used to force a type (even if not in the RDF vocabulary definition).

RDF では、プロパティーに複数のタイプ (範囲) を持たせることができます。ただし、ジェネレーターはプロパティごとに 1 つのタイプのみを許可します。構成されていない場合は、最初に定義されたタイプが使用されます。範囲オプションは、特定のプロパティのタイプを設定するのに役立ちます。タイプを強制するためにも使用できます (そうでない場合でも)。 RDF語彙定義で)。

Example:

例:

types:
    Brand:
        properties:
            logo: { range: "ImageObject" } # Force the range of the logo property to ImageObject (can also be a URL according to Schema.org)

    PostalAddress:
        properties:
            addressCountry: { range: "Text" } # Force the type to Text instead of Country. It will be converted to the PHP string type.

Forcing a Field Cardinality

The cardinality of a property is automatically guessed. The cardinality option allows to override the guessed value. Supported cardinalities are:

プロパティのカーディナリティは自動的に推測されます。カーディナリティ オプションを使用すると、推測された値をオーバーライドできます。サポートされているカーディナリティは次のとおりです。

  • (0..1): scalar, not required
    (0..1): スカラー、不要
  • (0..*): array, not required
    (0..*): 配列、不要
  • (1..1): scalar, required
    (1..1): スカラー、必須
  • (1..*): array, required
    (1..*): 配列、必須
  • (*..0)
    (*..0)
  • (*..1)
    (*..1)
  • (*..*)
    (*..*)

Cardinalities are enforced by the class generator, the Doctrine ORM generator and the Symfony validation generator.

カーディナリティは、クラス ジェネレーター、Doctrine ORM ジェネレーター、および Symfony 検証ジェネレーターによって強制されます。

Example:

例:

types:
    Product:
        properties:
            sku:
                cardinality: "(0..1)"

Changing the Default Cardinality

When a cardinality has not been guessed, a default cardinality will be used instead.

カーディナリティが推測されていない場合は、代わりにデフォルトのカーディナリティが使用されます。

By default, the cardinality (1..1) is used, but you can change it like this:

デフォルトではカーディナリティ (1..1) が使用されますが、次のように変更できます。

relations:
    defaultCardinality: "(1..*)"

Adding a Custom Attribute or Modifying a Generated Attribute

You can add any custom attribute you want, or you can modify the arguments of any generated attribute, for a property, a class or even a whole vocabulary!

プロパティ、クラス、またはボキャブラリ全体に対して、必要なカスタム属性を追加したり、生成された属性の引数を変更したりできます。

For instance, if you want to change the join table name and add security for a specific relation:

たとえば、結合テーブル名を変更し、特定のリレーションにセキュリティを追加する場合:

types:
    Organization:
        properties:
            contactPoint:
                attributes:
                    ORM\JoinTable: { name: organization_contactPoint } # Instead of organization_contact_point by default
                    ApiProperty: { security: "is_granted('ROLE_ADMIN')" }

To add a custom attribute, you also need to add it in the uses option:

カスタム属性を追加するには、uses オプションにも追加する必要があります。

uses:
    App\Attributes\MyAttribute: ~

types:
    Book:
        attributes:
            - ApiResource: { routePrefix: '/library' } # Add a route prefix for this resource
            - MyAttribute: ~
            # Note the optional usage of a hyphen list: it allows to preserve the order of attributes

Forcing (or Enabling) a Class Parent

Override the guessed class hierarchy of a given type with this option.

このオプションを使用して、特定のタイプの推測されたクラス階層をオーバーライドします。

Example:

例:

types:
    ImageObject:
        parent: Thing # Force the parent to be Thing instead of CreativeWork > MediaObject
        properties: ~
    Drug:
        parent: ~ # Enable the class hierarchy for this type

Forcing a Class to be Abstract

Force a class to be (or to not be) abstract. By default, it will be guessed, depending on the class hierarchy and if the class is used in a relation.

クラスを抽象化する (または抽象化しない) ように強制します。デフォルトでは、クラス階層とクラスがリレーションで使用されているかどうかに応じて推測されます。

Example:

例:

types:
    Person:
        abstract: true

Define API Platform Operations

API Platform operations can be added this way:

API プラットフォーム オペレーションは、次の方法で追加できます。

types:
    Person:
        operations:
            Get: ~
            GetCollection:
                routeName: get_person_collection

Forcing a Nullable Property

Force a property to be (or to not be) nullable.

プロパティを null 許容にする (またはしない) ように強制します。

By default, this option is null: the cardinality will be used to determine the nullability. If no cardinality is found, it will be true.

デフォルトでは、このオプションは null です。カーディナリティは、null 可能性を決定するために使用されます。カーディナリティが見つからない場合は、true になります。

Example:

例:

    Person:
        properties:
            name: { nullable: false }

The #[Assert\NotNull] constraint is automatically added.

#[Assert\NotNull] 制約が自動的に追加されます。

<?php

/**
 * The name of the item.
 */
#[ORM\Column]
#[Assert\NotNull]
private string $name;

Forcing a Unique Property

Force a property to be (or to not be) unique.

プロパティを一意にする (または一意にしない) ようにします。

By default, this option is false.

デフォルトでは、このオプションは false です。

Example:

例:

    Person:
        properties:
            email: { unique: true }

Output:

出力:

<?php
// api/src/Entity/Person.php
namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Doctrine\ORM\Mapping as ORM;

/**
 * A person (alive, dead, undead, or fictional).
 *
 * @see https://schema.org/Person
 */
#[ORM\Entity]
#[ApiResource(types: ['https://schema.org/Person'])]
#[UniqueEntity('email')]
class Person
{
    /**
     * Email address.
     *
     * @see https://schema.org/email
     */
    #[ORM\Column]
    #[Assert\Email]
    private string $email;

    // ...
}

Making a Property Read-Only

A property can be marked read-only with the following configuration:

プロパティは、次の構成で読み取り専用としてマークできます。

    Person:
        properties:
            email: { writable: false }

In such case, no mutator method will be generated.

このような場合、mutator メソッドは生成されません。

Making a Property Write-Only

A property can be marked write-only with the following configuration:

プロパティは、次の構成で書き込み専用としてマークできます。

    Person:
        properties:
            email: { readable: false }

In this case, no getter method will be generated.

この場合、getter メソッドは生成されません。

Forcing an Embeddable Class to be Embedded

Force an embeddable class to be embedded.

埋め込み可能なクラスを強制的に埋め込みます。

Example:

例:

    QuantitativeValue:
        embeddable: true
    Product:
        properties:
            weight: { range: "QuantitativeValue", embedded: true }

Output:

出力:

<?php
// api/src/Entity/Product.php
namespace App\Entity;

use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use Doctrine\ORM\Mapping as ORM;

/**
 * Any offered product or service.
 *
 * @see https://schema.org/Product Documentation on Schema.org
 */
#[ORM\Entity]
#[ApiResource(types: ['https://schema.org/Product'])]
#[UniqueEntity('gtin13s')]
class Product
{
    /**
     * The weight of the product or person.
     *
     * @see https://schema.org/weight
     */
    #[ORM\Embedded(class: QuantitativeValue::class)]
    #[ApiProperty(iri: 'https://schema.org/weight')]
    private ?QuantitativeValue $weight = null;

    // ...
}

Skipping Accessor Method Generation

It's possible to skip the generation of accessor methods. This is particularly useful combined with the visibility: public option.

アクセサー メソッドの生成をスキップすることができます。これは、visibility: public オプションと組み合わせると特に便利です。

To skip the generation of accessor methods, use the following config:

アクセサー メソッドの生成をスキップするには、次の構成を使用します。

accessorMethods: false

Using Fluent Mutator Methods

If you want to generate fluent mutator methods, like this:

流れるようなミューテーター メソッドを生成する場合は、次のようにします。

public function setName(?string $name): self
{
    $this->name = $name;

    return $this;
}

Use the following config:

次の構成を使用します。

fluentMutatorMethods: true

Disabling the id Generator

By default, the generator adds a property called id not provided by Schema.org. This is useful when generating an entity for use with an ORM or an ODM but not when generating DTOs. This behavior can be disabled with the following setting:

デフォルトでは、ジェネレーターは、Schema.org によって提供されていない id というプロパティを追加します。これは、ORM または ODM で使用するエンティティを生成する場合に役立ちますが、DTO を生成する場合には役立ちません。この動作は、次の設定で無効にすることができます。

id:
    generate: false

Generating UUIDs

It's also possible to let the DBMS generate UUIDs instead of auto-incremented integers:

自動インクリメントされた整数の代わりに、DBMS に UUID を生成させることもできます。

id:
    generationStrategy: uuid

User-submitted UUIDs

To manually set a UUID instead of letting the DBMS generate it, use the following config:

UUID を DBMS に生成させる代わりに手動で設定するには、次の構成を使用します。

id:
    generationStrategy: uuid
    writable: true

Generating Custom IDs

With this configuration option, an $id property of type string and the corresponding getters and setters will be generated, but the DBMS will not generate anything. The ID must be set manually.

この構成オプションを使用すると、string 型の $id プロパティと、対応する getter および setter が生成されますが、DBMS は何も生成しません。 ID は手動で設定する必要があります。

id:
    generationStrategy: none

Disabling Usage of Doctrine Collections

By default, the generator uses classes provided by the Doctrine Collections library to store collections of entities. This is useful (and required) when using Doctrine ORM or Doctrine MongoDB ODM. This behavior can be disabled (to fall back to standard arrays) with the following setting:

デフォルトでは、ジェネレータは Doctrine Collections ライブラリによって提供されるクラスを使用して、エンティティのコレクションを保存します。これは、Doctrine ORM または Doctrine MongoDB ODM を使用する場合に便利 (かつ必須) です。この動作は、次の設定で (標準の配列にフォールバックするために) 無効にすることができます:

doctrine:
    useCollection: false

Changing the Field Visibility

Generated fields have a private visibility and are exposed through getters and setters. The default visibility can be changed with the fieldVisibility option.

生成されたフィールドには非公開の可視性があり、ゲッターとセッターを介して公開されます。デフォルトの可視性は、fieldVisibility オプションで変更できます。

Example:

例:

fieldVisibility: "protected"

Generating Assert\Type Attributes

It's possible to automatically generate Symfony validator's #[Assert\Type] attributes using the following config:

次の構成を使用して、Symfony バリデーターの #[Assert\Type] 属性を自動的に生成することができます。

validator:
    assertType: true

Forcing Doctrine Inheritance Mapping Attribute

The generator is able to handle inheritance in a smart way:

ジェネレーターは、スマートな方法で継承を処理できます。

  • If a class has children and is referenced by a relation, it will generate an inheritance mapping strategy with #[InheritanceType] (configurable, see below), #[DiscriminatorColumn] (#[DiscriminatorField] for ODM) and #[DiscriminatorMap]. The discriminator map will be filled with all possible values.
    クラスに子があり、リレーションによって参照される場合、#[InheritanceType] (構成可能、以下を参照)、#[DiscriminatorColumn] (ODM の #[DiscriminatorField])、および #[DiscriminatorMap] を使用して継承マッピング戦略を生成します。識別子マップは、すべての可能な値で埋められます。
  • If a class has children but is not referenced by a relation, it will generate a mapped superclass (#[MappedSuperclass]). If this mapped superclass defines relations and is used by multiple children, the generator will add #[AssociationOverride] attributes to them (see the related Doctrine documentation), thanks to the special DoctrineOrmAssociationOverrideAttributeGenerator.
    クラスに子があるがリレーションによって参照されていない場合、マップされたスーパークラス (#[MappedSuperclass]) が生成されます。このマップされたスーパークラスがリレーションを定義し、複数の子によって使用される場合、ジェネレーターはそれらに #[AssociationOverride] 属性を追加します。 (関連する Doctrine ドキュメントを参照してください)、特別な DoctrineOrmAssociationOverrideAttributeGenerator のおかげです。
  • If a class has no child, an #[Entity] (or #[Document] for ODM) attribute is used.
    クラスに子がない場合は、#[Entity] (ODM の場合は #[Document]) 属性が使用されます。

If this behaviour does not suit you, the inheritance attribute can be forced in the following way:

この動作が気に入らない場合は、次の方法で継承属性を強制できます。

doctrine:
    inheritanceType: SINGLE_TABLE # Default: JOINED
    inheritanceAttributes:
        CustomInheritanceAttribute: []

Interfaces and Doctrine Resolve Target Entity Listener

ResolveTargetEntityListener is a feature of Doctrine to keep modules independent. It allows to specify interfaces and abstract classes in relation mappings.

ResolveTargetEntityListener は、モジュールを独立した状態に保つ Doctrine の機能です。リレーション マッピングでインターフェイスと抽象クラスを指定できます。

If you set the option useInterface to true, the generator will generate an interface corresponding to each generated entity and will use them in relation mappings.

オプション useInterface を true に設定すると、ジェネレーターは各 generatedentity に対応するインターフェースを生成し、それらを関係マッピングで使用します。

To let the schema generator generate the mapping file usable with Symfony, add the following to your config file:

スキーマ ジェネレーターが Symfony で使用できるマッピング ファイルを生成できるようにするには、構成ファイルに以下を追加します。

doctrine:
    resolveTargetEntityConfigPath: path/to/doctrine.xml

The default mapping file format is XML, but you can change it to YAML with the following option:

デフォルトのマッピング ファイル形式は XML ですが、次のオプションを使用して YAML に変更できます。

doctrine:
    resolveTargetEntityConfigPath: path/to/doctrine.yaml
    resolveTargetEntityConfigType: YAML # Supports XML & YAML

Doctrine Resolve Target Entity Config Type

By default, the mapping file is in XML. If you want to have a YAML file, add the following:

デフォルトでは、マッピング ファイルは XML です。 YAML ファイルが必要な場合は、次を追加します。

doctrine:
    resolveTargetEntityConfigPath: path/to/doctrine.yaml
    resolveTargetEntityConfigType: yaml

Custom Schemas

The generator can use your own schema definitions. They must be written in RDF/XML and follow the format of the Schema.org's definition. This is useful to document your Schema.org extensions and use them to generate the PHP data model of your application.

ジェネレーターは独自のスキーマ定義を使用できます。それらは RDF/XML で記述され、Schema.org の定義の形式に従う必要があります。これは、Schema.org 拡張機能を文書化し、それらを使用してアプリケーションの PHP データ モデルを生成するのに役立ちます。

Example:

例:

vocabularies:
    - https://github.com/schemaorg/schemaorg/raw/main/data/releases/13.0/schemaorg-current-https.rdf
    - http://example.com/data/myschema.rdf # Additional types

You can also use any other vocabulary. Check the Linked Open Vocabularies to find one fitting your needs.

他の語彙も使用できます。Linked Open Vocabularies をチェックして、ニーズに合った語彙を見つけてください。

For instance, to generate a data model from the Video Game Ontology, use the following config file:

たとえば、ビデオ ゲーム オントロジーからデータ モデルを生成するには、次の構成ファイルを使用します。

vocabularies:
    - http://vocab.linkeddata.es/vgo/GameOntologyv3.owl # The URL of the vocabulary definition

types:
    Session:
        vocabularyNamespace: http://purl.org/net/VideoGameOntology#

  # ...

All Types, Resolve Types and Exclude

If you use multiple vocabularies, and you need to generate all types for some ones, only generate types when they are used for some others and exclude some types, you can do so with this kind of configuration:

複数の語彙を使用していて、一部の語彙に対してすべての型を生成する必要がある場合、それらが他の語彙に使用される場合にのみ型を生成し、一部の型を除外する必要がある場合は、次のような構成で行うことができます。

vocabularies:
    # Schema.org classes will only be generated when one of its type is used in the other vocabularies.
    - { uri: 'https://schema.org/version/latest/schemaorg-current-https.rdf', format: null, allTypes: false }
    - http://vocab.linkeddata.es/vgo/GameOntologyv3.owl

allTypes: true # Generate all types by default for vocabularies
resolveTypes: true # Resolve types in other vocabularies

types:
    GameEvent:
        exclude: true # Exclude the GameEvent type

Checking GoodRelation Compatibility

If the checkIsGoodRelations option is set to true, the generator will emit a warning if an encountered property is not par of the GoodRelations schema.

checkIsGoodRelations オプションが true に設定されている場合、発生したプロパティが GoodRelations スキーマと一致しない場合、ジェネレータは警告を発します。

This is useful when generating e-commerce data models.

これは、e コマース データ モデルを生成するときに役立ちます。

Author PHPDoc

Add a @author PHPDoc annotation to class DocBlock.

クラス DocBlock に @author PHPDoc アノテーションを追加します。

Example:

例:

author: "Kévin Dunglas <kevin@les-tilleuls.coop>"

PHP File Header

Prepend all generated PHP files with a custom comment.

生成されたすべての PHP ファイルの先頭にカスタム コメントを追加します。

Example:

例:

header: |
    /*
     * This file is part of the Ecommerce package.
     *
     * (c) Kévin Dunglas <kevin@dunglas.fr>
     *
     * For the full copyright and license information, please view the LICENSE
     * file that was distributed with this source code.
     */

Disabling Generators and Creating Custom Ones

By default, all generators except DoctrineMongoDBAttributeGenerator are enabled. You can specify the list of generators to use with the annotationGenerators and attributeGenerators option.

デフォルトでは、DoctrineMongoDBAttributeGenerator を除くすべてのジェネレーターが有効になっています。annotationGenerators および attributeGenerators オプションで使用するジェネレーターのリストを指定できます。

Example (enabling only the PHPDoc generator):

例 (PHPDoc ジェネレーターのみを有効にする):

annotationGenerators:
    - ApiPlatform\SchemaGenerator\AnnotationGenerator\PhpDocAnnotationGenerator
attributeGenerators: []

You can write your own generators by implementing the AnnotationGeneratorInterface or AttributeGeneratorInterface. The AbstractAnnotationGenerator or AbstractAttributeGenerator provides helper methods useful when creating your own generators.

AnnotationGeneratorInterface または AttributeGeneratorInterface を実装することにより、独自のジェネレーターを作成できます。AbstractAnnotationGenerator または AbstractAttributeGenerator は、独自のジェネレーターを作成するときに役立つヘルパー メソッドを提供します。

Enabling a custom attribute generator and the PHPDoc generator:

カスタム属性ジェネレーターと PHPDoc ジェネレーターを有効にします。

annotationGenerators:
    - ApiPlatform\SchemaGenerator\AnnotationGenerator\PhpDocAnnotationGenerator
attributeGenerators
    - Acme\Generators\MyGenerator

Full Configuration Reference

openApi:
    file:                 null

# RDF vocabularies
vocabularies:

    # Prototype
    uri:

        # RDF vocabulary to use
        uri:                  ~ # Example: 'https://schema.org/version/latest/schemaorg-current-https.rdf'

        # RDF vocabulary format
        format:               null # Example: rdfxml

        # Generate all types for this vocabulary, even if an explicit configuration exists. If allTypes is enabled globally, it can be disabled for this particular vocabulary
        allTypes:             null

        # Attributes (merged with generated attributes)
        attributes:           []

# Namespace of the vocabulary to import
vocabularyNamespace:  'https://schema.org/' # Example: 'http://www.w3.org/ns/activitystreams#'

# Relations configuration
relations:

    # OWL relation URIs containing cardinality information in the GoodRelations format
    uris:                 # Example: 'https://archive.org/services/purl/goodrelations/v1.owl'

        # Default:
        - https://archive.org/services/purl/goodrelations/v1.owl

    # The default cardinality to use when it cannot be extracted
    defaultCardinality:   (1..1) # One of "(0..1)"; "(0..*)"; "(1..1)"; "(1..*)"; "(*..0)"; "(*..1)"; "(*..*)"

# Debug mode
debug:                false

# Use old API Platform attributes (API Platform < 2.7)
apiPlatformOldAttributes: false

# IDs configuration
id:

    # Automatically add an ID field to entities
    generate:             true

    # The ID generation strategy to use ("none" to not let the database generate IDs).
    generationStrategy:   auto # One of "auto"; "none"; "uuid"; "mongoid"

    # Is the ID writable? Only applicable if "generationStrategy" is "uuid".
    writable:             false

# Generate interfaces and use Doctrine's Resolve Target Entity feature
useInterface:         false

# Emit a warning if a property is not derived from GoodRelations
checkIsGoodRelations: false

# A license or any text to use as header of generated files
header:               null # Example: '// (c) Kévin Dunglas <dunglas@gmail.com>'

# PHP namespaces
namespaces:

    # The global namespace's prefix
    prefix:               null # Example: App\

    # The namespace of the generated entities
    entity:               App\Entity # Example: App\Entity

    # The namespace of the generated enumerations
    enum:                 App\Enum # Example: App\Enum

    # The namespace of the generated interfaces
    interface:            App\Model # Example: App\Model

# Custom uses (for instance if you use a custom attribute)
uses:

    # Prototype
    name:

        # Name of this use
        name:                 ~ # Example: App\Attributes\MyAttribute

        # The alias to use for this use
        alias:                null

# Doctrine
doctrine:

    # Use Doctrine's ArrayCollection instead of standard arrays
    useCollection:        true

    # The Resolve Target Entity Listener config file path
    resolveTargetEntityConfigPath: null

    # The Resolve Target Entity Listener config file type
    resolveTargetEntityConfigType: XML # One of "XML"; "yaml"

    # Doctrine inheritance attributes (if set, no other attributes are generated)
    inheritanceAttributes: []

    # The inheritance type to use when an entity is referenced by another and has child
    inheritanceType:      JOINED # One of "JOINED"; "SINGLE_TABLE"; "SINGLE_COLLECTION"; "TABLE_PER_CLASS"; "COLLECTION_PER_CLASS"; "NONE"

    # Maximum length of any given database identifier, like tables or column names
    maxIdentifierLength:  63

# Symfony Validator Component
validator:

    # Generate @Assert\Type annotation
    assertType:           false

# The value of the phpDoc's @author annotation
author:               false # Example: 'Kévin Dunglas <dunglas@gmail.com>'

# Visibility of entities fields
fieldVisibility:      private # One of "private"; "protected"; "public"

# Set this flag to false to not generate getter, setter, adder and remover methods
accessorMethods:      true

# Set this flag to true to generate fluent setter, adder and remover methods
fluentMutatorMethods: false
rangeMapping:

    # Prototype
    name:                 ~

# Generate all types, even if an explicit configuration exists
allTypes:             false

# If a type is present in a vocabulary but not explicitly imported (types) or if the vocabulary is not totally imported (allTypes), it will be generated
resolveTypes:         false

# Types to import from the vocabulary
types:

    # Prototype
    id:

        # Exclude this type, even if "allTypes" is set to true"
        exclude:              false

        # Namespace of the vocabulary of this type (defaults to the global "vocabularyNamespace" entry)
        vocabularyNamespace:  null # Example: 'http://www.w3.org/ns/activitystreams#'

        # Is the class abstract? (null to guess)
        abstract:             null

        # Is the class embeddable?
        embeddable:           false

        # Type namespaces
        namespaces:

            # The namespace for the generated class (override any other defined namespace)
            class:                null

            # The namespace for the generated interface (override any other defined namespace)
            interface:            null

        # Attributes (merged with generated attributes)
        attributes:           []

        # The parent class, set to false for a top level class
        parent:               false

        # If declaring a custom class, this will be the class from which properties type will be guessed
        guessFrom:            Thing

        # Operations for the class
        operations:           []

        # Import all existing properties
        allProperties:        false

        # Properties of this type to use
        properties:

            # Prototype
            id:

                # Exclude this property, even if "allProperties" is set to true"
                exclude:              false

                # The property range
                range:                null # Example: Offer
                cardinality:          unknown # One of "(0..1)"; "(0..*)"; "(1..1)"; "(1..*)"; "(*..0)"; "(*..1)"; "(*..*)"; "unknown"

                # Symfony Serialization Groups
                groups:               []

                # The doctrine mapped by attribute
                mappedBy:             null # Example: partOfSeason

                # The doctrine inversed by attribute
                inversedBy:           null # Example: episodes

                # Is the property readable?
                readable:             true

                # Is the property writable?
                writable:             true

                # Is the property nullable? (if null, cardinality will be used: will be true if no cardinality found)
                nullable:             null

                # Is the property required?
                required:             true

                # The property unique
                unique:               false

                # Is the property embedded?
                embedded:             false

                # Attributes (merged with generated attributes)
                attributes:           []

# Annotation generators to use
annotationGenerators:

    # Default:
    - ApiPlatform\SchemaGenerator\AnnotationGenerator\PhpDocAnnotationGenerator

# Attribute generators to use
attributeGenerators:

    # Defaults:
    - ApiPlatform\SchemaGenerator\AttributeGenerator\DoctrineOrmAttributeGenerator
    - ApiPlatform\SchemaGenerator\AttributeGenerator\DoctrineOrmAssociationOverrideAttributeGenerator
    - ApiPlatform\SchemaGenerator\AttributeGenerator\ApiPlatformCoreAttributeGenerator
    - ApiPlatform\SchemaGenerator\AttributeGenerator\ConstraintAttributeGenerator
    - ApiPlatform\SchemaGenerator\AttributeGenerator\ConfigurationAttributeGenerator

# Directories for custom generator twig templates
generatorTemplates:   []