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

APIv2 Serializer - sla_days_remaining in FindingSerializer should have_null set to True #10793

Open
jynolen opened this issue Aug 21, 2024 · 0 comments
Labels

Comments

@jynolen
Copy link

jynolen commented Aug 21, 2024

Be informative
I use OpenAPI spec to generate me a nice client without too much effort but the generated models (or the spec in Django) might be wrong

Bug description
I use https://openapi-generator.tech/ to generate me a Client + Models from Swgger Json "/api/v2/oa3/schema/?format=json"
So far all good.

However when I try to create report for engagment I got validation issues becasue some findings (Severity = INFO) have empty SLA, so null value for sla_days_remaining

so this line (https://github.com/DefectDojo/django-DefectDojo/blob/master/dojo/api_v2/serializers.py#L1656) should be patch

sla_days_remaining = serializers.IntegerField(read_only=True) to
sla_days_remaining = serializers.IntegerField(read_only=True, allow_null=True)

And/Or give the ability to set SLA for Info findings.

@jynolen jynolen added the bug label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant