swagger

drf_yasg @swagger_auto_schema not showing the required parameters for POST Request

drf_yasg @swagger_auto_schema not showing the required parameters for POST Request Question: I am using django-yasg to create an api documentation. But no parameters are showing in the documentation to create post request. Following are my codes: After that in swagger api, no parameters are showing for post request to create the event model.py class Events(models.Model): …

Total answers: 3

how can i change security name in django swagger specticuler?

how can i change security name in django swagger specticuler? Question: [enter image description here][1] please follow this image to clarify my issue [1]: https://i.stack.imgur.com/ah0fD.png how can i change security name like i got by default from Django swagger spectacular (jwtauth).i want to rename it so what i have to change in my settings.py file. …

Total answers: 1

How to document default None/null in OpenAPI/Swagger using FastAPI?

How to document default None/null in OpenAPI/Swagger using FastAPI? Question: Using a ORM, I want to do a POST request letting some fields with a null value, which will be translated in the database for the default value specified there. The problem is that OpenAPI (Swagger) docs, ignores the default None and still prompts a …

Total answers: 1

Insert local image in the FastAPI automatic documentation

Insert local image in the FastAPI automatic documentation Question: Introduction FastAPI can autogenerate your documentation when you are using FastAPI to create an API. I am trying to insert an image in the description (markdown) of one of my endpoints, but I can’t do it when the image is located in the local hardrive. I …

Total answers: 2

How to debug Fastapi openapi generation error

How to debug Fastapi openapi generation error Question: I spend some time going over this error but had no success. File "C:Usersebara.condaenvsascilibsite-packagesfastapiopenapiutils.py", line 388, in get_openapi flat_models=flat_models, model_name_map=model_name_map File "C:Usersebara.condaenvsascilibsite-packagesfastapiutils.py", line 28, in get_model_definitions model_name = model_name_map[model] KeyError: <class ‘pydantic.main.Body_login_access_token_api_v1_login_access_token_post’> The problem is that I’m trying to build a project with user authentication from OpenAPI …

Total answers: 2

FastAPI swagger don't use custom header

FastAPI swagger don't use custom header Question: I want to add "Authorization" header to the my FastAPI application. I did it by documentation, but when i try to execute request in the swagger – it doesn’t work(swagger don’t use custom header), i have "Missing Authorization Header" error Error in the swagger Asked By: Ilia || …

Total answers: 1

How can I create Swagger docs for dynamic Flask endpoints?

How can I create Swagger docs for dynamic FastAPI endpoints? Question: I have a list of endpoints like below. endpoints ["/endpoint1", "/endpoint2", "/endpoint3"] I would like to create dynamic endpoints in my app and create swagger API docs for all the endpoints, how can I do this. @app.route(<endpoint>): def process(): Asked By: Pyd || Source …

Total answers: 1

How to set the Bearer token in the Python API client generated by Swagger Codegen 3.x?

How to set the Bearer token in the Python API client generated by Swagger Codegen 3.x? Question: I’ve generated a Python client library for this API by using the online Swagger Codegen at https://generator.swagger.io/. The API uses Bearer authentication: openapi: 3.0.0 … paths: /sandbox/register: post: … security: – sso_auth: [] … components: securitySchemes: sso_auth: type: …

Total answers: 2