Adding csrf=True does not currently add X-CSRFToken header parameters to the OpenAPI spec, but I think it should.
Ex:
api = NinjaAPI(auth=django_auth, csrf=True)
...
paths:
/ping:
get:
summary: Checks if the server is alive
parameters:
- in: header
name: X-CSRFToken
schema:
type: string
required: false