Skip to content

Commit

Permalink
Merge pull request #41 from Sholto/main
Browse files Browse the repository at this point in the history
Replace CacheControl.valueOf, as it is now deprecated
  • Loading branch information
karlvr authored Sep 21, 2023
2 parents 7571c71 + eac81b7 commit 72c191f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/java-jaxrs-server/templates/apiImpl.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class {{className name}}ApiImpl implements {{apiPackage}}.{{className nam
{{#each operations}}
public {{javax}}.ws.rs.core.Response {{name}}({{#each parameters}}{{{nativeType}}} {{identifier name}}{{#hasMore}}, {{/hasMore}}{{/each}}{{#if requestBody.nativeType}}{{#if parameters}}, {{/if}}{{{requestBody.nativeType}}} {{identifier requestBody.name}}{{/if}}) {
{{#with defaultResponse}}
final {{javax}}.ws.rs.core.Response.ResponseBuilder __response = {{javax}}.ws.rs.core.Response.status({{code}}).cacheControl({{javax}}.ws.rs.core.CacheControl.valueOf("{{#ifvex 'x-cache-control'}}{{{vendorExtensions.x-cache-control}}}{{else}}no-cache, no-store, must-revalidate, private{{/ifvex}}"));
final {{javax}}.ws.rs.core.Response.ResponseBuilder __response = {{javax}}.ws.rs.core.Response.status({{code}}).cacheControl({{javax}}.ws.rs.ext.RuntimeDelegate.getInstance().createHeaderDelegate({{javax}}.ws.rs.core.CacheControl.class).fromString("{{#ifvex 'x-cache-control'}}{{{vendorExtensions.x-cache-control}}}{{else}}no-cache, no-store, must-revalidate, private{{/ifvex}}"));
{{/with}}
try {
{{#if @root.useBeanValidation}}
Expand Down

0 comments on commit 72c191f

Please sign in to comment.