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

[VIRTS-2887] Update Swagger Docs #2324

Merged
merged 13 commits into from
Oct 27, 2021

Conversation

bleepbop
Copy link
Contributor

@bleepbop bleepbop commented Oct 18, 2021

Description

Updated swagger docs for several APIs. Some objects only require certain schema fields, so the aiohttp request schemas have been updated to show this. aiohttp_apispec issues a warning when the exclude/include parameters are added to the request schema, however this has no side effect on the actual API functionality, so those warnings have been silenced in server.py. Lastly, some schemas do not allow for excluding/including certain fields (the adjustments field in the Source schema, to be specific), so APIs relying on said schemas will have summaries indicating fields that can be excluded/included.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Verified request schemas work with Pytest.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • [NA] I have added tests that prove my fix is effective or that my feature works

@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #2324 (3428114) into master (cc8d071) will decrease coverage by 0.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2324      +/-   ##
==========================================
- Coverage   72.62%   72.60%   -0.02%     
==========================================
  Files         110      110              
  Lines        7942     7944       +2     
==========================================
  Hits         5768     5768              
- Misses       2174     2176       +2     
Impacted Files Coverage Δ
server.py 0.00% <0.00%> (ø)
app/api/v2/handlers/ability_api.py 96.22% <100.00%> (ø)
app/api/v2/handlers/adversary_api.py 96.49% <100.00%> (ø)
app/api/v2/handlers/agent_api.py 97.01% <100.00%> (ø)
app/api/v2/handlers/fact_source_api.py 96.22% <100.00%> (ø)
app/api/v2/handlers/objective_api.py 100.00% <100.00%> (ø)
app/api/v2/handlers/operation_api.py 98.70% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc8d071...3428114. Read the comment docs.

@bleepbop bleepbop enabled auto-merge (squash) October 18, 2021 15:59
@bleepbop bleepbop requested review from uruwhy and wbooth October 18, 2021 16:52
@bleepbop bleepbop requested a review from uruwhy October 22, 2021 17:07
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bleepbop bleepbop merged commit 2aea586 into master Oct 27, 2021
@bleepbop bleepbop deleted the bleepbop/VIRTS-2887/update-swagger-docs branch October 27, 2021 16:39
cyber-arsenull pushed a commit that referenced this pull request Dec 28, 2021
* update required schemas for all endpoints but operations

* adjust operation update schemas

* Update operation request schemas

* silence marshmallow warnings

* add summary to objects with nested sources

* silence unnecessary aiohttp apispec warnings in test server
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.

3 participants