Coder Social home page Coder Social logo

client-python's Introduction

client-python's People

Contributors

aeneasr avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

client-python's Issues

metadata_public returns null and data type verification fails

Describe the bug

Our users have no "metadata_public", so when we do "to_session" call we receive back "metadata_public":null
Python Client fails as it is expecting Dict in return.

Looks as "metadata_public" and "metadata_admin" have to be declared as "traits" in the:
https://github.com/ory/client-python/blob/master/ory_client/model/identity.py

Current version:
'traits': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
'metadata_admin': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
'metadata_public': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501

Should be:
'traits': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
'metadata_admin': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
'metadata_public': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501

Possible it have to be done on level of schema to apply automatically to all the future client recreation.

Reproducing the bug

Using ory-client==0.2.0a60 make request "to_session"

Relevant log output
ory_client.exceptions.ApiTypeError: Invalid type for variable 'metadata_public'. Required value type is dict and passed type was NoneType at ['received_data']['identity']['metadata_public']

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.