Questions tagged [django-swagger]

39 questions
1
vote
1 answer

Customize the Django Swagger Framework

I'm looking for how to make a GET in django swagger framework by refClient (a unique CharField in my client's model). I found on the internet that I have to customize the routers, I have that as routers : from rest_framework.schemas import…
Naella
  • 425
  • 2
  • 6
  • 17
1
vote
0 answers

What is the equivalent of `paramType: form` in the Core API of DJango Rest Swagger 2?

In the old django rest swagger, you can specify paramType: form in the docstring of the viewset and retrieve the parameter via request.data['param_x'], as follows: class FooViewSet(viewsets.ViewSet): """ Make something cool --- parameters: …
Melvic Ybanez
  • 1,893
  • 4
  • 19
  • 26
0
votes
2 answers

How to include Oauth2 auth urls in Swagger?

I use Django drf-spectacular OAuth Toolkit for an Oauth2 password flow. Unfortunately, Swagger doesn't recognize the auth URLs. This is my urls.py urlpatterns = [ # schema path("api/schema/", SpectacularAPIView.as_view(api_version='v1'),…
0
votes
1 answer

Django Swagger Schema: Object of type Boolean is not JSON serializable

I am working on a custom schema and got an error saying Object of type Boolean is not JSON serializable on the Swagger documentation page. import coreapi import coreschema from rest_framework.schemas import AutoSchema class…
Sara
  • 69
  • 2
  • 9
0
votes
2 answers

Django JWT authentication does not load all the protected urls

When i login using my api in the swagger and fill in the information in the Authorize button pop up, my api list which is protected still does not appear. I tried adding it as 'Bearer token', but it do not work. Following is my…
Sandhu
  • 348
  • 5
  • 23
0
votes
1 answer

Swagger navigation like https://petstore.swagger.io/#/pet doesn't work in my projects

All the Swagger apps I've seen have navigation between endpoints-related blocks like this: https://petstore.swagger.io/#/store/getInventory When you click on certain blocks the URL changes. Can't understand what I'm doing wrong, but I have nothing…
ElRey777
  • 191
  • 1
  • 12
0
votes
1 answer

Django REST Swagger: List and Retrieve functions are not detected by Swagger

I'm using django-rest-swagger version: 2.0.5 and django-rest-framework version: 3.4.6. I realiased that when I use list or retrieve functions the Swagger can not detect them as new endpoints. I have the following code in my views.py file: from…
0
votes
1 answer

django DJA with swagger setting content-type

I want to use the JSON API format for our API and django-rest-framework-json-api seems to work perfectly for that. However, I also use swagger. Now DJA follows content-negotiation-clients Loading the swagger docs goes fine however when I want to…
Hans de Jong
  • 2,030
  • 6
  • 35
  • 55
0
votes
1 answer

How to integrate swagger-ui template with DRF and Django-Rest-framwork-Swagger?

I am using Django & DRF to write REST APIs. Recently I integrated django-rest-framework-swagger to automatically populate the API docs. Today, I came across swagger-ui template [https://github.com/jensoleg/swagger-ui] and now want to replace default…
Jadav Bheda
  • 5,031
  • 1
  • 30
  • 28
1 2
3