Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.50.0 #393

Merged
merged 2 commits into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions models/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type Metadata struct {
CSVHeader []string `json:"headers,omitempty"`
Version int `json:"version,omitempty"`
DatasetLinks *DatasetLinks `json:"dataset_links,omitempty"`
RelatedContent []GeneralDetails `json:"related_content,omitempty"`
}

// MetadataLinks represents a link object to list of metadata relevant to a version
Expand Down Expand Up @@ -134,19 +135,20 @@ func CreateMetaDataDoc(datasetDoc *Dataset, versionDoc *Version, urlBuilder *url
// note: logic to retrieve the newly-added Cantabular-specific fields to the Metadata model will be created at a later date
func CreateCantabularMetaDataDoc(d *Dataset, v *Version, urlBuilder *url.Builder) *Metadata {
m := &Metadata{
CSVHeader: v.Headers,
Description: d.Description,
Dimensions: v.Dimensions,
Downloads: v.Downloads,
Keywords: d.Keywords,
ReleaseDate: v.ReleaseDate,
Title: d.Title,
UnitOfMeasure: d.UnitOfMeasure,
Contacts: d.Contacts,
URI: d.URI,
QMI: d.QMI,
Version: v.Version,
DatasetLinks: d.Links,
CSVHeader: v.Headers,
Description: d.Description,
Dimensions: v.Dimensions,
Downloads: v.Downloads,
Keywords: d.Keywords,
ReleaseDate: v.ReleaseDate,
Title: d.Title,
UnitOfMeasure: d.UnitOfMeasure,
Contacts: d.Contacts,
URI: d.URI,
QMI: d.QMI,
Version: v.Version,
DatasetLinks: d.Links,
RelatedContent: d.RelatedContent,
}

m.Distribution = getDistribution(m.Downloads)
Expand Down