openapi: "3.0.0"
info:
  title: Photo Catalog API
  version: "1.0.0"
  description: Simple photo catalog for MCP Bridge workshop

paths:
  /photos:
    get:
      operationId: listPhotos
      summary: List all photos
      description: Returns a paginated list of photos in the catalog.
      parameters:
        - name: album
          in: query
          required: false
          schema:
            type: string
          description: Filter photos by album
        - name: id
          in: query
          required: false
          schema:
            type: integer
            default: 20
          description: Filter photos by id
      responses:
        "200":
          description: A list of photos
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Photo"

  /photos/{id}:
    get:
      operationId: getPhoto
      summary: Get a photo by ID
      description: Returns the full details of a single photo.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The photo's unique identifier
      responses:
        "200":
          description: Photo details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Photo"
        "404":
          description: Photo not found

components:
  schemas:
    Photo:
      type: object
      properties:
        id:
          type: string
        albumId:
          type: string
        title:
          type: string
        url:
          type: number
        thumbnailUrl:
          type: string