Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
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
12 changes: 11 additions & 1 deletion lib/cloud-assembly/metadata-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,24 @@ export type LogicalIdMetadataEntry = string;
*/
export type StackTagsMetadataEntry = Tag[];

/**
* Any other type of metadata entry
*
* This could probably be changed to `any`, but it's safer not
* to do so right now.
* See https://github.com/cdklabs/cloud-assembly-schema/pull/121.
*/
export type PrimitiveType = boolean | number | string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really wanted to put a comment here, but its just too nasty to explain. An entire PR is needed to understand why this is necessary.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link the PR as a code comment? Just an idea.


/**
* Union type for all metadata entries that might exist in the manifest.
*/
export type MetadataEntryData =
| AssetMetadataEntry
| LogMessageMetadataEntry
| LogicalIdMetadataEntry
| StackTagsMetadataEntry;
| StackTagsMetadataEntry
| PrimitiveType;

/**
* Type of artifact metadata entry.
Expand Down
6 changes: 5 additions & 1 deletion schema/cloud-assembly.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@
}
},
{
"type": "string"
"type": [
"string",
"number",
"boolean"
]
},
{
"description": "Free form data."
Expand Down
2 changes: 1 addition & 1 deletion schema/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"schemaHash": "f0ccc3212331af8a1c75830878d218fd667e5957063831be3b5bfd803b25f0cc",
"schemaHash": "bf762e5da559c685e06892ef65fdfc33d1c4bd53d4eb07d4a326d476ac58ae25",
"revision": 39
}
Loading