Skip to content

Resource create api#125

Open
jwalz wants to merge 11 commits into
artifact_serializerfrom
resource_create_api
Open

Resource create api#125
jwalz wants to merge 11 commits into
artifact_serializerfrom
resource_create_api

Conversation

@jwalz

@jwalz jwalz commented Jul 20, 2022

Copy link
Copy Markdown
Owner

Purpose

Add the ResourceList endpoint with POST functionality

Changes

  • Add ResourceList View
    • Inspect the request's data to identify the Registration being POSTed to
  • Add create functionality to ResourceSerializer
    • The first time a Resource is POSTed to a Registration, create the backing Outcome as well
    • Subsequent Resources should just be added to the same Outcome
  • Make identifier NULLable on the OutcomeArtifact
    • Necessary, as POST does not include the pid information, just the Registration

QA Notes

The Registration being POSTed to requires an Identifier, otherwise we cannot create the PRIMARY OutcomeArtifact. Right now, Registrations only get an Identifier when they are made public. That means EMBARGOED Registrations cannot have Resources.

I suggest we create an empty Identifier for each Registration once it is approved and wait to mint the actual DOI until it becomes public, but that can be a follow-on PR (note that this will not create wasted Identifiers, as, under existing workflows, every approved registration is guaranteed to become public).

Documentation

Side Effects

Ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant