openapi: 3.0.3
info:
  title: Growth Performance Public API
  version: 1.0.0
  description: |
    Public API for Growth Performance — a specialist UK leadership development consultancy.
    Provides structured access to articles, services, FAQs, and team information.
    Base URL: https://www.growthperformance.co.uk
  contact:
    name: Growth Performance
    email: hello@growthperformance.co.uk
    url: https://www.growthperformance.co.uk
  license:
    name: All Rights Reserved
    url: https://www.growthperformance.co.uk/privacy

servers:
  - url: https://www.growthperformance.co.uk
    description: Production

paths:
  /api/articles/list:
    get:
      operationId: listArticles
      summary: List all thought leadership articles
      description: |
        Returns metadata for all thought leadership articles. Full article content
        is available via /api/articles/{slug}. Optionally filter by category.
      parameters:
        - name: category
          in: query
          required: false
          description: Filter by article category
          schema:
            type: string
            enum:
              - Mindset Readiness
              - Human Capability Development
              - Organisational Performance
              - AI + Leadership
      responses:
        '200':
          description: Array of article summaries
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ArticleSummary'

  /api/articles/{slug}:
    get:
      operationId: getArticle
      summary: Get a single article with full content
      parameters:
        - name: slug
          in: path
          required: true
          description: The URL slug of the article
          schema:
            type: string
      responses:
        '200':
          description: Full article including content body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Article'
        '404':
          description: Article not found

  /api/services:
    get:
      operationId: listServices
      summary: List all leadership development services
      description: Returns structured information about Growth Performance's service offerings.
      responses:
        '200':
          description: Array of services
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Service'

  /api/faqs:
    get:
      operationId: listFaqs
      summary: Get frequently asked questions
      description: Returns common questions and answers about Growth Performance's services and approach.
      responses:
        '200':
          description: Array of FAQ items
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FAQ'

  /api/team:
    get:
      operationId: listTeam
      summary: Get associate team members
      description: Returns information about Growth Performance's associate network of coaches and facilitators.
      responses:
        '200':
          description: Array of team members
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TeamMember'

  /rss.xml:
    get:
      operationId: getRssFeed
      summary: RSS feed of thought leadership articles
      description: Returns an RSS 2.0 feed of all 113+ thought leadership articles with titles, descriptions, categories, authors, and publication dates.
      responses:
        '200':
          description: RSS XML feed
          content:
            application/rss+xml:
              schema:
                type: string

  /sitemap.xml:
    get:
      operationId: getSitemap
      summary: XML sitemap of all pages
      description: Returns an XML sitemap containing all 141 URLs including 28 static pages and 113+ article pages with lastmod dates and priorities.
      responses:
        '200':
          description: XML sitemap
          content:
            application/xml:
              schema:
                type: string

  /llms.txt:
    get:
      operationId: getLlmsTxt
      summary: Structured overview for large language models
      description: Returns a Markdown-formatted overview of Growth Performance optimised for LLM consumption, including services, articles, tools, team, and API access information.
      responses:
        '200':
          description: Markdown text
          content:
            text/plain:
              schema:
                type: string

  /llms-full.txt:
    get:
      operationId: getLlmsFullTxt
      summary: Extended content index for large language models
      description: Returns the full llms.txt content plus a complete index of all 113+ article titles grouped by category with URLs and excerpts.
      responses:
        '200':
          description: Markdown text
          content:
            text/plain:
              schema:
                type: string

components:
  schemas:
    ArticleSummary:
      type: object
      description: Article metadata without full content body
      properties:
        slug:
          type: string
          description: URL slug used to retrieve the full article
        title:
          type: string
        excerpt:
          type: string
          description: Short summary of the article (150–250 characters)
        category:
          type: string
          enum:
            - Mindset Readiness
            - Human Capability Development
            - Organisational Performance
            - AI + Leadership
        author:
          type: string
        readTime:
          type: string
          example: "8 min read"
        publishedAt:
          type: string
          format: date-time
        featured:
          type: boolean

    Article:
      allOf:
        - $ref: '#/components/schemas/ArticleSummary'
        - type: object
          properties:
            content:
              type: string
              description: Full article content in Markdown format

    Service:
      type: object
      properties:
        name:
          type: string
          example: Executive Coaching
        description:
          type: string
        url:
          type: string
          format: uri
        serviceType:
          type: string
        targetAudience:
          type: string
        keyOutcomes:
          type: array
          items:
            type: string

    FAQ:
      type: object
      properties:
        question:
          type: string
        answer:
          type: string
        category:
          type: string
          example: Services

    TeamMember:
      type: object
      properties:
        name:
          type: string
        jobTitle:
          type: string
        description:
          type: string
        credentials:
          type: array
          items:
            type: string
          description: Professional accreditations and certifications
        expertise:
          type: array
          items:
            type: string
          description: Areas of specialism
