Week #3 Upgrading Guillotina_swagger

karannaoh
Published: 06/16/2019

Last week- Finished up adding authentication to Guillotina_swagger and updating security schemes for OpenAPI 3.

This Week :- 

Issue: Authenticating the request send to baseurl.

This Week:-

Request send to baseurl needs to be authenticated in order to generate proper path object for swaggerUI. SwaggerUI provides `configs` in which authentication token can be added manually to every request sent.

Solution:- When a person tries to login, a new instance of swaggerUI object is created with the auth token in `configs`. github

Problem in this solution:- New event is added to login button which is kind of a hacky way to fix things up, other than that logout button also requires a similar event handler to delete authentication token.

Other than this guillotina_swagger is completely upgraded to OpenAPI 3.

Next Week:-

Requests coming to the Api are not being validated, second task is to provide validation to the payloads of all the request hitting the API. JSON schema is already defined for most of the endpoints just adding the validation is required. Will be adding validation to all the endpoint and jsonschema for those where schema doesn't exist. 

Stuck Somewhere:-

Still, the authentication of guillotina_swagger is working on a small hack and logout need to be fixed which needs to be fixed.

DJDT

Versions

Time

Settings from gsoc.settings

Headers

Request

SQL queries from 1 connection

Static files (2312 found, 3 used)

Templates (11 rendered)

Cache calls from 1 backend

Signals

Log messages