shortName on annotated ApiResource
See original GitHub issueHi there,
the expected behaviour of the following annotation setting the shortName attribute would be that I should be able to spot “foo_bar” in the entrypoint (“fooBar”: “/foo_bar”), rather than “blurb”, however that doesn’t seem to work as all I can see is “blurb”: “/blurb”…
Is the idea behind shortName still the same as it was in v1?
/**
* @ApiResource(attributes={"shortName"="FooBar"})
* @ORM\Entity
* @ORM\Table(name="doesntreallymatter")
*/
class Blurb {
...
}
Thanks in advance for your advice!
Kind regards, David
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
how to link http client with ApiResource - Stack Overflow
I have a client which gets xml and converts it to associative array: class GetYukiAccountingBalance implements ...
Read more >Getting started - API Platform
To expose your entities, you can use Docblock annotations, XML and YAML ... use ApiPlatform\Metadata\ApiResource; use Doctrine\ORM\Mapping as ORM; ...
Read more >Resource Metadata Factory: Dynamic ApiResource Options
Yep, this ResourceMetadata object contains all of the configuration from our ApiResource annotation... which API Platform then uses to power... pretty much ...
Read more >Extend the Kubernetes API with CustomResourceDefinitions
Your resource manifests use this. kind: CronTab # shortNames allow ... annotations: kubectl.kubernetes.io/last-applied-configuration: ...
Read more >Create an API Resource in API Platform | Sajad Torkamani
<?php namespace App\Entity; use ApiPlatform\Core\Annotation\ApiResource; ... {_format} api_jsonld_context ANY ANY ANY /api/contexts/{shortName}.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, scrap my previous reply… #facepalm
Using
* @ApiResource(shortName="FooBar")
results in having “fooBar”: “/foo_bar” when checking the entrypoint - thanks for your quick feedback! DavidCan you try this: