Aiven-Open / Aiven-Open/klaw

fix(core): `getConnectorDetailsPerEnv` returning different response than documented in `openapi.yaml`

Open
#1,522 0 comments 0 reactions 0 assignees View on GitHub
Backend bug
Dominant language
Java
Stars
195
Forks
77
Avg merge
8d 9h
Merged PRs (30d)
1

Description

# 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`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.