Skip to content

Conversation

Silvanoc
Copy link
Contributor

@Silvanoc Silvanoc commented Oct 25, 2024

Serialization of PermissibleValue(text='value') should be 'value', instead it is PermissibleValue({"text": 'value'}). This patch fixes it.

Fixes linkml/linkml#2382

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.44%. Comparing base (1b5e9f7) to head (0f32701).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #346   +/-   ##
=======================================
  Coverage   63.43%   63.44%           
=======================================
  Files          63       63           
  Lines        8982     8984    +2     
  Branches     2574     2574           
=======================================
+ Hits         5698     5700    +2     
  Misses       2665     2665           
  Partials      619      619           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Silvanoc
Copy link
Contributor Author

It is a bit concerning that this patch is not breaking any tests... So apparently no tests are validating the serialization of PermissibleValue instances 😮

Serialization of `PermissibleValue(text='value')` should be `'value'`,
instead it is `PermissibleValue({"text": 'value'})`. This patch fixes
it.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
Serialization of PermissibleValues was not being tested until now. This
commit improves that coverage.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
@Silvanoc
Copy link
Contributor Author

This code is generated, so merging this does not make any sense. Therefore closing it. The generator will have to be fixed.

@Silvanoc Silvanoc closed this Oct 25, 2024
@amc-corey-cox amc-corey-cox deleted the fix-2382 branch October 20, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serialization of PermissibleValue is wrong

1 participant