Class DslToWireMockConverter

    • Constructor Detail

      • DslToWireMockConverter

        public DslToWireMockConverter()
    • Method Detail

      • generateOutputFileNameForInput

        public String generateOutputFileNameForInput​(String inputFileName)
        Specified by:
        generateOutputFileNameForInput in interface StubGenerator<com.github.tomakehurst.wiremock.stubbing.StubMapping>
        Parameters:
        inputFileName - - name of the input file
        Returns:
        the name of the converted stub file. If you have multiple contracts in a single file then a prefix will be added to the generated file. If you provide the Contract.getName() field then that field will override the generated file name. Example: name of file with 2 contracts is foo.groovy, it will be converted by the implementation to foo.json. The recursive file converter will create two files 0_foo.json and 1_foo.json
      • canReadStubMapping

        public boolean canReadStubMapping​(File mapping)
        Specified by:
        canReadStubMapping in interface StubGenerator<com.github.tomakehurst.wiremock.stubbing.StubMapping>
        Parameters:
        mapping - - potential stub mapping mapping
        Returns:
        true if this converter could have generated this mapping stub.