Colour property in Mgmt API response for DS/SM type (#1174)

* Update name SP to hawkbit in api guide adocs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix javadoc class descriptions of existing resource/api classes

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to api response of ds/sw type

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to sw type test data & adapt rest docu

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add missing property description for "colour" and "deleted"

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review findings

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
This commit is contained in:
Natalia Kislicyn
2021-09-02 10:09:17 +02:00
committed by GitHub
parent 42b1fc9439
commit b5fcb48ab1
25 changed files with 176 additions and 119 deletions

View File

@@ -148,7 +148,7 @@ public abstract class JsonBuilder {
int i = 0;
for (final SoftwareModuleType module : types) {
builder.append(new JSONObject().put("name", module.getName()).put("description", module.getDescription())
.put("id", Long.MAX_VALUE).put("key", module.getKey())
.put("colour", module.getColour()).put("id", Long.MAX_VALUE).put("key", module.getKey())
.put("maxAssignments", module.getMaxAssignments()).put("createdAt", "0").put("updatedAt", "0")
.put("createdBy", "fghdfkjghdfkjh").put("updatedBy", "fghdfkjghdfkjh").toString());
@@ -171,7 +171,8 @@ public abstract class JsonBuilder {
int i = 0;
for (final SoftwareModuleType module : types) {
builder.append(new JSONObject().put("name", module.getName()).put("description", module.getDescription())
.put("key", module.getKey()).put("maxAssignments", module.getMaxAssignments()).toString());
.put("colour", module.getColour()).put("key", module.getKey())
.put("maxAssignments", module.getMaxAssignments()).toString());
if (++i < types.size()) {
builder.append(",");
@@ -298,9 +299,10 @@ public abstract class JsonBuilder {
});
result.put(new JSONObject().put("name", type.getName()).put("description", type.getDescription())
.put("id", Long.MAX_VALUE).put("key", type.getKey()).put("createdAt", "0").put("updatedAt", "0")
.put("createdBy", "fghdfkjghdfkjh").put("optionalmodules", osmTypes)
.put("mandatorymodules", msmTypes).put("updatedBy", "fghdfkjghdfkjh"));
.put("colour", type.getColour()).put("id", Long.MAX_VALUE).put("key", type.getKey())
.put("createdAt", "0").put("updatedAt", "0").put("createdBy", "fghdfkjghdfkjh")
.put("optionalmodules", osmTypes).put("mandatorymodules", msmTypes)
.put("updatedBy", "fghdfkjghdfkjh"));
}
@@ -330,7 +332,7 @@ public abstract class JsonBuilder {
});
result.put(new JSONObject().put("name", module.getName()).put("description", module.getDescription())
.put("key", module.getKey()).put("optionalmodules", osmTypes)
.put("colour", module.getColour()).put("key", module.getKey()).put("optionalmodules", osmTypes)
.put("mandatorymodules", msmTypes));
} catch (final JSONException e) {
e.printStackTrace();