info:
  description: |
    API for generating a Fibonacci sequence.

    **Authentication Options**:
    - Recommended: Bearer token via `Authorization` header.
    - Fallback (GET): `token` query parameter.
    - Fallback (POST): `apiKey` in JSON body.
  title: Fibonacci Sequence Generator API
  version: 1.1.0
openapi: 3.0.0
paths:
  /api/v1/fibonacci-sequence-generator:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                apiKey:
                  type: string
                length:
                  type: integer
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  sequence:
                    items:
                      type: integer
                    type: array
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Generate a Fibonacci sequence.
    get:
      parameters:
        - in: query
          name: length
          schema:
            type: integer
          required: true
          description: The desired length of the Fibonacci sequence.
        - in: query
          name: token
          schema:
            type: string
          required: false
          description: Fallback authentication token.
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  sequence:
                    items:
                      type: integer
                    type: array
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Generate a Fibonacci sequence.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

security:
  - bearerAuth: []  # Global security, but overridden per-path
servers:
- url: https://infinitode.netlify.app
