Browse Source

Minor doc improvement

pull/6953/head
Andrii Shvaika 4 years ago
parent
commit
87527f0027
  1. 4
      application/src/main/java/org/thingsboard/server/controller/AssetController.java
  2. 3
      common/data/src/main/java/org/thingsboard/server/common/data/asset/Asset.java

4
application/src/main/java/org/thingsboard/server/controller/AssetController.java

@ -139,7 +139,9 @@ public class AssetController extends BaseController {
notes = "Creates or Updates the Asset. When creating asset, platform generates Asset Id as " + UUID_WIKI_LINK +
"The newly created Asset id will be present in the response. " +
"Specify existing Asset id to update the asset. " +
"Referencing non-existing Asset Id will cause 'Not Found' error." + TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH, produces = MediaType.APPLICATION_JSON_VALUE)
"Referencing non-existing Asset Id will cause 'Not Found' error. " +
"Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. "
+ TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH, produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAnyAuthority('TENANT_ADMIN', 'CUSTOMER_USER')")
@RequestMapping(value = "/asset", method = RequestMethod.POST)
@ResponseBody

3
common/data/src/main/java/org/thingsboard/server/common/data/asset/Asset.java

@ -52,6 +52,7 @@ public class Asset extends SearchTextBasedWithAdditionalInfo<AssetId> implements
@Length(fieldName = "label")
private String label;
@ApiModelProperty(position = 100, value = "JSON object with External Id from the VCS", accessMode = ApiModelProperty.AccessMode.READ_ONLY, hidden = true)
@Getter @Setter
private AssetId externalId;
@ -98,7 +99,7 @@ public class Asset extends SearchTextBasedWithAdditionalInfo<AssetId> implements
return super.getCreatedTime();
}
@ApiModelProperty(position = 3, value = "JSON object with Tenant Id.", readOnly = true)
@ApiModelProperty(position = 3, value = "JSON object with Tenant Id.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public TenantId getTenantId() {
return tenantId;
}

Loading…
Cancel
Save