Schemas for `op`'s JSON responses?

zcutlipzcutlip Junior 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_yaronag_yaron

    Team Member

    Hey @zcutlip ,

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

  • Could it be added?

  • ag_yaronag_yaron

    Team Member

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

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file