Skip to content

Commit

Permalink
[JAXRS] use contextPath variable for @ApplicationPath in RestApplicat…
Browse files Browse the repository at this point in the history
…ion (#850)

* Use contextPath variable for RestApplication templates
* Update generated RestApplication.java files, as they are skipped by default otherwise
* Update Petstore sample for jaxrs so that CIs can verify the change
  • Loading branch information
michbeck100 authored and jmini committed Aug 22, 2018
1 parent ab09909 commit 526e980
Show file tree
Hide file tree
Showing 43 changed files with 69 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package {{invokerPackage}};
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
@ApplicationPath("{{{contextPath}}}")
public class RestApplication extends Application {
// Add implementation-specific details here
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package {{invokerPackage}};
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
@ApplicationPath("{{{contextPath}}}")
public class RestApplication extends Application {
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {{package}}.impl.{{classname}}ServiceImpl;
{{/apis}}
{{/apiInfo}}

@ApplicationPath("/")
@ApplicationPath("{{{contextPath}}}")
public class RestApplication extends Application {
{{#useSwaggerFeature}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package {{invokerPackage}};
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
@ApplicationPath("{{{contextPath}}}")
public class RestApplication extends Application {
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0-SNAPSHOT
3.2.2-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
@ApplicationPath("/v2")
public class RestApplication extends Application {
// Add implementation-specific details here
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
@ApplicationPath("/v2")
public class RestApplication extends Application {

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.openapitools.api.impl.StoreApiServiceImpl;
import org.openapitools.api.impl.UserApiServiceImpl;

@ApplicationPath("/")
@ApplicationPath("/v2")
public class RestApplication extends Application {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.openapitools.api.impl.StoreApiServiceImpl;
import org.openapitools.api.impl.UserApiServiceImpl;

@ApplicationPath("/")
@ApplicationPath("/v2")
public class RestApplication extends Application {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.openapitools.api.impl.StoreApiServiceImpl;
import org.openapitools.api.impl.UserApiServiceImpl;

@ApplicationPath("/")
@ApplicationPath("/v2")
public class RestApplication extends Application {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
@ApplicationPath("/v2")
public class RestApplication extends Application {

}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0-SNAPSHOT
3.2.2-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.ReadOnlyFirst;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.Animal;
import java.io.Serializable;
import javax.validation.constraints.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.Animal;
import java.io.Serializable;
import javax.validation.constraints.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.OuterEnum;
import java.io.Serializable;
import javax.validation.constraints.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.math.BigDecimal;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.io.Serializable;
import javax.validation.constraints.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.io.Serializable;
import javax.validation.constraints.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.io.Serializable;
import javax.validation.constraints.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Category;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openapitools.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
@ApplicationPath("/v2")
public class RestApplication extends Application {

}

0 comments on commit 526e980

Please sign in to comment.