Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API version selector #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

API version selector #23

wants to merge 3 commits into from

Conversation

b-Tomas
Copy link
Member

@b-Tomas b-Tomas commented Jul 5, 2024

🗒️ Description

Adds an API version to API python class dictionary.

When an unsupported API version is specified, the error message displays:

pydantic_core._pydantic_core.ValidationError: 1 validation error for MiR100Config
connector_config.mir_api_version
  Value error, MiR API version 'v3.0' is not supported. Supported versions are: v2.0 [type=value_error, input_value='v3.0', input_type=str]

Adds an api version to api python class dictionary
@b-Tomas b-Tomas self-assigned this Jul 5, 2024
Comment on lines +6 to +8
APIS = {
"v2.0": {"rest": MirApiV2, "ws": MirWebSocketV2},
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without having much context, are we sure these versions are fixed?
E.g: V2.0 means V2 for Rest and WS?
Could it happen that a model uses different APIs versions for WS and rest?

@elvioaruta
Copy link
Member

The implementation looks good, just added a comment related to something that I'm not sure of. If those API versions are fixed, then this PR looks good to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants