Skip to content

Commit

Permalink
chore: Remove version from schema docstrings (#164)
Browse files Browse the repository at this point in the history
Please see separate commits, second one has the schema re-generation.

This addresses a regret. While it's nice to have the full link to the
upstream source easily available, this just causes an unjustified amount
of churn when rebuilding the schema for a new upstream version. I plan
to rebuild the schema for upstream version 3.7 soon, and I want to get
this merged beforehand. Being able to see exactly which APIs that
changes during a schema update will be more valuable then having the
convenience of the link.
  • Loading branch information
aiven-anton authored May 31, 2024
1 parent b7fc56f commit 2dd799a
Show file tree
Hide file tree
Showing 574 changed files with 575 additions and 1,726 deletions.
9 changes: 2 additions & 7 deletions codegen/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,10 @@
from .parser import PrimitiveField
from .parser import parse_file

schema_repository_source: Final = (
f"https://github.com/apache/kafka"
f"/tree/{build_tag}/clients/src/main/resources/common/message/"
)
schema_repository_source: Final = "clients/src/main/resources/common/message/"
imports_and_docstring: Final = '''\
"""
Generated from {schema_source}.
{schema_repository_source}{schema_source}
Generated from ``{schema_repository_source}{schema_source}``.
"""
import datetime
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v1/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v1/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v2/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v2/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v3/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_offsets_to_txn/v3/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddOffsetsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddOffsetsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v1/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v1/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v2/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v2/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v3/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v3/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v4/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/add_partitions_to_txn/v4/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AddPartitionsToTxnResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json
Generated from ``clients/src/main/resources/common/message/AddPartitionsToTxnResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/allocate_producer_ids/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AllocateProducerIdsRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AllocateProducerIdsRequest.json
Generated from ``clients/src/main/resources/common/message/AllocateProducerIdsRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/allocate_producer_ids/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AllocateProducerIdsResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AllocateProducerIdsResponse.json
Generated from ``clients/src/main/resources/common/message/AllocateProducerIdsResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_client_quotas/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterClientQuotasRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterClientQuotasRequest.json
Generated from ``clients/src/main/resources/common/message/AlterClientQuotasRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_client_quotas/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterClientQuotasResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterClientQuotasResponse.json
Generated from ``clients/src/main/resources/common/message/AlterClientQuotasResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_client_quotas/v1/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterClientQuotasRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterClientQuotasRequest.json
Generated from ``clients/src/main/resources/common/message/AlterClientQuotasRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_client_quotas/v1/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterClientQuotasResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterClientQuotasResponse.json
Generated from ``clients/src/main/resources/common/message/AlterClientQuotasResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_configs/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterConfigsRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterConfigsRequest.json
Generated from ``clients/src/main/resources/common/message/AlterConfigsRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_configs/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterConfigsResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterConfigsResponse.json
Generated from ``clients/src/main/resources/common/message/AlterConfigsResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_configs/v1/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterConfigsRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterConfigsRequest.json
Generated from ``clients/src/main/resources/common/message/AlterConfigsRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_configs/v1/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterConfigsResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterConfigsResponse.json
Generated from ``clients/src/main/resources/common/message/AlterConfigsResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_configs/v2/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterConfigsRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterConfigsRequest.json
Generated from ``clients/src/main/resources/common/message/AlterConfigsRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_configs/v2/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterConfigsResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterConfigsResponse.json
Generated from ``clients/src/main/resources/common/message/AlterConfigsResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionRequest.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionResponse.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v1/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionRequest.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v1/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionResponse.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v2/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionRequest.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionRequest.json``.
"""

import uuid
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v2/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionResponse.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionResponse.json``.
"""

import uuid
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v3/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionRequest.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionRequest.json``.
"""

import uuid
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition/v3/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionResponse.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionResponse.json``.
"""

import uuid
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition_reassignments/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionReassignmentsRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionReassignmentsRequest.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionReassignmentsRequest.json``.
"""

import datetime
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_partition_reassignments/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterPartitionReassignmentsResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterPartitionReassignmentsResponse.json
Generated from ``clients/src/main/resources/common/message/AlterPartitionReassignmentsResponse.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_replica_log_dirs/v0/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterReplicaLogDirsRequest.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterReplicaLogDirsRequest.json
Generated from ``clients/src/main/resources/common/message/AlterReplicaLogDirsRequest.json``.
"""

from dataclasses import dataclass
Expand Down
4 changes: 1 addition & 3 deletions src/kio/schema/alter_replica_log_dirs/v0/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Generated from AlterReplicaLogDirsResponse.json.
https://github.com/apache/kafka/tree/3.6.0/clients/src/main/resources/common/message/AlterReplicaLogDirsResponse.json
Generated from ``clients/src/main/resources/common/message/AlterReplicaLogDirsResponse.json``.
"""

from dataclasses import dataclass
Expand Down
Loading

0 comments on commit 2dd799a

Please sign in to comment.