---
openapi: 3.1.0
tags:
- name: Admin
  description: Admin related services
- name: Client
  description: Client related services
components:
  schemas:
    ArtifactCoords:
      type: object
      properties:
        groupId:
          type: string
        artifactId:
          type: string
        classifier:
          type: string
        type:
          type: string
        version:
          type: string
        key:
          $ref: "#/components/schemas/ArtifactKey"
        jar:
          type: boolean
        snapshot:
          type: boolean
    ArtifactKey:
      type: object
      properties:
        groupId:
          type: string
        artifactId:
          type: string
        classifier:
          type: string
        type:
          type: string
    Category:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        metadata:
          type: object
          additionalProperties: {}
    Extension:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        artifact:
          $ref: "#/components/schemas/ArtifactCoords"
        origins:
          type: array
          items:
            $ref: "#/components/schemas/ExtensionOrigin"
        metadata:
          type: object
          additionalProperties: {}
    ExtensionCatalog:
      type: object
      properties:
        id:
          type: string
        bom:
          $ref: "#/components/schemas/ArtifactCoords"
        platform:
          type: boolean
        metadata:
          type: object
          additionalProperties: {}
        derivedFrom:
          type: array
          items:
            $ref: "#/components/schemas/ExtensionOrigin"
        quarkusCoreVersion:
          type: string
        upstreamQuarkusCoreVersion:
          type: string
        extensions:
          type: array
          items:
            $ref: "#/components/schemas/Extension"
        categories:
          type: array
          items:
            $ref: "#/components/schemas/Category"
    ExtensionOrigin:
      type: object
      properties:
        id:
          type: string
        bom:
          $ref: "#/components/schemas/ArtifactCoords"
        platform:
          type: boolean
        metadata:
          type: object
          additionalProperties: {}
    Platform:
      type: object
      properties:
        platformKey:
          type: string
        name:
          type: string
        streams:
          type: array
          items:
            $ref: "#/components/schemas/PlatformStream"
        metadata:
          type: object
          additionalProperties: {}
    PlatformCatalog:
      type: object
      properties:
        platforms:
          type: array
          items:
            $ref: "#/components/schemas/Platform"
        metadata:
          type: object
          additionalProperties: {}
    PlatformRelease:
      type: object
      properties:
        version:
          $ref: "#/components/schemas/PlatformReleaseVersion"
        memberBoms:
          type: array
          items:
            $ref: "#/components/schemas/ArtifactCoords"
        quarkusCoreVersion:
          type: string
        upstreamQuarkusCoreVersion:
          type: string
        metadata:
          type: object
          additionalProperties: {}
    PlatformReleaseVersion:
      type: object
    PlatformStream:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        releases:
          type: array
          items:
            $ref: "#/components/schemas/PlatformRelease"
        metadata:
          type: object
          additionalProperties: {}
    Type:
      type: string
      enum:
      - C
      - M
  securitySchemes:
    Authentication:
      type: apiKey
      description: Admin token
      name: TOKEN
      in: header
paths:
  /admin/v1/extension:
    delete:
      summary: Deletes an extension from the database
      tags:
      - Admin
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - groupId
              - artifactId
              properties:
                groupId:
                  type: string
                artifactId:
                  type: string
                version:
                  type: string
        required: true
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
    post:
      summary: Inserts an extension in the database
      tags:
      - Admin
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Extension"
          application/yaml:
            schema:
              $ref: "#/components/schemas/Extension"
        required: true
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      security:
      - Authentication: []
  /admin/v1/extension/catalog:
    delete:
      summary: Deletes an extension catalog (platform) from the database
      tags:
      - Admin
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - platformKey
              - version
              properties:
                platformKey:
                  type: string
                version:
                  type: string
        required: true
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
    post:
      summary: Inserts a new Extension Catalog (Platform Release) in the database
      description: Invoke this endpoint when a new extension catalog release is available
      tags:
      - Admin
      parameters:
      - name: X-Platform
        in: header
        schema:
          type: string
        required: true
      - name: X-Platform-Pinned
        in: header
        schema:
          type: boolean
          default: false
      - name: X-Platform-Type
        in: header
        schema:
          allOf:
          - $ref: "#/components/schemas/Type"
          - default: C
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExtensionCatalog"
          application/yaml:
            schema:
              $ref: "#/components/schemas/ExtensionCatalog"
        required: true
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      security:
      - Authentication: []
  /admin/v1/extension/compat:
    delete:
      summary: Flags an extension as incompatible against a specific Quarkus version
      tags:
      - Admin
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - groupId
              - artifactId
              - version
              - quarkusCore
              properties:
                groupId:
                  type: string
                artifactId:
                  type: string
                version:
                  type: string
                quarkusCore:
                  type: string
        required: true
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
    post:
      summary: Flags an extension as compatible against a specific Quarkus version
      tags:
      - Admin
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - groupId
              - artifactId
              - version
              - quarkusCore
              properties:
                groupId:
                  type: string
                artifactId:
                  type: string
                version:
                  type: string
                quarkusCore:
                  type: string
                compatible:
                  type: boolean
                  default: "true"
        required: true
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      security:
      - Authentication: []
  /admin/v1/extension/{groupId}/{artifactId}:
    patch:
      summary: Patches an Extension
      tags:
      - Admin
      parameters:
      - name: artifactId
        in: path
        required: true
        schema:
          type: string
      - name: groupId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
        required: true
      responses:
        "202":
          description: If invocation is successful
        "404":
          description: If Platform/Stream/Release were not found
      security:
      - Authentication: []
  /admin/v1/extension/{groupId}/{artifactId}/{version}:
    patch:
      summary: Patches an Extension Release
      tags:
      - Admin
      parameters:
      - name: artifactId
        in: path
        required: true
        schema:
          type: string
      - name: groupId
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - metadata
              properties:
                metadata:
                  type: string
        required: true
      responses:
        "202":
          description: If invocation is successful
        "204":
          description: If metadata is empty
        "404":
          description: If Extension Release was not found
      security:
      - Authentication: []
  /admin/v1/maven/cache:
    delete:
      summary: Clear the maven cache
      tags:
      - Admin
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
  /admin/v1/platform-release/{platformKey}/{streamKey}/{version}:
    patch:
      summary: Patches a PlatformRelease
      description: Invoke this endpoint when maintaining a platform release
      tags:
      - Admin
      parameters:
      - name: platformKey
        in: path
        required: true
        schema:
          type: string
      - name: streamKey
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                unlisted:
                  type: boolean
                pinned:
                  type: boolean
                metadata:
                  type: string
        required: true
      responses:
        "202":
          description: If invocation is successful
        "404":
          description: If Platform/Stream/Release were not found
      security:
      - Authentication: []
  /admin/v1/platform-release/{platformKey}/{streamKey}/{version}/category/{categoryKey}:
    patch:
      summary: Patches a PlatformReleaseCategory
      description: Invoke this endpoint when the platform release needs to be set
        to unlisted
      tags:
      - Admin
      parameters:
      - name: categoryKey
        in: path
        required: true
        schema:
          type: string
      - name: platformKey
        in: path
        required: true
        schema:
          type: string
      - name: streamKey
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                metadata:
                  type: string
        required: true
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
  /admin/v1/platform-release/{platformKey}/{streamKey}/{version}/extension/{extensionGroupId}/{extensionArtifactId}/{extensionVersion}:
    patch:
      summary: Patches a PlatformExtension
      description: Invoke this endpoint to patch a PlatformExtension
      tags:
      - Admin
      parameters:
      - name: extensionArtifactId
        in: path
        required: true
        schema:
          type: string
      - name: extensionGroupId
        in: path
        required: true
        schema:
          type: string
      - name: extensionVersion
        in: path
        required: true
        schema:
          type: string
      - name: platformKey
        in: path
        required: true
        schema:
          type: string
      - name: streamKey
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                metadata:
                  type: string
        required: true
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
  /admin/v1/stream/{platformKey}/{streamKey}:
    patch:
      summary: Patches a PlatformStream
      tags:
      - Admin
      parameters:
      - name: platformKey
        in: path
        required: true
        schema:
          type: string
      - name: streamKey
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                unlisted:
                  type: boolean
                pinned:
                  type: boolean
                lts:
                  type: boolean
        required: true
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
    delete:
      summary: Deletes a PlatformStream
      tags:
      - Admin
      parameters:
      - name: platformKey
        in: path
        required: true
        schema:
          type: string
      - name: streamKey
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - Authentication: []
  /client/config.yaml:
    get:
      summary: Example Quarkus Registry Client configuration file
      tags:
      - Client
      responses:
        "200":
          description: OK
  /client/extensions/all:
    get:
      summary: "List all extensions. When an extension has multiple releases, only\
        \ the most recent will be listed."
      tags:
      - Client
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionCatalog"
  /client/non-platform-extensions:
    get:
      summary: List all latest non-platform extensions compatible with a given Quarkus
        version
      tags:
      - Client
      parameters:
      - name: v
        in: query
        schema:
          type: string
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionCatalog"
  /client/platforms:
    get:
      summary: List the latest stable + newer unstable + pinned platform releases
      tags:
      - Client
      parameters:
      - name: v
        in: query
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PlatformCatalog"
  /client/platforms/all:
    get:
      summary: List all platform releases from the database
      tags:
      - Client
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PlatformCatalog"
info:
  title: Quarkus Extension Registry API
  version: 1.0.0
  description: Catalog of Quarkus extensions
  contact:
    name: Quarkus team
    email: quarkus-dev@googlegroups.com
    url: https://github.com/quarkusio/registry.quarkus.io
