Skip to content
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

Add REST API #2

Closed
12 tasks done
sveetch opened this issue Mar 29, 2021 · 6 comments
Closed
12 tasks done

Add REST API #2

sveetch opened this issue Mar 29, 2021 · 6 comments
Labels
API New feature New feature or request

Comments

@sveetch
Copy link
Member

sveetch commented Mar 29, 2021

This should be optional, enabled only when DRF is available. Add an extra requirement "api" to install DRF.

We aim for a read only API first. The write capacity may come in a future another issue.

This will need:

  • Article Serializers;
  • Category Serializers;
  • Author Serializers;
  • Article Viewsets;
  • Category Viewsets;
  • Author Viewsets
  • Pagination enabled;
  • Queryset have to respect the publication criterias and language;
  • API URLs have to live in their own map apart so it can be mounted outside Lotus views path;
  • API must be optional depending drf is installed or not (a new extra dependancies);
  • Tests depending drf is installed or not, so we can check with/without it through a Tox environment;
  • Look for possible resumed object payload in list and a more complete one from detail;
@sveetch sveetch added the Enhancement Feature enhancement label Mar 29, 2021
@sveetch
Copy link
Member Author

sveetch commented Jul 4, 2022

At least to start a read only API although i can be a little risky to structure API code around read only, since write operations may sometime requires some changes.

@sveetch sveetch changed the title Add API Add REST API Jan 12, 2023
@sveetch
Copy link
Member Author

sveetch commented Jun 11, 2023

Also there is https://github.com/tfranzel/drf-spectacular which bring OpenAPI schema in more modern way that Swagger

@sveetch
Copy link
Member Author

sveetch commented Jun 14, 2023

Detail payload may at least include related object listing like the views.

@sveetch
Copy link
Member Author

sveetch commented Jun 14, 2023

It has been started in branch https://github.com/emencia/django-blog-lotus/tree/try_drf_addition, it's pretty basic, properly working and without test yet

@sveetch sveetch linked a pull request Jul 28, 2023 that will close this issue
7 tasks
@sveetch sveetch added New feature New feature or request API and removed Enhancement Feature enhancement labels Aug 7, 2023
@sveetch
Copy link
Member Author

sveetch commented Aug 8, 2023

Finally after review for django-filter, currently i don't see any worth value to implement it for now. We will wait for a real use case in future after the first API release but removing it from todo list for now.

@sveetch
Copy link
Member Author

sveetch commented Oct 9, 2023

Temporary branch for API beta is finished and delivered into v0.7.0 branch https://github.com/emencia/django-blog-lotus/tree/v0.7.0 to continue

@sveetch sveetch closed this as completed Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API New feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant