Skip to content

Commit

Permalink
fix(): update for SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
app-services-ci authored Dec 11, 2022
1 parent d9e3c75 commit 9f5ff1e
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .openapi/connector_mgmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,12 @@ components:
# Connector Cluster
#

ConnectorResourceAnnotations:
description: Name-value string annotations for resource
type: object
additionalProperties:
type: "string"

ConnectorClusterState:
type: string
enum:
Expand All @@ -1168,9 +1174,12 @@ components:
- deleting

ConnectorClusterRequestMeta:
type: object
properties:
name:
type: string
annotations:
$ref: "#/components/schemas/ConnectorResourceAnnotations"

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

ConnectorRequestMeta:
type: object
required:
- name
- connector_type_id
Expand All @@ -1275,6 +1285,9 @@ components:
$ref: "#/components/schemas/Channel"
desired_state:
$ref: "#/components/schemas/ConnectorDesiredState"
annotations:
$ref: "#/components/schemas/ConnectorResourceAnnotations"


ConnectorRequest:
allOf:
Expand Down Expand Up @@ -1353,12 +1366,14 @@ components:
type: array
items:
type: string
annotations:
$ref: "#/components/schemas/ConnectorResourceAnnotations"
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 @@ -1412,9 +1427,7 @@ components:
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
description: Namespace name must match pattern `^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$`, or it may be empty to be auto-generated.
annotations:
type: object
additionalProperties:
type: "string"
$ref: "#/components/schemas/ConnectorResourceAnnotations"

ConnectorNamespaceQuota:
type: object
Expand Down Expand Up @@ -1625,7 +1638,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 +1702,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 +1829,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
139 changes: 139 additions & 0 deletions .openapi/kas-fleet-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,79 @@ paths:
$ref: '#/components/examples/500Example'
parameters:
- $ref: "#/components/parameters/id"
/api/kafkas_mgmt/v1/clusters:
post:
description: Register enterprise OSD cluster
operationId: registerEnterpriseOsdCluster
requestBody:
description: Enterprise OSD cluster details
content:
application/json:
schema:
$ref: '#/components/schemas/EnterpriseOsdClusterPayload'
examples:
USRegion:
$ref: '#/components/examples/USRegionExample'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/KafkaRequest' # change me
examples:
KafkaRequestPostResponseExample:
$ref: '#/components/examples/KafkaRequestExample' # change me
description: Enterprise cluster registered
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
400InvalidClusterIdExample:
$ref: '#/components/examples/400InvalidClusterIdExample'
400MInvalidExternalClusterIdExample:
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
description: Validation errors occurred
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
401Example:
$ref: '#/components/examples/401Example'
description: Auth token is invalid
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
403Example:
$ref: '#/components/examples/403Example'
description: User is not authorized to access the service
"409":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
409ClusterIdConflictExample:
$ref: '#/components/examples/409ClusterIdConflictExample'
description: A conflict has been detected in the creation of this resource
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
500Example:
$ref: '#/components/examples/500Example'
description: An unexpected error occurred while registering Enterprise cluster
security:
- Bearer: [ ]

components:
schemas:
Expand Down Expand Up @@ -1549,6 +1622,48 @@ components:
description: Whether connection reauthentication is enabled or not. If set to true, connection reauthentication on the Kafka instance will be required every 5 minutes.
type: boolean
nullable: true
EnterpriseOsdClusterPayload:
description: Schema for the request body sent to /clusters POST
required:
- cluster_id
- cluster_external_id
- cluster_ingress_dns_name
type: object
properties:
cluster_id:
description: OSD cluster ID
type: string
cluster_external_id:
description: external cluster ID. Can be obtained from the response JSON of ocm get /api/clusters_mgmt/v1/clusters/<cluster_id>
type: string
cluster_ingress_dns_name:
description: dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters/<cluster_id>/ingresses (dns_name)
type: string
EnterpriseCluster:
description: Enterprise cluster registration endpoint response
allOf:
- type: object
properties:
cluster_id:
description: 'ocm cluster id of the registered Enterprise cluster'
type: string
status:
description: 'status of registered Enterprise cluster'
type: string
fleetshard_parameters:
type: array
items:
allOf:
- $ref: "#/components/schemas/FleetshardParameter"

FleetshardParameter:
description: "Fleetshard parameter consumed by enterprise cluster"
type: object
properties:
id:
type: string
value:
type: string

parameters:
id:
Expand Down Expand Up @@ -1945,6 +2060,22 @@ components:
code: "KAFKAS-MGMT-21"
reason: "missing path parameter: kafka id"
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
400InvalidClusterIdExample:
value:
id: "45"
kind: "Error"
href: "/api/kafkas_mgmt/v1/errors/45"
code: "KAFKAS-MGMT-45"
reason: "Enterprise cluster ID is invalid"
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
400MInvalidExternalClusterIdExample:
value:
id: "46"
kind: "Error"
href: "/api/kafkas_mgmt/v1/errors/46"
code: "KAFKAS-MGMT-46"
reason: "Enterprise external cluster ID is invalid"
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
404Example:
value:
id: "7"
Expand Down Expand Up @@ -2000,6 +2131,14 @@ components:
code: "KAFKAS-MGMT-36"
reason: "Kafka cluster name is already used"
operation_id: "6kY0UiEkzkXCzWPeI2oYehd3ED"
409ClusterIdConflictExample:
value:
id: "44"
kind: "Error"
href: "/api/kafkas_mgmt/v1/errors/44"
code: "KAFKAS-MGMT-44"
reason: "Enterprise cluster ID is already used"
operation_id: "6kY0UiEkzkXCzWPeI2oYehd3ED"
500Example:
value:
id: "9"
Expand Down

0 comments on commit 9f5ff1e

Please sign in to comment.