Skip to content

[BUG] API doc incorrect (create source) #438

Description

@mfoos

Describe the bug
The API doc informs users that "name" and "contact_email" are the required body fields, however in the code an undocumented "url" field is also required.

To Reproduce

import requests

base_url = "http://127.0.0.1:5001/api/v1/"
url = base_url + "sources"

payload = {
"name": "Testy McTestface",
"contact_email": "testy.mctestface@gmail.com"
}

headers = {
"accept": "application/json",
"content-type": "application/json",
"Authorization": "Bearer {0}".format(token)
}

response = requests.post(url, headers=headers, json=payload)

returns error

{
"message": "Failed to create source. Please include all of the following",
"status": "error"
}

@DMalone87

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions