RestCode / WebApiProxy

MIT License
199 stars 91 forks source link

DataAnnotations not included in generated #14

Open parkinsona opened 10 years ago

parkinsona commented 10 years ago

Hi,

Thanks for the awesome proxy generator and the client. I have noticed that in the WebApiProxySource.cs that the Model class that is generated from the proxy does not include any of the data annotations from the web api model. Is there a way to get these included?

faniereynders commented 10 years ago

Hi @parkinsona thanks. Do you want to be able to generate validation from the model?

parkinsona commented 10 years ago

Being able to generate validation from the model would be great.

parkinsona commented 10 years ago

Any thoughts on how I could get validation from the model?

faniereynders commented 10 years ago

Hi @parkinsona, at the moment only the basic meta data is transferred. I will look into putting a feat like this in the future. Thanks!

wolfen351 commented 8 years ago

Wow this is a great idea. I think we could possibly include a .config file parameter to decide if we want the annotations or not.

Does anyone know an easy way to reflect the annotations off the methods server side?

faniereynders commented 8 years ago

@wolfen351 this might help https://msdn.microsoft.com/en-us/library/71s1zwct(v=vs.110).aspx