info:
  description: |
    API for solving quadratic equations.

    **Authentication Options**:
    - Recommended: Bearer token via `Authorization` header.
    - Fallback (GET): `token` query parameter.
    - Fallback (POST): `apiKey` in JSON body.
  title: Quadratic Equation Solver API
  version: 1.1.0
openapi: 3.0.0
paths:
  /api/v1/quadratic-equation-solver:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                a:
                  type: number
                apiKey:
                  type: string
                b:
                  type: number
                c:
                  type: number
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  roots:
                    items:
                      type: number
                    type: array
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Solve a quadratic equation.
    get:
      parameters:
        - in: query
          name: a
          schema:
            type: number
          required: true
        - in: query
          name: b
          schema:
            type: number
          required: true
        - in: query
          name: c
          schema:
            type: number
          required: true
        - in: query
          name: token
          schema:
            type: string
          required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  roots:
                    items:
                      type: number
                    type: array
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Solve a quadratic equation.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

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