fix(core): `getConnectorDetailsPerEnv` returning different response than documented in `openapi.yaml`
- 主要语言
- Java
- 星标
- 195
- 派生
- 77
- 平均合并
- 8 天 9 小时
- 30 天内合并 PR
- 1
描述
# What happened?
`getConnectorDetailsPerEnv` response seems to not conform to the `openapi` documentation.
A `GET` to `getConnectorDetailsPerEnv?connectorName=Aindriu45&envSelected=4`
Returns this response:
```json
{
"connectorExists": true,
"connectorId": 1005,
"connectorContents": {
"runningTasks": 0,
"failedTasks": 0,
"environmentId": "4",
"teamName": "Ospo",
"teamId": 0,
"showEditConnector": false,
"showDeleteConnector": false,
"connectorDeletable": false,
"connectorOwner": false,
"highestEnv": false,
"hasOpenRequest": false,
"connectorConfig": "{\n \"connector.class\" : \"io.confluent.connect.storage.tools.SchemaSourceConnector\",\n \"tasks.max\" : \"1\",\n \"name\" : \"Aindriu45\",\n \"topic\" : \"NewTopic\",\n \"topics.regex\" : \"*\"\n}",
"environmentName": "DEV",
"description": "Connector description"
}
}
```
However, the expected response for the `connectorContents` property as documented is `KafkaConnectorModelResponse`, (https://github.com/aiven/klaw/blob/main/openapi.yaml#L8034-L8049) which has many more properties, including some `required` which are not present in the `getConnectorDetailsPerEnv` response: https://github.com/aiven/klaw/blob/main/openapi.yaml#L7523
# What did you expect to happen?
I expected the `getConnectorDetailsPerEnv` to return the data as documented in `openapi.yaml`.
贡献指南
调研方向
Search for getConnectorDetailsPerEnv and compare its implementation and response model with the documented schemas in openapi.yaml at lines 7523 and 8034-8049. Confirm which response shape is intended and verify that the endpoint and specification agree when the change is complete.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, kafka, openapi
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100