app-generator / devtool-django-api-generator

Django API Generator - Open-Source Tool for Developers | AppSeed
https://appseed.us/developer-tools/django-api-generator/
Other
12 stars 0 forks source link

API Generator SPECS #2

Closed app-generator closed 1 year ago

app-generator commented 2 years ago
app-generator commented 2 years ago

Hello @Mortrest

I just added detailled requirements. Let me know if something is not clear.

Ty

Mortrest commented 2 years ago

Hello

  1. What is the difference between this project and Django Dynamic API project?
  2. Get, Edit, Delete and Get processes do by Postman?
app-generator commented 2 years ago

In this project, the code should be generated based on the model types.

The drawback of the previous implementation is the runtime overload injected by the process. Being abstract, the app always scans the definition and applies the generic processing.

In this project, the serialization code should be specific to the model definition, like a hardcoded implementation tied to the models.

The abstract layer shouldn't be the solution.

So, the flow is this:

Let me know if something is missing.

Mortrest commented 2 years ago

Hello I implemented generating api (without authorization). but for authorization, you want to use django rest jwt?

app-generator commented 2 years ago

Hello @Mortrest

Ty for your work. Regarding the authorization, can you tell me what options we have?

For the Dyn API project I wrote a simple checker that decorates the API views. https://github.com/app-generator/priv-devtool-django-dynamic-api/blob/master/apps/helpers.py

Before choosing a solution, is important to keep in mind the use cases:

Let me know all possible solutions. Ty!

Mortrest commented 2 years ago

Django Rest Framework has an option to have 2 authentication methods (token-base and basic-authentication) together. It seams to be best solution.

Mortrest commented 2 years ago

There is a point in your saying about mutating requests. You said: ordinary users can mutate their own items superusers can mutate all items If we want this, we should force users to add a creator field to each model (foreign key to User). I think this forcing is not good. Do you have another opinion?

app-generator commented 2 years ago

Hello @Mortrest

Mutating requests

We can skip this constraint for the moment (no creator field) and keep the mutating operations the same for all auth users (superusers and ordinary users).

Being the first iteration of the module, without real users feedback, is a good idea to keep things as simple as possible.

DRF Auth layer

I'm ok to use the dual auth layer for DRF, but we need to document both cases in the README file.

Also, a sample for the basic auth should be coded in the main dashboard.

Ty @Mortrest

Mortrest commented 2 years ago

Hello Implementation Almost over. I added some description to README.md to describe how can work with app. Please take a look.

app-generator commented 2 years ago

Ty @Mortrest I will validate soon the feature. 🚀🚀

app-generator commented 2 years ago

P.S. @Mortrest please take a look at #4 ty

app-generator commented 2 years ago

Hello @Mortrest

Development moved to: https://github.com/app-generator/django-soft-ui-dashboard

app-generator commented 1 year ago

Validated & Closed.