-
-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathblog.yaml
27 lines (27 loc) · 1.44 KB
/
blog.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
annotationGenerators: # Generators we want to use
- ApiPlatform\SchemaGenerator\AnnotationGenerator\PhpDocAnnotationGenerator
attributeGenerators: # Generators we want to use
- ApiPlatform\SchemaGenerator\AttributeGenerator\DoctrineOrmAttributeGenerator
- ApiPlatform\SchemaGenerator\AttributeGenerator\ConstraintAttributeGenerator
namespaces:
entity: App\Entity # The default namespace for entities, following API Platform and Symfony best practices
types: # The list of type to generated (a PHP entity class by type will be generated)
SocialMediaPosting: ~
BlogPosting: ~ # A type to generate a PHP entity class from, including all its properties (here this type has no specific property, they are all inherited)
Article: # Schema.org has an inheritance system, we will configure all types of the hierarchy
properties: # The list of properties we want to use
articleBody: ~
articleSection: ~
CreativeWork:
properties:
author:
range: Person # PHP Schema handle relations. Here we force the type of the property to Person
cardinality: (*..0) # Force the cardinality of the relation
headline: ~
isFamilyFriendly: ~
datePublished: ~
Thing:
properties:
name: ~
Person: # Person is a relation of the "CreativeWork" type (property "author"), PHP Schema will generate relations for us
properties: {} # We don't want any specific property for a person except "name" inherited from Thing