info:
  description: |
    API for calculating the least common multiple of two numbers.

    **Authentication Options**:
    - Recommended: Bearer token via `Authorization` header.
    - Fallback (GET): `token` query parameter.
    - Fallback (POST): `apiKey` in JSON body.
  title: LCM Calculator API
  version: 1.1.0
openapi: 3.0.0
paths:
  /api/v1/lcm-calculator:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                apiKey:
                  type: string
                number1:
                  type: integer
                number2:
                  type: integer
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  lcm:
                    type: integer
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Calculate the least common multiple of two numbers.
    get:
      parameters:
        - in: query
          name: number1
          schema:
            type: integer
          required: true
          description: The first number.
        - in: query
          name: number2
          schema:
            type: integer
          required: true
          description: The second number.
        - in: query
          name: token
          schema:
            type: string
          required: false
          description: Fallback authentication token.
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  lcm:
                    type: integer
                type: object
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Too many requests
      summary: Calculate the least common multiple of two numbers.

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

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