Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(permissiblevalue): serialization #346

Closed
wants to merge 2 commits into from
Closed

fix(permissiblevalue): serialization #346

wants to merge 2 commits into from

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 <[email protected]>
Serialization of PermissibleValues was not being tested until now. This
commit improves that coverage.

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
@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
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