Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration status of the user can be unsubscribed #83

Open
mcico opened this issue Feb 25, 2024 · 0 comments
Open

Registration status of the user can be unsubscribed #83

mcico opened this issue Feb 25, 2024 · 0 comments

Comments

@mcico
Copy link

mcico commented Feb 25, 2024

Good Evening,

I was generating a python model based on the openai specification.
When I try to load a group into the model, I get the following error

pydantic_core._pydantic_core.ValidationError: 1 validation error for Group
members.0.registration_status
  Input should be 'confirmed', 'dummy' or 'invited' [type=enum, input_value='unsubscribed', input_type=str]

The registration status is defined like so in the schemas/user.yaml

  registration_status:
    type: string
    enum: [confirmed, dummy, invited]

However when I lookup the groups through the get_groups endpoint, I get the following group as an example

{
    'id': 0,
    'name': 'Ausgabe ohne Gruppe',
    'created_at': '2018-05-22T09:01:51Z',
    'updated_at': '2024-02-25T20:47:45Z',
    'members': [
        {
            'id': XXXXXXXXXXX,
            'first_name': 'XXXXXXXXXXXX',
            'last_name': 'XXXXXXXXXXXX',
            'picture': {
                'small': 'https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-orange43-50px.png',
                'medium': 'https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-orange43-100px.png',
                'large': 'https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-orange43-200px.png'
            },
            'custom_picture': False,
            'email': 'XXXXXXXXXX',
            'registration_status': 'unsubscribed',
            'balance': []
        }
    ],
    'simplify_by_default': False,
    'original_debts': [],
    'simplified_debts': [],
    'avatar': {
        'small': 'https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/v2021/avatar-nongroup-50px.png',
        'medium': 'https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/v2021/avatar-nongroup-100px.png',
        'large': 'https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/v2021/avatar-nongroup-200px.png',
        'xlarge': 'https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/v2021/avatar-nongroup-500px.png',
        'xxlarge': 'https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/v2021/avatar-nongroup-1000px.png',
        'original': None
    },
    'tall_avatar': {
        'xlarge': 'https://s3.amazonaws.com/splitwise/uploads/group/default_tall_avatars/avatar-nongroup-288px.png',
        'large': 'https://s3.amazonaws.com/splitwise/uploads/group/default_tall_avatars/avatar-nongroup-192px.png'
    },
    'custom_avatar': False,
    'cover_photo': {
        'xxlarge': 'https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-1000px.png',
        'xlarge': 'https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-500px.png'
    }
}

Can you check whether the schema definition is wrong or whether, something with the api is not correct?

cheers & thanks
marco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant