Class YamlToJsonFilter

  • All Implemented Interfaces:
    io.restassured.filter.Filter, io.restassured.filter.OrderedFilter

    public class YamlToJsonFilter
    extends Object
    implements io.restassured.filter.OrderedFilter
    This filter is a replacement for the original YamlToJsonConverterServlet.

    Its only purpose is to convert YAML to JSON so that tests can use JsonPath to inspect the response body.

    Author:
    Martin Kouba
    • Field Summary

      • Fields inherited from interface io.restassured.filter.OrderedFilter

        DEFAULT_PRECEDENCE, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Constructor Detail

      • YamlToJsonFilter

        public YamlToJsonFilter()
    • Method Detail

      • filter

        public io.restassured.response.Response filter​(io.restassured.specification.FilterableRequestSpecification requestSpec,
                                                       io.restassured.specification.FilterableResponseSpecification responseSpec,
                                                       io.restassured.filter.FilterContext ctx)
        Specified by:
        filter in interface io.restassured.filter.Filter
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface io.restassured.filter.OrderedFilter