Skip to content

Commit

Permalink
Merge pull request #15 from koopjs/b/2649-scrub-distribution-no-distr…
Browse files Browse the repository at this point in the history
…ibutions

Scrub attempts to overwrite 'distribution' rather than 'distributions'
  • Loading branch information
sonofflynn89 authored Dec 16, 2021
2 parents 76b0c37 + 9c708ca commit 3c30129
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG.md

## Unreleased

Fixed
- Scrub attempts to overwrite `distribution` rather than `distributions` [#15](https://github.com/koopjs/koop-output-dcat-us-11/pull/15)

## 1.4.1
Fixed
- Add proper error status [#14](https://github.com/koopjs/koop-output-dcat-us-11/pull/14)
Expand Down
2 changes: 1 addition & 1 deletion src/dcat-us/dataset-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function scrubProtectedKeys (customizations: DcatDatasetTemplate): DcatDatasetTe
if (scrubbedCustomizations.contactPoint) {
delete scrubbedCustomizations.contactPoint['@type'];
}
delete scrubbedCustomizations.distributions;
delete scrubbedCustomizations.distribution;
}

return scrubbedCustomizations;
Expand Down
2 changes: 1 addition & 1 deletion src/dcat-us/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('generating DCAT-US 1.1 feed', () => {
identifier: '{{name}}',
landingPage: '{{name}}',
webService: '{{name}}',
distributions: '{{name}}',
distribution: '{{name}}',
contactPoint: {
'@type': '{{name}}',
fn: '{{owner}}',
Expand Down

0 comments on commit 3c30129

Please sign in to comment.