0

I'm trying to create a fat record in api-platform, normally, it will have to put IRI, but I don't want to (I can't.). My question, is it possible to do something like that? Instead of that: enter image description here

Do it like this:

enter image description here

Thank you in advance for your future help.Thank you in advance for your future help,

Stephan Vierkant
  • 9,674
  • 8
  • 61
  • 97
bglevon
  • 1
  • 3

1 Answers1

2

You can use the allow_plain_identifiers but this is highly discouraged. See this comment for the rationale: https://github.com/api-platform/core/pull/2022#issuecomment-398851861

Kévin Dunglas
  • 2,864
  • 2
  • 23
  • 39
  • Hello, Thank you very much for your help, in fact I had found a solution by customizing it via (construct and __invoke). I'm not sure if it's a good idea to do it this way, but I'm sure it's a good idea. I understand that it is not advisable, but I am obliged to do it like that, because the consumers don't know that they are going to use this api and will not know what is an IRI. Explaining it to them will be be impossible. Thank you very much, – bglevon Aug 30 '21 at 08:56