Remove copyright header and ensure flexibility in VolumeConfig by allowing extra fields

This commit is contained in:
2025-06-18 04:47:48 +02:00
parent 6a70beb156
commit c8e262a736

View File

@ -1,6 +1,3 @@
# Copyright (c) 2023, the Compose project contributors.
# SPDX-License-Identifier: GPL-3.0-or-later
"""Docker Compose YAML file generator.
This package provides utilities for programmatically creating and managing Docker Compose
@ -51,6 +48,9 @@ class VolumeConfig(BaseModel):
labels: dict[str, str] | list[str] | None = None
name: str | None = None
# Allow extra fields for flexibility and to support arbitrary Docker Compose extensions.
model_config = {"extra": "allow"}
class NetworkConfig(BaseModel):
"""Represents a network configuration for a Docker Compose file."""