Skip to content

Commit

Permalink
VCST-1921: Extend asset schema with description property (#16)
Browse files Browse the repository at this point in the history
feat: Extends asset schema with a description property.
feat: Extends image schema  with a description property.
  • Loading branch information
OlegoO authored Oct 4, 2024
1 parent 4916d47 commit 0c3a375
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/module-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ jobs:
echo "Jira Upload Build Info response: ${{ steps.push_build_info_to_jira.outputs.response }}"
module-katalon-tests:
if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push') && (needs.ci.outputs.run-e2e == 'true')) ||
(github.event_name == 'workflow_dispatch')}}
# if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push') && (needs.ci.outputs.run-e2e == 'true')) ||
# (github.event_name == 'workflow_dispatch')}}
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'dev') }}
needs: 'ci'
uses: VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.9

Expand Down
13 changes: 7 additions & 6 deletions src/VirtoCommerce.XCatalog.Core/Schemas/AssetType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ public AssetType()

Field(x => x.Id, nullable: false).Description("The unique ID of the asset.");
Field(x => x.Name, nullable: true).Description("The name of the asset.");
Field(x => x.MimeType, nullable: true).Description("MimeType of the asset.");
Field(x => x.Size, nullable: false).Description("Size of the asset.");
Field(x => x.Url, nullable: false).Description("Url of the asset.");
Field(x => x.RelativeUrl, nullable: true).Description("RelativeUrl of the asset.");
Field(x => x.TypeId, nullable: false).Description("Type id of the asset.");
Field(x => x.Group, nullable: true).Description("Group of the asset.");
Field(x => x.MimeType, nullable: true).Description("The MIME type of the asset.");
Field(x => x.Size, nullable: false).Description("The size of the asset in bytes.");
Field(x => x.Url, nullable: false).Description("The URL of the asset.");
Field(x => x.RelativeUrl, nullable: true).Description("The relative URL of the asset.");
Field(x => x.TypeId, nullable: false).Description("The type ID of the asset.");
Field(x => x.Group, nullable: true).Description("The group of the asset.");
Field(x => x.Description, nullable: true).Description("The description of the asset.");
Field<StringGraphType>("cultureName",
"Culture name",
resolve: context => context.Source.LanguageCode);
Expand Down
13 changes: 8 additions & 5 deletions src/VirtoCommerce.XCatalog.Core/Schemas/ImageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,29 @@ public class ImageType : ObjectGraphType<Image>
public ImageType()
{
Field<NonNullGraphType<StringGraphType>>("id",
"Image ID",
"The unique ID of the image",
resolve: context => context.Source.Id);
Field<StringGraphType>("name",
"Image name",
"The name of the image",
resolve: context => context.Source.Name);
Field<StringGraphType>("group",
"Image group",
"The group of the image",
resolve: context => context.Source.Group);
Field<NonNullGraphType<StringGraphType>>("url",
"Image URL",
"The URL of the image",
resolve: context => context.Source.Url);
Field<StringGraphType>("relativeUrl",
"Image relative URL",
"The relative URL of the image",
resolve: context => context.Source.RelativeUrl);
Field<NonNullGraphType<IntGraphType>>("sortOrder",
"Sort order",
resolve: context => context.Source.SortOrder);
Field<StringGraphType>("cultureName",
"Culture name",
resolve: context => context.Source.LanguageCode);
Field<StringGraphType>("description",
"The description of the image",
resolve: context => context.Source.Description);
}
}
}

0 comments on commit 0c3a375

Please sign in to comment.