Closed PawelSuwinski closed 2 years ago
Hi,
I couldn't get this feature to work. i tried the original solution based on documentation. (iri does not exists in ApiProperty) `
private ?string $name = null;
` i do see types if is run bin/console api:json-schema:generate
so how should i configure to see some name instend of IRI?
thanks for your help
Try
#[ApiProperty(iris: ['https://schema.org/name'])]
[ApiProperty(iris: ['https://schema.org/name'])]
Hi, it just works! thank you. i don't know how i did oversee this.
One more question, could you point to one of the documentation, if it is possible to have automaticaly autocomplet field in related field dropdowns on edit pages?
thanks for your help!
Autocompletion:
Default values:
Thank its a realy good direction.
In this case auto generated admin cannot be used any more? It needs custom code all time.
In this case auto generated admin cannot be used any more? It needs custom code all time.
Not necessarily, customized and decorated are only some child components or selected props: https://api-platform.com/docs/admin/customizing/
Description
When using
https://schema.org
displaying name in place of iri does not work, so this literal hint does not work (or any defaults generated from schema-generator): https://api-platform.com/docs/admin/schema.org/#displaying-related-resources-name-instead-of-its-irionly this one would:
Name hinting is hardcoded to
http://schema.org
: https://github.com/api-platform/admin/blob/46b68715f1fd40e5916cd2e8d877808523b3b3b8/src/hydra/schemaAnalyzer.ts#L21Possible Solution
Match https also, i.e.