Skip to content

Commit

Permalink
Resolve PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
meghanmae committed Aug 12, 2024
1 parent 60485ea commit 5d67c9a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 35 deletions.
2 changes: 1 addition & 1 deletion docs/modeling/model-components/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The displayed name and description of a property, as well as the order in which
The displayed name of a property can also be set via the `[DisplayName]` attribute.

### [Description]
The description of a class.
The description of a type, such as a class, property, method, or parameter.

### [Required]

Expand Down
31 changes: 0 additions & 31 deletions playground/Coalesce.Web.Vue3/src/metadata.g.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,15 @@ private void WriteCommonClassMetadata(TypeScriptCodeBuilder b, ClassViewModel mo
{
b.StringProp("name", model.ClientTypeName);
b.StringProp("displayName", model.DisplayName);
b.StringProp("description", model.GetAttributeValue<DescriptionAttribute>(a => a.Description));


var description = model.GetAttributeValue<DescriptionAttribute>(a => a.Description)
?? model.GetAttributeValue<DisplayAttribute>(a => a.Description);

if (!string.IsNullOrWhiteSpace(description))
{
b.StringProp("description", description);
}

if (model.ListTextProperty != null)
{
// This might not be defined for external types, because sometimes it just doesn't make sense. We'll accommodate on the client.
Expand Down
1 change: 0 additions & 1 deletion src/coalesce-vue/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export interface ModelType extends CustomReferenceTypeBase, ApiRoutedType {
export interface DataSourceType extends Metadata {
readonly type: "dataSource";
readonly isDefault?: true;
readonly description?: string;

/** The parameters of the data source.
* Stored as `props` so it can be treated like a ModelType/ObjectType in many cases.
Expand Down
Loading

0 comments on commit 5d67c9a

Please sign in to comment.