WebApi icon indicating copy to clipboard operation
WebApi copied to clipboard

Support Custom Odata Annotation @odata.RequiredSelect in Response

Open akhilkohlimicrosoft opened this issue 4 years ago • 2 comments

Looking for ways to support custom Odata Annotation with @odata.RequiredProperty in Response? The response example:- { "@odata.context":"https://localhost:9000/odata/$metadata#Documents","value": [ { "@odata.RequiredProperty":"testProperty" ,"ID":1,"Name":"Another.txt","Content":"test" }, { "@odata.RequiredProperty":"testProperty2" ,"ID":2,"Name":"Another2.txt","Content":"test2" } ] }

Thanks for help!

akhilkohlimicrosoft avatar Dec 24 '21 09:12 akhilkohlimicrosoft

@akhilkohlimicrosoft odata is the reserved prefix name in the annotation. you can use other namespace names other than odata.

In the WebAPI 7.x version, you can use the new feature merged at https://github.com/OData/WebApi/pull/2219 to create instance annotation.

xuzhg avatar Dec 27 '21 18:12 xuzhg

@akhilkohlimicrosoft Did you manage to resolve this?

KenitoInc avatar Mar 01 '22 12:03 KenitoInc

Closed due to inactivity

KenitoInc avatar Nov 20 '22 09:11 KenitoInc