The main goal of the spike mentioned above is to find out a way to load and use JSON schema for response validation in API tests.
There are some changes were announced to the RMB module recently, and especially we are interested in this commit, which introduces two additional endpoints for use, they are:
Those endpoints allow user to retrieve whether JSON schema or RAML file for specified module.
To include this functionality into your module you have to modify ModuleDescriptior.json file by adding following code
- for JSON Schemas API
- for RAMLs API
After it is done re-deploy module if needed.
Then, you may want to see those endpoints enabled for the module.
To check it, use following endpoints
Here is the sample response with the list of interfaces available to use
You should see similar response if you are specified interface
and finally you are able to retrieve JSON Schema for your needs (Do not forget to specify `X-Okapi-Module-Id` header)
You can find the sample response below: To summarize the information let's list the service names
To summarize the information let's list the service names