All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kotlin-spring.methodBody.mustache Maven / Gradle / Ivy

{{#examples}}
    {{#-first}}
        {{#async}}
return CompletableFuture.supplyAsync(()-> {
        {{/async}}getRequest().ifPresent { request ->
{{#async}}    {{/async}}            for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) {
    {{/-first}}
{{#async}}        {{/async}}{{^async}}    {{/async}}            if (mediaType.isCompatibleWith(MediaType.valueOf("{{{contentType}}}"))) {
{{#async}}        {{/async}}{{^async}}    {{/async}}                ApiUtil.setExampleResponse(request, "{{{contentType}}}", "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{example}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}")
{{#async}}        {{/async}}{{^async}}    {{/async}}                break
{{#async}}        {{/async}}{{^async}}    {{/async}}            }
    {{#-last}}
{{#async}}        {{/async}}{{^async}}    {{/async}}        }
{{#async}}    {{/async}}        }
{{#async}}    {{/async}}        return ResponseEntity({{#returnSuccessCode}}HttpStatus.valueOf({{{statusCode}}}){{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}})
            {{#async}}
        }, Runnable::run)
            {{/async}}
    {{/-last}}
{{/examples}}
{{^examples}}
return {{#async}}CompletableFuture.completedFuture({{/async}}ResponseEntity({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}})
{{/examples}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy