Skip to content

Conversation

@MellyGray
Copy link
Contributor

@MellyGray MellyGray commented Jun 13, 2023

What this PR does / why we need it:

This PR adds the CitationMetadataBlock interface to define the expected citation metadata fields. This way any user accessing the dataset data through the js-dataverse module knows what to expect from the citation metadata fields.

We need this because the Citation Metadata contains required metadata fields, so they need to be declared in order to create a new dataset using the js-dataverse module. And in order to declare those fields, the user needs to know which are these required fields.

This does not apply to the other metadata blocks because the other metadata blocks are optional

Which issue(s) this PR closes:

Special notes for your reviewer:

This PR doesn't add any modification to the behaviour of the use cases, it just adds a type definition, so everything should be working as it used to

Suggestions on how to test this:

  1. npm run build
  2. Go to dist/datasets/domain/models/Dataset.d.ts
  3. You can see that the type definition includes the the definition of the Citation Metadata fields so any user of the js-dataverse module is now able to know what to expect from this metadata block. export type DatasetMetadataBlocks = [CitationMetadataBlock, ...DatasetMetadataBlock[]];

Is there a release notes update needed for this change?:

No

Additional documentation:

@MellyGray MellyGray added the Size: 3 A percentage of a sprint. 2.1 hours. label Jun 14, 2023
@MellyGray MellyGray changed the title 65 - Add CitationMetadataBlock interface 65 - Add CitationMetadataBlock type description Jun 14, 2023
@ekraffmiller ekraffmiller self-assigned this Jun 15, 2023
@GPortas GPortas force-pushed the 65-modify-the-dataset-type-description-to-explicitly-declare-the-citation-metadata-fields branch from eb475fc to 5dfc70a Compare June 19, 2023 14:11
Copy link
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

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

I ran the local build and I can see the CitationMetadataBlock in Dataset.d.ts. Approved 👍

@kcondon kcondon self-assigned this Jun 20, 2023
@kcondon kcondon merged commit a27e3b9 into develop Jun 21, 2023
@kcondon kcondon deleted the 65-modify-the-dataset-type-description-to-explicitly-declare-the-citation-metadata-fields branch June 21, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: 3 A percentage of a sprint. 2.1 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modify the dataset type description to explicitly declare the citation metadata fields

4 participants