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 endpoint for scanreport model description #37

Merged
merged 3 commits into from
Sep 23, 2020
Merged

Add endpoint for scanreport model description #37

merged 3 commits into from
Sep 23, 2020

Conversation

nichtsfrei
Copy link
Member

What:
Creates a new endpoints to get a markdown table of scanreport model description.

Why:

To have an easy way to include the data description within a confluence page.

How:

curl -H 'accept: text/markdown+table' localhost:8000/scanreport/data/description

Checklist:

@nichtsfrei nichtsfrei requested a review from a team as a code owner September 22, 2020 10:50
@y0urself y0urself merged commit da0a122 into greenbone:master Sep 23, 2020

def __as_md(self, previous_key, data):
def append(value):
return isinstance(value, str) or isinstance(value, int)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have been

return isinstance(value, (str, int))

@@ -34,6 +34,7 @@ pytest-django = "^3.9.0"
weasyprint = "^51"
matplotlib = "^3.3.1"
pandas = "^1.1.2"
rope = "^0.17.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is rope a direct dependency now or should it still be a dev dependency?

@@ -135,3 +135,163 @@ class Report:
vulnerability_overview: VulnerabilityOverview
host_overviews: List[HostOverview]
results: Results


def descripe():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is a typo and the function should be named describe?

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.

None yet

3 participants