Feature/create api marketplace metrics#37
Conversation
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
1 similar comment
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
…can be generated in the client.
302e7ed to
a069870
Compare
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
jorge-romero
left a comment
There was a problem hiding this comment.
- Please move your version to v0.0.4, as we are delivering the v0.0.3 now :-)
- Remove autogenerated by OpenAPI classes like MarketplaceMetricsApi.java and the model (if it comes with the next PR I could assume to have it. It includes the API and the service
- We are missing controller tests.
…marketplace-metrics
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
1 similar comment
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
Co-authored-by: Vila,Jordi (IT EDP) <jordi.vila@boehringer-ingelheim.com>
|
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
| } | ||
|
|
||
| @SuppressWarnings("unchecked") | ||
| private static <E extends Throwable, R> R sneakyThrow(Throwable e) throws E { |
There was a problem hiding this comment.
Please check if an error 500 is throw properly as this trick maybe is not capture by spring mvc or any restcontroller advice and just an error 500 is propagated.
|
|
||
| MarketplaceMetricsFacade marketplaceMetricsFacade; | ||
|
|
||
| @CrossOrigin(origins = "*") |
There was a problem hiding this comment.
Check this please, we should use a centralized cors configuration
| @@ -0,0 +1,12 @@ | |||
| package org.opendevstack.apiservice.core.security.client.crendentials; | |||
There was a problem hiding this comment.
I assume that is a typo crendentials instead of credentials in the package name
| return getProjectComponent(getDefaultInstance(), projectId, componentId); | ||
| } | ||
|
|
||
| public ProjectComponentListResponse getAllProjectComponents(String instanceName, Integer page, Integer size) throws MarketplaceException { |
There was a problem hiding this comment.
add the @ override so if the interface changes we notice that something happened
| } | ||
| } | ||
|
|
||
| public ProjectComponentListResponse getAllProjectComponents(Integer page, Integer size) throws MarketplaceException { |
| log.debug("Marketplace service GET all catalog items in instance {} ", instanceName); | ||
|
|
||
| try { | ||
| MarketplaceApiClient marketplaceClient = getOboAuthenticatedClient(instanceName); |
There was a problem hiding this comment.
If this is for the metrics, the endpoint is used by another platform, not by an user, so the OBO flow should not work here.
| ApiClient apiClient = marketplaceClient.getApiClient(); | ||
| CatalogItemsApi catalogItemsApi = new CatalogItemsApi(apiClient); | ||
|
|
||
| apiClient.setBasePath(marketplaceClient.getConfig().getProjectComponentsBaseUrl()); |
There was a problem hiding this comment.
The call should be paginated, check how is done with the products.
The end point should be paginated.
| public ResponseEntity<MarketplaceCatalogItemsMetrics> getMarketplaceCatalogItemsMetrics() { | ||
| MarketplaceCatalogItemsMetrics catalogItemsMetrics; | ||
| try { | ||
| catalogItemsMetrics = marketplaceMetricsFacade.getMarketplaceCatalogItemsMetrics(); |
There was a problem hiding this comment.
MarketplaceCatalogItemsMetrics has pagination but marketplaceMetricsFacade.getMarketplaceCatalogItemsMetrics not

No description provided.