---
openapi: 3.1.0
paths:
  /api/categories:
    get:
      summary: List available categories
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      tags:
      - Reference Service
  /api/guides/search:
    get:
      summary: Search for Guides
      parameters:
      - name: categories
        in: query
        schema:
          type: array
          items:
            type: string
      - name: contentSnippets
        in: query
        schema:
          type: integer
          format: int32
          default: 1
          maximum: 10
          minimum: 0
      - name: contentSnippetsLength
        in: query
        schema:
          type: integer
          format: int32
          default: 100
          maximum: 200
          minimum: 0
      - name: highlightCssClass
        in: query
        schema:
          type: string
          default: highlighted
      - name: language
        in: query
        schema:
          allOf:
          - $ref: "#/components/schemas/Language"
          - default: en
      - name: origin
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: integer
          format: int32
          default: 0
          minimum: 0
      - name: q
        in: query
        schema:
          type: string
      - name: version
        in: query
        schema:
          type: string
          default: latest
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchResultGuideSearchHit"
      tags:
      - Search Service
  /api/languages:
    get:
      summary: List available languages
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Language"
      tags:
      - Reference Service
  /api/versions:
    get:
      summary: List available versions
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      tags:
      - Reference Service
components:
  schemas:
    GuideSearchHit:
      type: object
      properties:
        url:
          type: string
          format: uri
        type:
          type: string
        status:
          type: string
        origin:
          type: string
        title:
          type: string
        summary:
          type: string
        content:
          type: array
          uniqueItems: true
          items:
            type: string
    Language:
      type: string
      enum:
      - en
      - es
      - pt
      - cn
      - ja
    SearchResultGuideSearchHit:
      type: object
      properties:
        total:
          $ref: "#/components/schemas/Total"
        hits:
          type: array
          items:
            $ref: "#/components/schemas/GuideSearchHit"
        suggestion:
          $ref: "#/components/schemas/Suggestion"
    Suggestion:
      type: object
      properties:
        query:
          type: string
        highlighted:
          type: string
    Total:
      type: object
      properties:
        exact:
          type: integer
          format: int64
        lowerBound:
          type: integer
          format: int64
info:
  title: Quarkus Search API
  version: 1.0.0
  description: Search Quarkus resources
  contact:
    name: Quarkus team
    email: quarkus-dev@googlegroups.com
    url: https://github.com/quarkusio/search.quarkus.io
