Skip to content

Commit

Permalink
Rename schemas to use underscores
Browse files Browse the repository at this point in the history
The hyphens are illegal in schema names.
  • Loading branch information
jonathansick committed Jul 19, 2023
1 parent da155c1 commit 19b7a7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ook/domain/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Meta:
"""Metadata for the model."""

namespace = "lsst.square-events.ook"
schema_name = "url-ingest-key-v1"
schema_name = "url_ingest_key_v1"


class LtdEditionV1(AvroBaseModel):
Expand Down Expand Up @@ -91,4 +91,4 @@ class Meta:
"""Metadata for the model."""

namespace = "lsst.square-events.ook"
schema_name = "ltd-url-ingest-v1"
schema_name = "ltd_url_ingest_v1"
4 changes: 2 additions & 2 deletions tests/domain/test_kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
def test_url_ingest_key_v1() -> None:
"""Test ``UrlIngestKeyV1``."""
schema = json.loads(UrlIngestKeyV1.avro_schema())
assert schema["name"] == "url-ingest-key-v1"
assert schema["name"] == "url_ingest_key_v1"
assert schema["namespace"] == "lsst.square-events.ook"


def test_ltd_url_ingest_v1() -> None:
"""Test the ``LtdUrlIngestV1`` model."""
schema = json.loads(LtdUrlIngestV1.avro_schema())
assert schema["name"] == "ltd-url-ingest-v1"
assert schema["name"] == "ltd_url_ingest_v1"
assert schema["namespace"] == "lsst.square-events.ook"

0 comments on commit 19b7a7f

Please sign in to comment.