-
Notifications
You must be signed in to change notification settings - Fork 79
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
[Proposal] Use swagger-codegen to generate wrapper api #37
Comments
I think it's a great idea, but haven't looked yet into the details if it supports all operations. Not sure if everything is in the swagger spec. I remember when browsing the swagger docs on defect dojo some api features are not there. |
Indeed, but I downloaded with curl using token in headers, so I got details that was not available with the browser
|
If the swagger is well configured in django-DefectDojo/dojo/api_v2/views.py I think it will not be a problem. I saw some methods(@action) in ViewSet without swagger_auto_schema, so there are responses and request_bodys wrong. |
Hi @valentijnscholten I fixed here DefectDojo/django-DefectDojo#2488 |
I created a similar project a while ago: https://github.com/alles-klar/defectdojo-api-v2-client. Generally it works fine but there are some bugs in the defectdojo swagger documentation. So for a stable api client we need to write a lot of tests. @edersonbrilhante do you have an idea how to automatically generate tests? |
@alles-klar My PR fixing some bugs defectdojo swagger documentation was merged to dev. |
Description
I am using [swagger-codegen] (https://github.com/swagger-api/swagger-codegen) to generate a better mirror of defectdojo API.
This way it is not needed to add manually new paths, actions, payload, etc It is needed just to run swagger-codegen using the latest version of swagger file provided by defectdojo in
/api/v2/doc/?format=openapi
Example
Here is my project running with this purpose https://github.com/William-Hill-Online/defectdojo-api-swagger
The text was updated successfully, but these errors were encountered: