info:
  description: |
    API for calculating simple interest.

    **Authentication Options**:
    - Recommended: Bearer token via `Authorization` header.
    - Fallback (GET): `token` query parameter.
    - Fallback (POST): `apiKey` in JSON body.
  title: Simple Interest Calculator API
  version: 1.1.0
openapi: 3.0.0
paths:
  /api/v1/simple-interest-calculator:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                apiKey:
                  type: string
                principal:
                  type: number
                rate:
                  type: number
                time:
                  type: number
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  interest:
                    type: number
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Calculate simple interest.
    get:
      parameters:
        - in: query
          name: token
          schema:
            type: string
        - in: query
          name: principal
          schema:
            type: number
        - in: query
          name: rate
          schema:
            type: number
        - in: query
          name: time
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  interest:
                    type: number
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Calculate simple interest.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

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