Answer the question
In order to leave comments, you need to log in
REST service contract?
Greetings!
The question of the contract of REST services is tormenting. For some reason, it is never mentioned about him (about the contract). If in the case of SOAP or similar web services there is some kind of WSDL that can be used to determine what data goes and what operations are supported with which requests, then there is no such thing in REST (we will not talk about WADL, because many people think him obviously dead). Moreover, in the case of SOAP, WSDL-first is often used, when the contract is defined first, and then the service is implemented.
This is an understandable thing when creating services.
At one conference, I tried to find out about the contract of REST services, and they told me that in this case everything is wrong and when we request we get a list of available operations. At the same time, there is no contract for incoming data, their structure.
From here it seems to me that the use and development of REST services should be approached with some other philosophy.
I can not understand with what only, do not tell me?
Answer the question
In order to leave comments, you need to log in
I strongly recommend the book RESTful Web Services Cookbook- Solutions for Improving Scalability and Simplicity - very good about rest, + the issue of documentation is also considered there (it suggests using the HTTP OPTIONS method )
Generally there is WADL
Analogue of WSDL for REST.
Link about how it is needed and important .
Speck , where you can read about it.
And in pursuit - a cool web service that allows you to create such a file.
There are also libraries for different languages that allow you to create such a file automatically.
In practice, the REST protocol is very simple, just simpler than SOAP. Therefore, the description of WADL is often neglected. But if it is, then it is very convenient to use it.
For example, JetBrains Idea can generate a set of java classes from a WSDL / WADL file that can already be used to work with the protocol.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question