Property example

$extensionAttributes = $this->getExtensions($extensions$exampleDetailPath);

        if (!empty($extensionAttributes)) {
            foreach ($extensions as $extension) {
                if (!$extension instanceof AssociationField) {
                    continue;
                }

                $extensionRelationships[] = $extensionAttributes[$extension->getPropertyName()];
            }

            $attributes[] = new Property([
                'property' => 'extensions',
                'type' => 'object',
                'properties' => $extensionAttributes,
            ]);
        }

        if ($definition->getTranslationDefinition()) {
            foreach ($definition->getTranslationDefinition()->getFields() as $field) {
                if ($field->getPropertyName() === 'translations' || $field->getPropertyName() === 'id') {
                    continue;
                }

                
'relationships' => ['$ref' => '#/components/schemas/relationships'],
                    'links' => ['$ref' => '#/components/schemas/links'],
                    'meta' => ['$ref' => '#/components/schemas/meta'],
                ],
            ]),
            'relationshipLinks' => new Schema([
                'schema' => 'relationshipLinks',
                'description' => 'A resource object **MAY** contain references to other resource objects ("relationships"). Relationships may be to-one or to-many. Relationships can be specified by including a member in a resource\'s links object.',
                'type' => 'object',
                'additionalProperties' => true,
                'properties' => [
                    new Property([
                        'property' => 'self',
                        'allOf' => [
                            new Schema([
                                'description' => 'A `self` member, whose value is a URL for the relationship itself (a "relationship URL"). This URL allows the client to directly manipulate the relationship. For example, it would allow a client to remove an `author` from an `article` without deleting the people resource itself.',
                                'type' => 'array',
                                'items' => [
                                    'type' => 'object',
                                ],
                            ]),
                            new Schema([
                                'ref' => '#/components/schemas/link',
                            ]),
Home | Imprint | This part of the site doesn't use cookies.