-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
111 additions
and
86 deletions.
There are no files selected for viewing
7 changes: 2 additions & 5 deletions
7
...r/src/main/java/fr/vidal/oss/jax_rs_linker/functions/VariableElementToQueryParameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
package fr.vidal.oss.jax_rs_linker.functions; | ||
|
||
import com.google.common.base.Function; | ||
import fr.vidal.oss.jax_rs_linker.model.ClassName; | ||
import fr.vidal.oss.jax_rs_linker.model.QueryParameter; | ||
|
||
import javax.annotation.Nullable; | ||
import javax.lang.model.element.VariableElement; | ||
import javax.ws.rs.QueryParam; | ||
|
||
public enum VariableElementToQueryParameter implements Function<VariableElement, QueryParameter>{ | ||
public enum VariableElementToQueryParameter implements Function<VariableElement, QueryParameter> { | ||
|
||
INTO_QUERY_PARAMETER; | ||
|
||
@Nullable | ||
@Override | ||
public QueryParameter apply(VariableElement parameterElement) { | ||
return new QueryParameter( | ||
ClassName.valueOf(parameterElement.getEnclosingElement().getEnclosingElement().getSimpleName().toString()), | ||
parameterElement.getAnnotation(QueryParam.class).value()); | ||
return new QueryParameter(parameterElement.getAnnotation(QueryParam.class).value()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
jax-rs-linker/src/test/java/fr/vidal/oss/jax_rs_linker/parser/ProductResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
package fr.vidal.oss.jax_rs_linker.parser; | ||
|
||
import fr.vidal.oss.jax_rs_linker.api.Self; | ||
import fr.vidal.oss.jax_rs_linker.api.SubResource; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import javax.ws.rs.*; | ||
|
||
@Path("/api/product") | ||
public class ProductResource { | ||
|
||
@GET | ||
@Path("/{id}") | ||
@Self | ||
public String productById(@PathParam("id") int id) { | ||
public String productById(@PathParam("id") int id, @BeanParam PagingTest paging) { | ||
return ""; | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
jax-rs-linker/src/test/java/fr/vidal/oss/jax_rs_linker/writer/EnumConstantsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.