Skip to content

Commit

Permalink
generate_docs() for conditionalCreateOnlyProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
PatMyron committed Apr 28, 2021
1 parent 5435570 commit 57104b1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rpdk/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,11 @@ def _set_docs_properties( # noqa: C901
and proppath_ptr in self.schema["createOnlyProperties"]
):
prop["createonly"] = True

if (
"conditionalCreateOnlyProperties" in self.schema
and proppath_ptr in self.schema["conditionalCreateOnlyProperties"]
):
prop["conditionalCreateOnly"] = True
if (
"readOnlyProperties" in self.schema
and proppath_ptr in self.schema["readOnlyProperties"]
Expand Down
3 changes: 3 additions & 0 deletions src/rpdk/core/templates/docs-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ _Pattern_: <code>{{ prop.pattern }}</code>
{% if prop.createonly %}

_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
{% elif prop.conditionalCreateOnly %}

_Update requires_: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)
{% else %}

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
Expand Down
3 changes: 3 additions & 0 deletions src/rpdk/core/templates/docs-subproperty.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ _Pattern_: <code>{{ prop.pattern }}</code>
{% if prop.createonly %}

_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
{% elif prop.conditionalCreateOnly %}

_Update requires_: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)
{% else %}

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
Expand Down

0 comments on commit 57104b1

Please sign in to comment.