Skip to content

Commit

Permalink
docs: ✏️ Update swagger examples to display asset IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantasdeveloper committed Nov 26, 2024
1 parent 5ccb402 commit 89f96d0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/accounts/models/asset-permissions.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class AssetPermissionsModel extends PermissionTypeModel {
description: 'List of included/excluded Assets',
type: 'string',
isArray: true,
example: ['TICKER123456'],
example: ['3616b82e-8e10-80ae-dc95-2ea28b9db8b3'],
})
readonly values: string[];

Expand Down
2 changes: 1 addition & 1 deletion src/claims/decorators/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function IsValidScopeValue(property: string, validationOptions?: Validati
const scopeType = (args.object as any)[scopeTypeField];
switch (scopeType) {
case ScopeType.Asset:
return 'value must be a valid Asset ID either in hex or UUID format';
return 'value must be a valid Asset ID (either in hex or UUID format) or a valid ticker (all uppercase and no longer than 12 characters)';
case ScopeType.Ticker:
return `value must be all uppercase and no longer than 12 characters for type: ${scopeType}`;
case ScopeType.Identity:
Expand Down
8 changes: 4 additions & 4 deletions src/compliance/dto/set-requirements.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export class SetRequirementsDto extends TransactionBaseDto {
{
type: 'Jurisdiction',
scope: {
type: 'Ticker',
value: 'TICKER',
type: 'Asset',
value: '3616b82e-8e10-80ae-dc95-2ea28b9db8b3',
},
code: CountryCode.Us,
},
Expand All @@ -51,8 +51,8 @@ export class SetRequirementsDto extends TransactionBaseDto {
claim: {
type: 'Accredited',
scope: {
type: 'Ticker',
value: 'TICKER',
type: 'Asset',
value: '3616b82e-8e10-80ae-dc95-2ea28b9db8b3',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/identities/dto/asset-permissions.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class AssetPermissionsDto extends PermissionTypeDto {
description: 'List of assets to be included or excluded in the permissions',
type: 'string',
isArray: true,
example: ['TICKER123456'],
example: ['3616b82e-8e10-80ae-dc95-2ea28b9db8b3'],
})
@IsArray()
@IsAsset({ each: true })
Expand Down
2 changes: 1 addition & 1 deletion src/portfolios/dto/portfolio-movement.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { IsAsset, IsBigNumber } from '~/common/decorators/validation';
export class PortfolioMovementDto {
@ApiProperty({
description: 'Asset to move',
example: 'TICKER',
example: '3616b82e-8e10-80ae-dc95-2ea28b9db8b3',
})
@IsAsset()
readonly asset: string;
Expand Down
2 changes: 1 addition & 1 deletion src/settlements/dto/leg-validation-params.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class LegValidationParamsDto {
@ApiProperty({
description: 'The Asset (Asset ID/Ticker) to be transferred',
type: 'string',
example: '0x12345678',
example: '3616b82e-8e10-80ae-dc95-2ea28b9db8b3',
})
@IsAsset()
readonly asset: string;
Expand Down

0 comments on commit 89f96d0

Please sign in to comment.