Skip to content

API truncates dictionary version number in /dictionary/register endpointย #110

@Azher2Ali

Description

@Azher2Ali

Description:

When registering a new dictionary using the /dictionary/register endpoint in the Swagger UI, the dictionaryVersion value entered with a decimal (e.g., 1.0) is being truncated to an integer (1) in the request payload.

This issue has been observed on the clinical submission environment:
๐Ÿ”— https://submission.pcgl-dev.cumulus.genomeinformatics.org/api-docs/#/Dictionary/post_dictionary_register

Cause:
Swagger will always remove trailing 0 from numbers. So 1.10 will be come 1.1
1.0 will become 1.

Workaround:
Use Curl or post man for regisering versions that end with 0.

Steps to Reproduce:

  1. Navigate to the Swagger UI endpoint /dictionary/register.
  2. Enter the following values:
  • studyId: TEST-123
  • categoryName: default_pcgl_schema
  • dictionaryName: default_pcgl_schema
  • dictionaryVersion: 1.0
  • defaultCentricEntity: participant
  1. Click Execute.
  2. Check the cURL command generated or the payload sent
Image

โ€” note that dictionaryVersion becomes 1 instead of 1.0.

Expected Behavior:

dictionaryVersion should retain the exact value entered (1.0) without truncation.

Actual Behavior:

dictionaryVersion is truncated to 1 in the final request payload.

Environment:

  • Environment: pcgl-dev.cumulus.genomeinformatics.org
  • Endpoint: /dictionary/register
  • Method: POST
  • UI: Swagger
  • Affected Service: Clinical Submission

Similar behaviour is noticed under Lyric and was reported by Mitchell in the following ticket - overture-stack/lyric#135

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions