This topic contains 3 replies, has 2 voices, and was last updated by SkaiBoa 3 years, 5 months ago.
-
Topic
-
Hi there,
I created a new entity and want to get access over the REST-API.
Here are my Annotations:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152<?php declare(strict_types=1);namespace App\Entity;use App\Model\ExtendProduct;use Doctrine\ORM\Mapping as ORM;use Oro\Bundle\EntityBundle\EntityProperty\DatesAwareInterface;use Oro\Bundle\EntityBundle\EntityProperty\DatesAwareTrait;use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;use /** @noinspection PhpUnusedAliasInspection */Oro\Bundle\EntityConfigBundle\Metadata\Annotation\ConfigField;use Oro\Bundle\OrganizationBundle\Entity\OrganizationAwareInterface;use Oro\Bundle\UserBundle\Entity\Ownership\UserAwareTrait;/*** @ORM\Entity()* @ORM\Table(name="app_product")* @Config(* routeName="app_product_index",* routeView="app_product_view",* defaultValues={* "entity"={* "icon"="fa-gear",* },* "ownership"={* "owner_type"="USER",* "owner_field_name"="owner",* "owner_column_name"="user_owner_id",* "organization_field_name"="organization",* "organization_column_name"="organization_id"* },* "security"={* "type"="ACL",* "group_name"="",* "category"="product"* },* "dataaudit"={* "auditable"=true* },* "grid"={* "default"="app-products-grid"* },* "tag"={* "enabled"=true* }* }* )*/class Product extends ExtendProduct implements DatesAwareInterface, OrganizationAwareInterface{use UserAwareTrait;use DatesAwareTrait;Here are my api.yml:
123456api:entities:App\Entity\Product: ~#documentation_resource: '@OroUserBundle/Resources/doc/api/group.md'App\Entity\RFIDTag: ~#documentation_resource: '@OroUserBundle/Resources/doc/api/group.md'Here are my entity.yml
12345678oro_entity:entity_aliases:App\Entity\Product:alias: app_productplural_alias: app_productsApp\Entity\RFIDTag:alias: app_rfid_tagplural_alias: app_rfid_tagsI clear all caches (cache:clear, oro:api:cache:clear, oro:api:doc:cache:clear) but no success. The oro:api command shows my entites, but not in w.local/api/doc/rest_json_api.
What I ‘m doing wrong? I use 3.1-RC and with 2.6 I got no problem to enable the API for my entites, but its some weeks ago that I enbale the last entity. Maybe I got miss something ?
The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.