class Shelf(msgspec.Struct):
book_count: int = msgspec.field(name="bookCount")
# if i set this struct as return type for endpoint, it would use 'bookCount' for both openapi schema and response serialization
class Shelf(Serializer):
book_count: int = field(alias="bookCount", title="bookCount")
# but if return type is a serializer - both openapi schema and response would use 'book_count'