From 61ee1daa6e4324f1bb95afd05510215b254905f7 Mon Sep 17 00:00:00 2001 From: achever1 Date: Thu, 9 Jan 2025 15:08:22 +0100 Subject: [PATCH] feat(1656): include partner zone api changes --- schema/gateway-default-schema.json | 2 +- schema/gateway.yaml | 49 ++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/schema/gateway-default-schema.json b/schema/gateway-default-schema.json index 82189ef..aa6c557 100644 --- a/schema/gateway-default-schema.json +++ b/schema/gateway-default-schema.json @@ -1 +1 @@ -{"AliasTopic":{"Versions":{"2":{"ListPath":"/gateway/v2/alias-topic","Name":"AliasTopic","ParentPathParam":[],"ListQueryParameter":{"name":{"FlagName":"name","Required":false,"Type":"string"},"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"Order":8}}},"ConcentrationRule":{"Versions":{"2":{"ListPath":"/gateway/v2/concentration-rule","Name":"ConcentrationRule","ParentPathParam":[],"ListQueryParameter":{"name":{"FlagName":"name","Required":false,"Type":"string"},"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"Order":9}}},"GatewayGroup":{"Versions":{"2":{"ListPath":"/gateway/v2/group","Name":"GatewayGroup","ParentPathParam":[],"ListQueryParameter":{"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"}},"GetAvailable":true,"Order":11}}},"GatewayServiceAccount":{"Versions":{"2":{"ListPath":"/gateway/v2/service-account","Name":"GatewayServiceAccount","ParentPathParam":[],"ListQueryParameter":{"name":{"FlagName":"name","Required":false,"Type":"string"},"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"},"type":{"FlagName":"type","Required":false,"Type":"string"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"Order":10}}},"Interceptor":{"Versions":{"2":{"ListPath":"/gateway/v2/interceptor","Name":"Interceptor","ParentPathParam":[],"ListQueryParameter":{"global":{"FlagName":"global","Required":false,"Type":"boolean"},"group":{"FlagName":"group","Required":false,"Type":"string"},"name":{"FlagName":"name","Required":false,"Type":"string"},"username":{"FlagName":"username","Required":false,"Type":"string"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"Order":12}}},"VirtualCluster":{"Versions":{"2":{"ListPath":"/gateway/v2/virtual-cluster","Name":"VirtualCluster","ParentPathParam":[],"ListQueryParameter":{},"GetAvailable":true,"Order":7}}}} \ No newline at end of file +{"AliasTopic":{"Versions":{"2":{"ListPath":"/gateway/v2/alias-topic","Name":"AliasTopic","ParentPathParam":[],"ParentQueryParam":null,"ListQueryParameter":{"name":{"FlagName":"name","Required":false,"Type":"string"},"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"ApplyExample":"kind: AliasTopic\napiVersion: gateway/v2\nmetadata:\n name: name1\n vCluster: vCluster1\nspec:\n physicalName: physicalName1\n","Order":8}}},"ConcentrationRule":{"Versions":{"2":{"ListPath":"/gateway/v2/concentration-rule","Name":"ConcentrationRule","ParentPathParam":[],"ParentQueryParam":null,"ListQueryParameter":{"name":{"FlagName":"name","Required":false,"Type":"string"},"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"ApplyExample":"kind: ConcentrationRule\napiVersion: gateway/v2\nmetadata:\n name: concentrationRule1\n vCluster: vCluster1\nspec:\n pattern: topic.*\n physicalTopics:\n delete: topic\n compact: compact_topic\n deleteCompact: compact_delete_topic\n autoManaged: false\n offsetCorrectness: false\n","Order":9}}},"GatewayGroup":{"Versions":{"2":{"ListPath":"/gateway/v2/group","Name":"GatewayGroup","ParentPathParam":[],"ParentQueryParam":null,"ListQueryParameter":{"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"}},"GetAvailable":true,"ApplyExample":"kind: GatewayGroup\napiVersion: gateway/v2\nmetadata:\n name: group1\nspec:\n members:\n - vCluster: vCluster1\n name: serviceAccount1\n - vCluster: vCluster2\n name: serviceAccount2\n - vCluster: vCluster3\n name: serviceAccount3\n externalGroups:\n - GROUP_READER\n - GROUP_WRITER\n","Order":11}}},"GatewayServiceAccount":{"Versions":{"2":{"ListPath":"/gateway/v2/service-account","Name":"GatewayServiceAccount","ParentPathParam":[],"ParentQueryParam":null,"ListQueryParameter":{"name":{"FlagName":"name","Required":false,"Type":"string"},"showDefaults":{"FlagName":"show-defaults","Required":false,"Type":"boolean"},"type":{"FlagName":"type","Required":false,"Type":"string"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"ApplyExample":"kind: GatewayServiceAccount\napiVersion: gateway/v2\nmetadata:\n name: user1\n vCluster: vcluster1\nspec:\n type: EXTERNAL\n externalNames:\n - externalName\n","Order":10}}},"Interceptor":{"Versions":{"2":{"ListPath":"/gateway/v2/interceptor","Name":"Interceptor","ParentPathParam":[],"ParentQueryParam":null,"ListQueryParameter":{"global":{"FlagName":"global","Required":false,"Type":"boolean"},"group":{"FlagName":"group","Required":false,"Type":"string"},"name":{"FlagName":"name","Required":false,"Type":"string"},"username":{"FlagName":"username","Required":false,"Type":"string"},"vcluster":{"FlagName":"vcluster","Required":false,"Type":"string"}},"GetAvailable":false,"ApplyExample":"kind: Interceptor\napiVersion: gateway/v2\nmetadata:\n name: yellow_cars_filter\n scope:\n vCluster: vCluster1\nspec:\n comment: Filter yellow cars\n pluginClass: io.conduktor.gateway.interceptor.VirtualSqlTopicPlugin\n priority: 1\n config:\n virtualTopic: yellow_cars\n statement: SELECT '$.type' as type, '$.price' as price FROM cars WHERE '$.color' = 'yellow'\n","Order":12}}},"VirtualCluster":{"Versions":{"2":{"ListPath":"/gateway/v2/virtual-cluster","Name":"VirtualCluster","ParentPathParam":[],"ParentQueryParam":null,"ListQueryParameter":{},"GetAvailable":true,"ApplyExample":"kind: VirtualCluster\napiVersion: gateway/v2\nmetadata:\n name: vcluster1\nspec:\n aclEnabled: false\n superUsers:\n - username1\n - username2\n type: Standard\n","Order":7}}}} \ No newline at end of file diff --git a/schema/gateway.yaml b/schema/gateway.yaml index 62148d0..f72e542 100644 --- a/schema/gateway.yaml +++ b/schema/gateway.yaml @@ -282,7 +282,7 @@ tags: description: |+ ### Definition - https://docs.conduktor.io/gateway/concepts/GatewayUser/ + https://docs.conduktor.io/gateway/concepts/service-accounts-authentication-authorization/ ### Available operations @@ -460,6 +460,7 @@ paths: superUsers: - username1 - username2 + type: Standard '401': description: The given credentials are not valid content: @@ -519,6 +520,7 @@ paths: superUsers: - username1 - username2 + type: Standard required: true responses: '200': @@ -538,6 +540,7 @@ paths: superUsers: - username1 - username2 + type: Standard upsertResult: UPDATED '400': description: Wrong format or usage of reserved keywords (e.g. passthrough) @@ -592,7 +595,8 @@ paths: "superUsers" : [ "username1", "username2" - ] + ], + "type" : "Standard" } }' /gateway/v2/virtual-cluster/{vCluster}: @@ -630,6 +634,7 @@ paths: superUsers: - username1 - username2 + type: Standard '401': description: The given credentials are not valid content: @@ -898,6 +903,22 @@ paths: $ref: '#/components/schemas/NotFound' example: title: The given virtual cluster does not exist + '409': + description: |2 + + The virtual cluster is of type Standard and does not target main physical cluster + The virtual cluster is of type Partner and does not target a valid physical cluster + The physical cluster of an alias topic cannot be changed + content: + application/json: + schema: + $ref: '#/components/schemas/Conflict' + example: + title: |2 + + The virtual cluster is of type Standard and does not target main physical cluster + The virtual cluster is of type Partner and does not target a valid physical cluster + The physical cluster of an alias topic cannot be changed '500': description: An unexpected error occurred in the server content: @@ -2569,6 +2590,14 @@ components: description: The physical name of the alias topic type: string format: ^[a-zA-Z0-9._-]+$ + physicalCluster: + description: |2 + + The physical kafka cluster hosting the physical topic. + The field is optional and only useful for alias topics referencing __Partner__ virtual clusters. + For alias topics linked to virtual clusters of type __Standard__, the physical cluster can only be "main" (automatically set to "main" if the field is missing). + The physical cluster must be one of the configured list of physical clusters of the gateway. + type: string ApplyResult_AliasTopic: title: ApplyResult_AliasTopic type: object @@ -2822,6 +2851,8 @@ components: title: ExternalSpec description: Spec of the service account type: object + required: + - type properties: externalNames: description: |2 @@ -2833,6 +2864,10 @@ components: type: array items: type: string + type: + description: 'The type of the service account : `LOCAL` or `EXTERNAL` (case + insensitive)' + type: string GatewayGroup: title: GatewayGroup type: object @@ -3028,6 +3063,13 @@ components: title: LocalSpec description: Spec of the service account type: object + required: + - type + properties: + type: + description: 'The type of the service account : `LOCAL` or `EXTERNAL` (case + insensitive)' + type: string Map_Json: title: Map_Json description: The configuration of the interceptor @@ -3214,6 +3256,9 @@ components: type: array items: type: string + type: + description: 'The type of the virtual cluster : Standard, Partner' + type: string securitySchemes: httpAuth: type: http