diff --git a/docs/reference/lang/tour.md b/docs/reference/lang/tour.md index 363b01af..debc171b 100644 --- a/docs/reference/lang/tour.md +++ b/docs/reference/lang/tour.md @@ -3114,7 +3114,7 @@ _model2 = Model { backend.k ```python -import yaml +import manifests schema Backend: apiVersion: str = "v1" @@ -3136,7 +3136,8 @@ _backends = [Backend { spec.selector.matchLabels: model.labels spec.replicas = model.replicas } for model in Model.instances()] # Schema Model is defined in model.k -print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends])) + +manifests.yaml_stream(_backends) ``` The command is diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md index c43c9a7e..c724d2bc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md @@ -3043,7 +3043,7 @@ _model2 = Model { backend.k ```python -import yaml +import manifests schema Backend: apiVersion: str = "v1" @@ -3065,7 +3065,8 @@ _backends = [Backend { spec.selector.matchLabels: model.labels spec.replicas = model.replicas } for model in Model.instances()] # Schema Model is defined in model.k -print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends])) + +manifests.yaml_stream(_backends) ``` 命令为: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md index c43c9a7e..c724d2bc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md @@ -3043,7 +3043,7 @@ _model2 = Model { backend.k ```python -import yaml +import manifests schema Backend: apiVersion: str = "v1" @@ -3065,7 +3065,8 @@ _backends = [Backend { spec.selector.matchLabels: model.labels spec.replicas = model.replicas } for model in Model.instances()] # Schema Model is defined in model.k -print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends])) + +manifests.yaml_stream(_backends) ``` 命令为: diff --git a/versioned_docs/version-0.10/reference/lang/tour.md b/versioned_docs/version-0.10/reference/lang/tour.md index 363b01af..debc171b 100644 --- a/versioned_docs/version-0.10/reference/lang/tour.md +++ b/versioned_docs/version-0.10/reference/lang/tour.md @@ -3114,7 +3114,7 @@ _model2 = Model { backend.k ```python -import yaml +import manifests schema Backend: apiVersion: str = "v1" @@ -3136,7 +3136,8 @@ _backends = [Backend { spec.selector.matchLabels: model.labels spec.replicas = model.replicas } for model in Model.instances()] # Schema Model is defined in model.k -print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends])) + +manifests.yaml_stream(_backends) ``` The command is