Skip to content

[IMP] Energy Communities API Base Structure

Dani Quilez requested to merge feature/IMP_profile_endpoint into dev

This MR defines the basic structure for the API on energy_communities. Next endpoints will be based on the ones introduced here.

  • Migrated from FastAPI strategy to BaseRest
  • Testing strategy defined and working
  • Introducing components to obtain all necessary API Info
  • Input and output validation using Pydantic
  • Model mapping using Pydantic
  • Fixed demo data (after the fix it broke again)
  • Introduced correct user_id and company_id on context
  • API-KEY and JWT authentication available
  • Exceptions returned as json (instead html)
  • Review of ACL and record rules in order to be compatible with the API
  • Introducing new API provider Role in order to restrict external users to model data
  • /energy-communities/me and /energy-communities/me/communities endpoints available
  • /energy-selfconsumption/projects and /energy-selfconsumption/projects/<project_code> and /energy-selfconsumption/projects/<project_code>/members available

Impacted tasks:

  • OP#138
  • OP#312
  • OP#318
  • OP#385
Edited by Juan Pedro Sánchez

Merge request reports

Loading