Skip to content

Fix URLs in SchemaRegistryClient docs #2014

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ async def lookup_schema(
SchemaRegistryError: If schema or subject can't be found

See Also:
`POST Subject API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions>`_
`POST Subject API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)>`_
""" # noqa: E501

registered_schema = self._cache.get_registered_by_subject_schema(subject_name, schema)
Expand Down Expand Up @@ -785,7 +785,7 @@ async def lookup_schema(

async def get_subjects(self) -> List[str]:
"""
List all subjects registered with the Schema Registry
Lists all subjects registered with the Schema Registry

Returns:
list(str): Registered subject names
Expand All @@ -794,7 +794,7 @@ async def get_subjects(self) -> List[str]:
SchemaRegistryError: if subjects can't be found

See Also:
`GET subjects API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions>`_
`GET subjects API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects>`_
""" # noqa: E501

return await self._rest_client.get('subjects')
Expand Down Expand Up @@ -908,7 +908,7 @@ async def get_latest_with_metadata(
return registered_schema

async def get_version(
self, subject_name: str, version: int,
self, subject_name: str, version: Union[int, str] = "latest",
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

Adding a default parameter value to an existing method parameter changes the API signature and could be a breaking change. Consider whether this change maintains backward compatibility with existing callers that may rely on the previous required parameter behavior.

Suggested change
self, subject_name: str, version: Union[int, str] = "latest",
self, subject_name: str, version: Union[int, str],

Copilot uses AI. Check for mistakes.

deleted: bool = False, fmt: Optional[str] = None
) -> 'RegisteredSchema':
"""
Expand All @@ -927,7 +927,7 @@ async def get_version(
SchemaRegistryError: if the version can't be found or is invalid.

See Also:
`GET Subject Version API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions-(versionId-%20version)>`_
`GET Subject Versions API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions>`_
""" # noqa: E501

registered_schema = self._cache.get_registered_by_subject_version(subject_name, version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def lookup_schema(
SchemaRegistryError: If schema or subject can't be found

See Also:
`POST Subject API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions>`_
`POST Subject API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)>`_
""" # noqa: E501

registered_schema = self._cache.get_registered_by_subject_schema(subject_name, schema)
Expand Down Expand Up @@ -785,7 +785,7 @@ def lookup_schema(

def get_subjects(self) -> List[str]:
"""
List all subjects registered with the Schema Registry
Lists all subjects registered with the Schema Registry

Returns:
list(str): Registered subject names
Expand All @@ -794,7 +794,7 @@ def get_subjects(self) -> List[str]:
SchemaRegistryError: if subjects can't be found

See Also:
`GET subjects API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions>`_
`GET subjects API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects>`_
""" # noqa: E501

return self._rest_client.get('subjects')
Expand Down Expand Up @@ -908,7 +908,7 @@ def get_latest_with_metadata(
return registered_schema

def get_version(
self, subject_name: str, version: int,
self, subject_name: str, version: Union[int, str] = "latest",
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

Adding a default parameter value to an existing method parameter changes the API signature and could be a breaking change. Consider whether this change maintains backward compatibility with existing callers that may rely on the previous required parameter behavior.

Suggested change
self, subject_name: str, version: Union[int, str] = "latest",
self, subject_name: str, version: Union[int, str],

Copilot uses AI. Check for mistakes.

deleted: bool = False, fmt: Optional[str] = None
) -> 'RegisteredSchema':
"""
Expand All @@ -927,7 +927,7 @@ def get_version(
SchemaRegistryError: if the version can't be found or is invalid.

See Also:
`GET Subject Version API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions-(versionId-%20version)>`_
`GET Subject Versions API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions>`_
""" # noqa: E501

registered_schema = self._cache.get_registered_by_subject_version(subject_name, version)
Expand Down