Class OpenAPINormalizer.Filter

    • Constructor Detail

      • Filter

        protected Filter​(String filters)
    • Method Detail

      • parse

        public boolean parse()
        Perform the parsing of the filter string.
        Returns:
        true if filters need to be processed
      • splitByPipe

        protected Set<String> splitByPipe​(String filterValue)
        Split the filterValue by pipe.
        Returns:
        the split values.
      • parse

        protected void parse​(String filterName,
                             String filterValue)
        Parse non default filters. Override this method to add custom parsing logic. By default throws IllegalArgumentException.
        Parameters:
        filterName - name of the filter
        filterValue - value of the filter
      • parseFails

        protected void parseFails​(String filterName,
                                  String filterValue)
      • hasCustomFilterMatch

        protected boolean hasCustomFilterMatch​(String path,
                                               io.swagger.v3.oas.models.Operation operation)
        Test if the OpenAPI contract match an extra filter. Override this method to add custom logic.
        Parameters:
        operation - Openapi Operation
        path - Path of the operation
        Returns:
        true if the operation of path match the filter
      • hasFilter

        public boolean hasFilter()
      • apply

        public void apply​(String path,
                          io.swagger.v3.oas.models.PathItem pathItem,
                          Map<String,​Function<io.swagger.v3.oas.models.PathItem,​io.swagger.v3.oas.models.Operation>> methodMap)
      • logIfMatch

        protected boolean logIfMatch​(String filterName,
                                     io.swagger.v3.oas.models.Operation operation,
                                     boolean filterMatched)
      • logMatch

        protected void logMatch​(String filterName,
                                io.swagger.v3.oas.models.Operation operation)
      • getLogger

        protected org.slf4j.Logger getLogger()