Custom attributes

Hi,

I've using XData to develop a simple API, I was using ChatGPT which suggested I use the following custom attributes:

[HttpPost]
[Route('register-birth')]
[Produces('application/json')]
[ProducesResponseType(202)]
[ProducesResponseType(403)]
function RegisterBirth(const ADto: TAnimalDTO): TAnimalBirthResponseDTO;,

however I get a W1074 Unknown custom attribute error. Is there any reference material which details all the custom attributes with descriptions for both XData and Aurelius?

Any help will be much appreciated.

Many thanks

Andy

Please follow this chapter of documentation to learn how to properly declare the service contracts:

Thanks Wagner, I read through that and was looking for the [ProducesResponseType(202)] so I assume there is no such custom attribute and AI has sent me on the wrong path! Anyway thanks for your time.

Andy

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.