Skip to content

REST mappings: source_contact_info is ignored on POST /mappings #206

Description

@jvendetti

POST /mappings accepts source_contact_info in the JSON request body, but the value isn't persisted on the created mapping process.

Steps to reproduce

Send a request like:

curl -i -X POST 'https://data.bioontology.org/mappings' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: apikey token=xxx' \
  -d '{
    "classes": {
      "http://www.co-ode.org/ontologies/pizza/pizza.owl#Pizza": "TESTONTJV",
      "http://www.co-ode.org/ontologies/pizza/pizza.owl#CheeseyPizza": "JVTESTONT1"
    },
    "relation": "http://www.w3.org/2004/02/skos/core#exactMatch",
    "creator": "vendetti",
    "source_contact_info": "jane.doe@stanford.edu",
    "source_name": "Manually generated",
    "comment": "Test mapping created with curl"
  }'

Expected behavior

process.source_contact_info should be "jane.doe@stanford.edu".

Actual behavior

The request returns 201 Created, but process.source_contact_info is null.

Response excerpt:

{
  "process": {
    "name": "REST Mapping",
    "creator": "https://data.bioontology.org/users/vendetti",
    "source": null,
    "relation": "http://www.w3.org/2004/02/skos/core#exactMatch",
    "source_contact_info": null,
    "source_name": "Manually generated",
    "comment": "Test mapping created with curl"
  }
}

The POST handler copies only source, source_name, and comment into the MappingProcess, but not source_contact_info.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions