Django DRF Project | API Documentation with Swagger UI | 18

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 31

  • @54gulnara
    @54gulnara Год назад +1

    I have started Swagger successfully with it. Thank you, very useful.

  • @Жижа-т9з
    @Жижа-т9з Год назад +2

    Спасибо вам, дай бог вам здоровья!

    • @BRooBooot
      @BRooBooot Год назад

      Согласен, парень молодец, всё доходчиво объяснил и показал

  • @codewithray
    @codewithray Год назад +1

    Fantastic as always 🙌

  • @mattm7482
    @mattm7482 Год назад +3

    Please help me with this simple but impassable difficulty: How do I generate the schema publicly for APIs that even have permission enforced? Thanks.

    • @veryacademy
      @veryacademy  Год назад

      Hi Matt, can you explain further please.

    • @mattm7482
      @mattm7482 Год назад +2

      Thanks for getting back to me so soon! Since all my API's have set an Admin only permission, I had to pass 'public=True' to the Schema creation function for them to show up. Hope that can help out someone stuck with this.

  • @ahmedsalman8350
    @ahmedsalman8350 Год назад

    Very Useful...👍

  • @XeUs87
    @XeUs87 2 года назад +1

    Hi Xander. You are doing a fantastic job with Django. Thank you for your effort. I'm still waiting for your django celery course. When can we expect it? Celery is a must for a django developer to get a job.

    • @veryacademy
      @veryacademy  2 года назад +1

      Thank you. I am drawing out a course path for Celery. In all honesty, I keep swapping around my workload. It is moving forward. It is definitely, like you said, an important topic which needs more attention. I can't give you an eta at the moment.

  • @techmeworld
    @techmeworld Год назад

    Nice tutorial. Thanks

  • @GARUDA1992152
    @GARUDA1992152 Год назад

    Hi.. great content.. how can we add authentication to access the api docs if I am using djoser for authentication of the project? Maybe some Login page for using username and password to redirect to api docs?

  • @dotnuel
    @dotnuel Год назад

    im getting this error:
    assert False, f'ReadOnlyField target "{field}" must be property or model field'
    AssertionError: ReadOnlyField target "ReadOnlyField()" must be property or model field,ive searched high and low for a solution its not anywhere

  • @djangodeveloper07
    @djangodeveloper07 2 года назад +1

    Hi great tutorial like always, can we do some tasks in swagger ? like hide schema, and add custom help text for each api so user could know more about api, and we can show some common error status code so they know what kind of responses they are going to get using specific api.
    if we can't modify it too much, which way is more appropriate to build custom api docs with swagger functionalities

    • @veryacademy
      @veryacademy  2 года назад +1

      There is much that can be done with Swagger in terms of customization, a course in itself. First, take a look at docstring, stackoverflow.com/questions/3898572/what-are-the-most-common-python-docstring-formats. Google format can be popular approach. This info would then be added to the endpoints.

    • @djangodeveloper07
      @djangodeveloper07 2 года назад

      @@veryacademy checked, thank you for sharing. looking for more videos on it from you.

    • @rishabhsharma667
      @rishabhsharma667 Год назад +1

      @@veryacademy I need a course sir

  • @serhii-666
    @serhii-666 Год назад

    How do you decouple those sensitive endpoints from the rest of the project when pulling this code to prod? It would be great to NOT have all this in the same project, but rather keep API docs separate, otherwise it's a huge security breach when this API is not public and you need Swagger only for testing purposes, e.g. while doing initial manual QA. After manual QA this code should not be part of the project, therefore it's better for it not being the part of the project from the beginning.

    • @Zeeno
      @Zeeno 8 месяцев назад

      You can control that at the gateway level. You could also require username and password to access specific routes

  • @sebastianignaciorebolledoa7261

    Hi, I've done this process several time and today I did for a personal project but the API doesn't display the methods according to his own Model but instead show all the methods under the name of "api", what could I have done wrong?

    • @prathameshh27
      @prathameshh27 Год назад

      I am seeing the same problem. Did you find a solution to this?

    • @h0merr_531
      @h0merr_531 Год назад

      @@prathameshh27hey there! I actually did but it wasn’t because I found some sort of guidance in DRF, I just separated the URLs that I had for the api, I didn’t put API at the beginning of the url but the class/ anything that can classify what you need to. For example, a full display of API for toys I made the toys/create toys/update and other poll/create poll/update you understand what I mean?

  • @jatinsingh9454
    @jatinsingh9454 2 года назад

    hey make a video on django deployment in vps plz ?.

  • @АртемБеляков-к7з

    Is there a link to the project github?

  • @drmalex87
    @drmalex87 Год назад +1

    Why are we not using `django-rest-swagger`?

  • @Hetsko1
    @Hetsko1 Год назад +1

    Thank you

  • @sandeepmishra1390
    @sandeepmishra1390 2 года назад +1

    Teach how to make restapi on django .and how to apply on project in company

    • @veryacademy
      @veryacademy  2 года назад

      Thank you for the suggestion.