Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVC-882 fixed issues related to the services #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
8 changes: 8 additions & 0 deletions poc-with-identification-counter/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
<groupId>com.devonfw.java.modules</groupId>
<artifactId>devon4j-security</artifactId>
</dependency>

<!-- Required for secrutiy REST service -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general we have conventions and best practices in devonfw that should be strictly followed. Indentation is 2 spaces for any file format.
Please use devonfw IDE and proper formatting.

As you can see in the diffs here on github for your changes in core/pom.xml it is not possible to see what really has been changed (this is called "diff wars"). Please try to align your formatting to avoid this.

Also have a look here:
https://github.com/devonfw/devon4j/blob/develop/documentation/coding-conventions.asciidoc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatted the pom.xml and committed again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the pom files with latest devon (3.2.1) pom files to support new java version (No JAXB on java 11).

</dependency>


<!-- Required for secrutiy REST service -->
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public interface EmployeemanagementRestService {
* @param id the ID of the {@link EmployeeEto}
* @return the {@link EmployeeEto}
*/
@GET
@Path("/employee/{id}/")
public EmployeeEto getEmployee(@PathParam("id") CompositeEmployeeKey id);
@GET
@Path("/employee/{employeeId}/company/{companyId}")
public EmployeeEto getEmployee(@PathParam("employeeId") String employeeId, @PathParam("companyId") String companyId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you have been facing some technical issues - maybe with JSON mapping or bean-mapping.
These can all be solved properly and easily. See e.g.:
https://github.com/devonfw/devon4j/blob/develop/documentation/guide-json.asciidoc#custom-mapping
If you have issues get it touch. We can even do a skype or teams call to get it resolved.

However, the impact should not change the design and expose the technical problems by chaning the entire API and give up our REST conventions. The idea for the composite keys is IMHO to provide a solution with minimal impact on design, CobiGen templates, etc. Therefore this approach is not leading to the right direction.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted the changes, put the composite id back to accept the composite id.


/**
* Delegates to {@link Employeemanagement#saveEmployee}.
Expand All @@ -50,8 +50,8 @@ public interface EmployeemanagementRestService {
* @param id ID of the {@link EmployeeEto} to be deleted
*/
@DELETE
@Path("/employee/{id}/")
public void deleteEmployee(@PathParam("id") CompositeEmployeeKey id);
@Path("/employee/{employeeId}/company/{companyId}")
public void deleteEmployee(@PathParam("employeeId") String employeeId, @PathParam("companyId") String companyId);

/**
* Delegates to {@link Employeemanagement#findEmployeeEtos}.
Expand All @@ -71,8 +71,9 @@ public interface EmployeemanagementRestService {
* @return the {@link EmployeeCto}
*/
@GET
@Path("/employee/cto/{id}/")
public EmployeeCto getEmployeeCto(@PathParam("id") CompositeEmployeeKey id);
@Path("/employee/cto/{employeeId}/company/{companyId}")
public EmployeeCto getEmployeeCto(@PathParam("employeeId") String employeeId,
@PathParam("companyId") String companyId);

/**
* Delegates to {@link Employeemanagement#findEmployeeCtos}.
Expand Down
Loading