Skip to content

Instantly share code, notes, and snippets.

@lmazuel
Created July 20, 2022 18:01
Show Gist options
  • Save lmazuel/486b39e4a073f428dfd70dd034c26ccf to your computer and use it in GitHub Desktop.
Save lmazuel/486b39e4a073f428dfd70dd034c26ccf to your computer and use it in GitHub Desktop.
Smart CADL
enum AppConfigurationEventTypes {
modified;
deleted;
}
model AppConfigurationBase<TResource> {
@doc("The key used to identify the key-value that was {name}.", TResource)
key?: string;
@doc("The label, if any, used to identify the key-value that was {name}.", TResource)
label?: string;
}
@doc("Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueModified event.")
model AppConfigurationKeyValueModifiedEventData is AppConfigurationBase<AppConfigurationEventTypes.modified>;
@doc("Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueDeleted event.")
model AppConfigurationKeyValueDeletedEventData is AppConfigurationBase<AppConfigurationEventTypes.deleted>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment