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

Add new json input type that should be used for service properties #317

Merged
4 commits merged into from
Dec 7, 2023

Conversation

rocktavious
Copy link
Collaborator

@rocktavious rocktavious commented Dec 2, 2023

Changelog

  • List your changes here
  • Make a changie entry

Tophatting

See the test assertions in TestNewJSON to show how it takes in different types like, bool, number, array and maps and property marshals them to string data that will get passed to our API. We could just use a string and force the customer to use json.Marshal themselves but we don't for 3 reasons

  • ease of use
  • we need to name the type JsonString in the mutation - see the TestConstructQueryJSON and TestConstructMutationJSON
  • we need to have a way to convert it back to a more concrete type

@rocktavious rocktavious requested review from davidbloss and a user December 2, 2023 00:33
Copy link

codecov bot commented Dec 2, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (d1630db) 76.75% compared to head (48a3591) 76.70%.

❗ Current head 48a3591 differs from pull request most recent head 0e8a0e9. Consider uploading reports for the commit 0e8a0e9 to get more accurate results

Files Patch % Lines
json.go 63.63% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   76.75%   76.70%   -0.05%     
==========================================
  Files          50       50              
  Lines        3308     3319      +11     
==========================================
+ Hits         2539     2546       +7     
- Misses        565      567       +2     
- Partials      204      206       +2     

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

@ghost ghost mentioned this pull request Dec 4, 2023
2 tasks
@ghost ghost mentioned this pull request Dec 7, 2023
4 tasks
@ghost ghost merged commit 478ed1e into main Dec 7, 2023
3 checks passed
@ghost ghost deleted the kr/json-input branch December 7, 2023 20:40
davidbloss pushed a commit that referenced this pull request Dec 14, 2023
)

* Add new json input type that should be used for service properties

* add unmarshal as type

* add type methods for better interface

* fix linting
This pull request was closed.
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.

1 participant