Skip to content

Make csrf=True add X-CSRFToken header parameters to OpenAPI spec #1192

@jlost

Description

@jlost

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions