Closed jonas-rem closed 4 months ago
This PR also adds an automatic ReST API documentation, based on redoc and OpenAPI v3 to the Sphinx documentation. The information is directly generated from the validation code in the Django Rest Framework Serializer. That way it makes sure that documentation and implementation are always in sync.
@jonas-rem could you please explain the difference between simple and composite resources ?
I like the idea of automatically generating API Documentation. That seems to be a very good addition and would help us keep track of the APIs and the changes in them as well.
@jonas-rem what exactly do we mean by
Django has to be informed of the registration status of endpoints.
? Like is this only when a new client is added ? Because once we have a new client registered , then there will be only certain endpoints that we would need to monitor.
LwM2M maintains registrations of endpoints. As long as an endpoint updates its registration within the allowed time, the registration remains active. If the endpoint reports for an update too late, the endpoint will be deregistered from Leshan. It has to re-register as a consequence. The database should keep track of the past and current registration efforts and status. Therefore registrations, registration updates and deregistrations are send as a custom LwM2M Object.
I will merge this PR and update the documentation in a new PR.
~Status: WIP~
Django has to be informed of the registration status of endpoints. In Leshan there are callbacks that contain all relevant information such as 'lastUpdated', 'registered'. This information will be send to the matching Django ReST API.