Skip to content

Commit

Permalink
ci(workflow): add pull request trigger sdk generation and cleanup art…
Browse files Browse the repository at this point in the history
…ifacts step (#1609)

* ci(workflow): add pull request trigger sdk generation and cleanup artifacts step

* fix sdk generation error

* change @ApiProperty to use single type with isArray flag
  • Loading branch information
Junjiequan authored Jan 8, 2025
1 parent 72e5d9b commit e4a6903
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/upload-sdk-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- master
pull_request:
branches:
- master

env:
NODE_VERSION: 20.x
Expand Down Expand Up @@ -75,6 +78,17 @@ jobs:
)
- uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: sdk-${{ matrix.generator }}-${{ github.sha }}
path: ./sdk

cleanup-artifacts:
runs-on: ubuntu-latest
needs:
- generate-and-upload-sdk
if: github.event_name != 'push'
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: swagger-*
23 changes: 15 additions & 8 deletions src/datasets/dto/update-dataset.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ export class UpdateDatasetDto extends OwnableDto {
readonly validationStatus?: string;

@ApiProperty({
type: [String],
type: String,
isArray: true,
required: false,
description:
"Array of tags associated with the meaning or contents of this dataset. Values should ideally come from defined vocabularies, taxonomies, ontologies or knowledge graphs.",
Expand Down Expand Up @@ -226,7 +227,8 @@ export class UpdateDatasetDto extends OwnableDto {

// it needs to be discussed if this fields is managed by the user or by the system
@ApiProperty({
type: [String],
type: String,
isArray: true,
required: false,
default: [],
description: "List of users that the dataset has been shared with.",
Expand Down Expand Up @@ -291,7 +293,7 @@ export class UpdateDatasetDto extends OwnableDto {
readonly dataQualityMetrics?: number;

@ApiProperty({
type: [String],
type: String,
required: false,
isArray: true,
description:
Expand Down Expand Up @@ -342,7 +344,8 @@ export class UpdateDatasetDto extends OwnableDto {
readonly dataFormat?: string;

@ApiProperty({
type: [String],
type: String,
isArray: true,
required: false,
description:
"ID of the proposal or proposals which the dataset belongs to.<br>This dataset might have been acquired under the listed proposals or is derived from datasets acquired from datasets belonging to the listed datasets.",
Expand All @@ -354,7 +357,8 @@ export class UpdateDatasetDto extends OwnableDto {
readonly proposalIds?: string[];

@ApiProperty({
type: [String],
type: String,
isArray: true,
required: false,
description:
"ID of the sample or samples used when collecting the data included or used in this dataset.",
Expand All @@ -366,7 +370,8 @@ export class UpdateDatasetDto extends OwnableDto {
readonly sampleIds?: string[];

@ApiProperty({
type: [String],
type: String,
isArray: true,
required: false,
description:
"ID of the instrument or instruments where the data included or used in this datasets was collected on.",
Expand All @@ -378,7 +383,8 @@ export class UpdateDatasetDto extends OwnableDto {
readonly instrumentIds?: string[];

@ApiProperty({
type: [String],
type: String,
isArray: true,
required: false,
description:
"Array of input dataset identifiers used in producing the derived dataset. Ideally these are the global identifier to existing datasets inside this or federated data catalogs.",
Expand All @@ -390,7 +396,8 @@ export class UpdateDatasetDto extends OwnableDto {
readonly inputDatasets?: string[];

@ApiProperty({
type: [String],
type: String,
isArray: true,
required: false,
description:
"A list of links to software repositories which uniquely identifies the pieces of software, including versions, used for yielding the derived data.",
Expand Down

0 comments on commit e4a6903

Please sign in to comment.