문제

My question is straighforward - I think.

Currently the following Uris exist:

http://someserver/service/item           GET   returns all items  
http://someserver/service/item           POST  creates a new item  
http://someserver/service/item/{id}      GET   returns item with id {id}  
http://someserver/service/item/{id}      PUT   updates item with {id}  

What I would like to do is return a blank 'item', like a template for creating new items which contains a list of the object parameters, their types, required or not. The reason for this is I would like to build a generic jquery 'create new' plugin completely ignorant of the data structure, which I could apply to all my new objects.

What is the best way to implement this?

I hope this makes sense and thanks for your time.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top