redhat-developer / app-services-sdk-js

RHOAS SDK for JavaScript and Typescript
https://redhat-developer.github.io/app-services-sdk-js
Apache License 2.0
3 stars 16 forks source link

fix: fixes a bug by where the returned response conflicts with OAS file #557

Closed dimakis closed 1 year ago

dimakis commented 1 year ago

The Python SDK client doesn't recognise numPartitions as it is looking for partition in the response body. This may effect other clients, I'm unsure.

@jackdelahunt if you try create a topic against the mock, do you run into any issues with the Go SDK failing to decode the partition value?

here is the error returned by python SDK:

rhoas_kafka_instance_sdk.exceptions.ApiValueError: Invalid inputs given to generate an instance of 'TopicAllOf'. The input data was invalid for the allOf schema 'TopicAllOf' in the composed schema 'Topic'. Error=_from_openapi_data() missing 1 required positional argument: 'partition'
wtrocki commented 1 year ago

The Python SDK client doesn't recognise numPartitions

We need to check what other SDKs do - they all base on the same OpenAPI. Mock is being used in UI etc. so we do not want to break it :)

wtrocki commented 1 year ago

Num partitions also exist in python: https://github.com/redhat-developer/app-services-sdk-python/blob/878e63f80a392f8673bfad960d2ab4562ed815d0/sdks/kafka_instance_sdk/docs/TopicsApi.md#L445

Maybe we have that field outside sdk

dimakis commented 1 year ago

Num partitions also exist in python: https://github.com/redhat-developer/app-services-sdk-python/blob/878e63f80a392f8673bfad960d2ab4562ed815d0/sdks/kafka_instance_sdk/docs/TopicsApi.md#L445

Maybe we have that field outside sdk

It is a strange one, the call doesn't fail when the legit API is called. The failure is in the converting of the string from JS to Python style. 🤔