Skip to content

owners remove/ add response does not fit documentation #12056

Closed
@2ndDerivative

Description

@2ndDerivative

Problem

The Registry Web API documentation says the Owner --remove command needs a JSON object

{
    "ok":true
}

even though it needs the same OwnerResponse object as the add command, which also has a msg field.
This causes registries that fit the documentation API to error out the user for an incomplete JSON when removing a user.

Steps

Respond to the Owner remove API request with a JSON object without the "msg" field.
Cargo will error out with

error: failed to remove owners from crate `[crate-name]` on registry at [endpoint]

Caused by:
  missing field `msg` at line 1 column 11

Possible Solution(s)

Either the OwnerResponse object should probably be split into AddResponse and RemoveResponse to fit the documentation, or the msg field on the remove method should be used, or the msg field should be made optional.

Notes

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documenting-cargo-itselfArea: Cargo's documentationA-interacts-with-crates.ioArea: interaction with registriesC-bugCategory: bugE-easyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions