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