sphinx-contrib / sphinx-contrib/openapi

OpenAPI v3 cookie parameters not rendered

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
126
Forks
88
PR merge metrics
No merged PRs in 30d

Description

I know I'm old-school using cookies. However, I still want to document their use. If I render the following v3 yaml file, no cookie parameter is rendered:

openapi: 3.0.3
info:
  title: Title - OpenAPI 3.0
  description: |-
    Description.
  version: 0.0.1
paths:
  /cat:
    get:
      summary: summary
      description: |
        Description
      parameters:
        - name: COOKIENAME
          in: cookie
          description: Description
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Cat'
components:
  schemas:
    Cat:
      type: object    
      properties:
        name:
          type: string
          description: name
          example: Simba

If I change parameter type from cookie to path it works. In the swagger editor it renders fine.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by rendering the OpenAPI v3 YAML in the issue and compare the missing cookie parameter with the same parameter changed to path. Trace the parameter-rendering path for these two cases; done means the COOKIENAME cookie parameter appears in the generated documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.