Skip to content

Commit

Permalink
MGDCTRS-1752: Update openapi definitions
Browse files Browse the repository at this point in the history
The OpenAPI definition is amended and the annotation schmea replaced by
a plain object definition because of a bug in the openapi generator:

    OpenAPITools/openapi-generator#7066
  • Loading branch information
lburgazzoli committed Dec 14, 2022
1 parent efd52dd commit 9dea649
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ components:
format: int64
resolved_secrets:
type: boolean
annotations:
type: object
additionalProperties:
type: "string"
spec:
$ref: '#/components/schemas/ConnectorDeploymentSpec'
status:
Expand Down
27 changes: 22 additions & 5 deletions cos-fleet-manager-api/src/openapi/specs/connector_mgmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: 'Apache 2.0'
url: 'https://www.apache.org/licenses/LICENSE-2.0'
contact:
contact:
name: 'Red Hat OpenShift Streams for Apache Kafka Support'
email: '[email protected]'
servers:
Expand Down Expand Up @@ -1168,9 +1168,14 @@ components:
- deleting

ConnectorClusterRequestMeta:
type: object
properties:
name:
type: string
annotations:
type: object
additionalProperties:
type: "string"

ConnectorClusterRequest:
description: "Schema for the request to update a data plane cluster's name"
Expand Down Expand Up @@ -1259,6 +1264,7 @@ components:
type: object

ConnectorRequestMeta:
type: object
required:
- name
- connector_type_id
Expand All @@ -1275,6 +1281,11 @@ components:
$ref: "#/components/schemas/Channel"
desired_state:
$ref: "#/components/schemas/ConnectorDesiredState"
annotations:
type: object
additionalProperties:
type: "string"


ConnectorRequest:
allOf:
Expand Down Expand Up @@ -1353,12 +1364,16 @@ components:
type: array
items:
type: string
annotations:
type: object
additionalProperties:
type: "string"
featured_rank:
description: Ranking for featured connectors
type: integer
format: int32
capabilities:
description: The capabilities supported by the conenctor
description: The capabilities supported by the connector
type: array
items:
type: string
Expand Down Expand Up @@ -1625,7 +1640,7 @@ components:
* Cluster: id, created_at, updated_at, owner, organisation_id, name, state, client_id
* Namespace: id, created_at, updated_at, name, cluster_id, owner, expiration, tenant_user_id, tenant_organisation_id, state
* Connector Types: id, created_at, updated_at, version, name, description, label, channel, featured_rank
* Connector Types: id, created_at, updated_at, version, name, description, label, channel, featured_rank, pricing_tier
* Connectors: id, created_at, updated_at, name, owner, organisation_id, connector_type_id, desired_state, state, channel, namespace_id, kafka_id, kafka_bootstrap_server, service_account_client_id, schema_registry_id, schema_registry_url
Allowed operators are `<>`, `=`, `LIKE`, or `ILIKE`.
Expand Down Expand Up @@ -1689,6 +1704,8 @@ components:
icon_href: "/api/connector_mgmt/v1/kafka_connector_types/log_sink.png"
labels:
- sink
annotations:
- "cos.bf2.org/name": value
capabilities:
- data_shape
- processors
Expand Down Expand Up @@ -1814,12 +1831,12 @@ components:
name: "MyNamespace"
cluster_id: "9bsv0s7tne7g02gh5g4g"
annotations:
"connector_mgmt.bf2.org/profile": "default-profile"
"cos.bf2.org/profile": "default-profile"
ConnectorNamespaceEvalCreateExample:
value:
name: "MyEvalNamespace"
annotations:
"connector_mgmt.bf2.org/profile": "evaluation-profile"
"cos.bf2.org/profile": "evaluation-profile"
400CreationExample:
value:
id: "103"
Expand Down
55 changes: 52 additions & 3 deletions cos-fleet-manager-api/src/openapi/specs/kas-fleet-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0 # need this as first line to allow some IDEs to know this is an o
# All endpoints defined here will be discoverable by all users. If there is a need to keep some endpoints "private", add them to the "managed-services-api-private.yaml" file
info:
title: Kafka Management API
version: 1.11.0
version: 1.14.0
description: Kafka Management API is a REST API to manage Kafka instances
license:
name: 'Apache 2.0'
Expand Down Expand Up @@ -936,16 +936,22 @@ components:
properties:
reason:
type: string
description: "Human-readable description of the error. Intended for human consumption"
operation_id:
type: string
description: "Relatively unique operation ID of the request associated to the error"
id:
type: string
description: "The unique and immutable identifier of the resource"
kind:
type: string
description: "The kind of the resource"
href:
type: string
description: "The absolute path of the resource"
code:
type: string
description: "Code of the error"
ErrorList:
allOf:
- $ref: "#/components/schemas/List"
Expand Down Expand Up @@ -1141,12 +1147,48 @@ components:
display_name:
description: 'Human readable name of the supported Kafka instance type'
type: string
supported_billing_models:
description: "A list of available kafka billing models for the instance type. Each kafka billing model item has a unique 'id'"
type: array
minItems: 1
items:
$ref: '#/components/schemas/SupportedKafkaBillingModel'
sizes:
description: ' A list of Kafka instance sizes available for this instance type'
description: 'A list of Kafka instance sizes available for this instance type'
type: array
items:
allOf:
- $ref: '#/components/schemas/SupportedKafkaSize'
required:
- supported_billing_models
SupportedKafkaBillingModel:
description: 'Supported Kafka Billing Model'
type: object
properties:
id:
description: 'Identifier for the Kafka billing model'
type: string
minLength: 1
ams_resource:
description: "AMS resource to be used. Accepted values: ['rhosak']"
type: string
minLength: 1
ams_product:
description: "AMS product to be used. Accepted values: ['RHOSAK', 'RHOSAKTrial', 'RHOSAKEval']"
type: string
minLength: 1
ams_billing_models:
description: "List of AMS available billing models: Accepted values: ['marketplace', 'marketplace-rhm', 'marketplace-aws']"
type: array
minItems: 1
items:
type: string
minLength: 1
required:
- id
- ams_resource
- ams_product
- ams_billing_models
SupportedKafkaSize:
description: 'Supported Kafka Size'
type: object
Expand Down Expand Up @@ -1204,8 +1246,9 @@ components:
description: 'Quota consumed by this Kafka instance size.'
type: integer
quota_type:
description: 'Quota type used by this Kafka instance size.'
description: 'Quota type used by this Kafka instance size. This is now deprecated, please refer to supported_billing_models at instance-type level instead.'
type: string
deprecated: true
capacity_consumed:
description: 'Data plane cluster capacity consumed by this Kafka instance size.'
type: integer
Expand Down Expand Up @@ -1738,6 +1781,12 @@ components:
value:
id: developer
display_name: Trial
supported_billing_models:
- id: trial
ams_resource: rhosak
ams_product: RHOSAKTrial
ams_billing_models:
- standard
sizes:
[
{
Expand Down

0 comments on commit 9dea649

Please sign in to comment.