mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 03:29:03 +00:00
Fix #346: Add displayName to Chart and Dashboard entities and use the dashboard and chart ids/unique identifiers in name field
This commit is contained in:
parent
193c6a782a
commit
0d63138111
@ -239,7 +239,7 @@ public class ChartResource {
|
||||
Chart chart =
|
||||
new Chart().withId(UUID.randomUUID()).withName(create.getName()).withDisplayName(create.getDisplayName())
|
||||
.withDescription(create.getDescription())
|
||||
.withService(create.getService()).withChartId(create.getChartId())
|
||||
.withService(create.getService())
|
||||
.withChartType(create.getChartType()).withChartUrl(create.getChartUrl())
|
||||
.withTables(create.getTables()).withTags(create.getTags())
|
||||
.withOwner(create.getOwner());
|
||||
@ -287,7 +287,7 @@ public class ChartResource {
|
||||
Chart chart =
|
||||
new Chart().withId(UUID.randomUUID()).withName(create.getName()).withDisplayName(create.getDisplayName())
|
||||
.withDescription(create.getDescription())
|
||||
.withService(create.getService()).withChartId(create.getChartId())
|
||||
.withService(create.getService())
|
||||
.withChartType(create.getChartType()).withChartUrl(create.getChartUrl())
|
||||
.withTables(create.getTables()).withTags(create.getTags())
|
||||
.withOwner(create.getOwner());
|
||||
|
||||
@ -19,10 +19,6 @@
|
||||
"description": "Description of the database instance. What it has and how to use it.",
|
||||
"type": "string"
|
||||
},
|
||||
"chartId": {
|
||||
"description": "Unique Identifier of the Chart from the Source Service.",
|
||||
"type": "string"
|
||||
},
|
||||
"chartType": {
|
||||
"$ref": "../../entity/data/chart.json#/definitions/chartType"
|
||||
},
|
||||
|
||||
@ -159,7 +159,7 @@ public class ChartResourceTest extends CatalogApplicationTest {
|
||||
@Test
|
||||
public void post_chartWithoutRequiredFields_4xx(TestInfo test) {
|
||||
HttpResponseException exception = assertThrows(HttpResponseException.class, () ->
|
||||
createChart(create(test).withName(null).withChartId("0"), adminAuthHeaders()));
|
||||
createChart(create(test).withName(null), adminAuthHeaders()));
|
||||
assertResponse(exception, BAD_REQUEST, "[name must not be null]");
|
||||
|
||||
exception = assertThrows(HttpResponseException.class, () ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user