Schemas for `op`'s JSON responses?

zcutlip
zcutlip
Community Member

I think someone asked this before, but maybe the situation has changed. Are there schemas or other validation mechanisms for op's JSON responses? I'm doing a fair amount of hard-coded validation in my pyonepassword project. It's pretty unwieldy (and probably not correct), so it'd be nice to strip some of that out.

I'm trying to be robust against a few scenarios:

  • someone hands my API me a JSON blob that got broken after it came out of op
  • the schema for the JSON changes and I need to catch that easily and update my code
  • and a few others, such as me just making bone-headed mistakes

1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • ag_yaron
    ag_yaron
    1Password Alumni

    Hey @zcutlip ,

    The CLI currently does not have any output schema or other validation mechanism for its output.

  • Ryan Parman
    Ryan Parman
    Community Member

    Could it be added?

  • ag_yaron
    ag_yaron
    1Password Alumni

    I've notified the team about it so they can consider it as a feature request :)

This discussion has been closed.