Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ public class MixReportApiResource {
@GET
@Produces({ MediaType.APPLICATION_XML })
@Operation(summary = "Retrieve Mix XBRL report", operationId = "retrieveMixReport")
public String retrieveXBRLReport(@QueryParam("startDate") final Date startDate, @QueryParam("endDate") final Date endDate,
@QueryParam("currency") final String currency) {
public jakarta.ws.rs.core.Response retrieveXBRLReport(@QueryParam("startDate") final Date startDate,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please use imports

@QueryParam("endDate") final Date endDate, @QueryParam("currency") final String currency) {

final var data = xbrlResultService.getXBRLResult(startDate, endDate, currency);

// TODO: make this type safe?
return this.xbrlBuilder.build(data);
String xmlPayload = this.xbrlBuilder.build(data);

return jakarta.ws.rs.core.Response.ok().entity(xmlPayload).type(MediaType.APPLICATION_XML_TYPE).build();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please use imports

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@oluexpert99 got it!

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class MixReportXBRLBuilder {

private final MixReportXBRLNamespaceReadService readNamespaceService;

// TODO: we should do this with JAXB
public String build(final MixReportXBRLData xbrlData) {
return this.build(xbrlData.getResultMap(), xbrlData.getStartDate(), xbrlData.getEndDate(), xbrlData.getCurrency());
}
Expand Down
Loading