CDLUC3 / dmsp_aws_prototype

Sceptre CloudFormation templates for DMPHub v2
MIT License
1 stars 0 forks source link

Update DMP versioning logic #22

Closed briri closed 1 year ago

briri commented 1 year ago

Remove the versioning logic from the dmp_updater.rb in the Lambda layer and into its own dmp_versioner.rb.

This new file should have 2 methods.

Modify the getDmp Lambda function to call versions and append the results to a dmphub_versions section of the root of the DMP JSON.

  "dmphub_versions": [
      { 
        "timestamp": "2022-01-28T17:52:14+00:00", 
        "url": "https://example.com/api/v0/dmps/10.12345/ABCDEFG?version=2022-01-28T17:52:14+00:00"
      },
      { 
        "timestamp": "2022-11-13T08:33:10+00:00", 
        "url": "https://example.com/api/v0/dmps/10.12345/ABCDEFG?version=2022-11-13T08:33:10+00:00"
      },
      { 
        "timestamp": "2021-11-08T19:06:04+00:00", 
        "url": "https://example.com/api/v0/dmps/10.12345/ABCDEFG?version=2021-11-08T19:06:04+00:00"
      }
    ]