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 list to validate response #156

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Add list to validate response #156

merged 1 commit into from
Dec 4, 2024

Conversation

TOUFIKIzakarya
Copy link
Contributor

This PR focuses on adding list types into the validation response.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.76%. Comparing base (e156e6b) to head (2fb3e92).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
sekoia_automation/action.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #156      +/-   ##
==========================================
- Coverage   90.81%   90.76%   -0.06%     
==========================================
  Files          35       35              
  Lines        2492     2500       +8     
==========================================
+ Hits         2263     2269       +6     
- Misses        229      231       +2     

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

Copy link

github-actions bot commented Dec 3, 2024

Test Results

222 tests  +1   221 ✅ +1   1m 46s ⏱️ +2s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2fb3e92. ± Comparison against base commit e156e6b.

@Darkheir
Copy link
Collaborator

Darkheir commented Dec 3, 2024

In which use case would we need to return a list instead of an object ?

In actions the results are described as a json schema with the type object to allow defining several sub-attributes.

@TOUFIKIzakarya
Copy link
Contributor Author

In many cases the APIs response are an array of many objects, so instead of return it directly we are forced to put it in a object.
An example of that : Microsoft AD search action

@Darkheir Darkheir merged commit 378ba07 into main Dec 4, 2024
8 of 9 checks passed
@Darkheir Darkheir deleted the Add/list_support branch December 4, 2024 08:45
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.

2 participants