Skip to content
Merged
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 @@ -7,7 +7,7 @@

from pydantic import BaseModel, Field

from cloud_common.schemas.service_config.aos_types import (
from cloud_common.schemas.item_config.aos_types import (
UnitDevice,
RunParameters,
ServiceQuotas,
Expand All @@ -16,18 +16,18 @@
)


class AosConfigSchema(BaseModel):
class AosItemConfigSchema(BaseModel):
"""
Aos service config schema.
Aos item config schema.

This schema describes the specification of the `aosService` layer in a service.
This schema describes the specification of the `aosItemConfig` layer.
"""

created: Annotated[
datetime,
Field(
alias='created',
description='Timestamp when Aos service was created.',
description='Timestamp when Aos item config was created.',
),
]

Expand All @@ -36,7 +36,7 @@ class AosConfigSchema(BaseModel):
Field(
alias='author',
default=None,
description='Aos service author.',
description='Aos item config author.',
),
]

Expand Down
10 changes: 5 additions & 5 deletions src/generate-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from cloud_common.protocols.unit import base
from cloud_common.protocols.unit.v7.message import AosUnitMessageV7
from cloud_common.protocols.unit.v7.common import AosIdentity
from cloud_common.schemas.service_config.aos_config import AosConfigSchema
from cloud_common.schemas.item_config.aos_config import AosItemConfigSchema
from cloud_common.schemas.unit_update.aos_update import AosUpdateSchema
from cloud_common.protocols.unit.unit_config import UnitConfig
from cloud_common.schemas.v2.cloud_income import AosUploadMetaConfig
Expand Down Expand Up @@ -61,9 +61,9 @@ def generate_schema_v7() -> str:
return schema_filename


def generate_service_schema() -> str:
schema = AosConfigSchema.model_json_schema()
schema_filename = os.path.join(DOCS_BASE_DIR, 'aos-service-config.schema.json')
def generate_item_config_schema() -> str:
schema = AosItemConfigSchema.model_json_schema()
schema_filename = os.path.join(DOCS_BASE_DIR, 'aos-item-config.schema.json')
with open(schema_filename, 'wt') as file_handler:
file_handler.write(json.dumps(schema, indent=4))
file_handler.write('\n')
Expand Down Expand Up @@ -143,7 +143,7 @@ def both():
@cli.command()
def schemas():
schema_filenames = [
# generate_service_schema(),
# generate_item_config_schema(),
# generate_update_schema(),
# generate_unitconfig_schema(),
generate_cloud_income_schema(),
Expand Down