Skip to content

Argument validation #16

Open
Open

Description

@odinuv

Activity

  1. odinuv commented on Aug 28, 2017

    @odinuv
    MemberAuthor

    Some validation is in the table class e.g. https://github.com/keboola/sapi-python-client/blob/master/kbcstorage/tables.py#L61

    • looks ugly and is repetitive but works fairly well
    • the main thing to catch is that the provided values are of correct type (scalar/object/list), without any validation it is possible to pass an object instead of e.g. file_id which leads to very strange errors
    • there is slight twist in files, where id can be either a string or integer - it should be treated as string (to avoid int overflow), but the JSON response contains it as an integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions