Implement function to make users to admins
Opened this issue · 8 comments
waiting for k4cg/matomat-service#11
Not blocked anymore as far as I can see
The problem is: I don't how to "sync" the API or update the auto generated swagger files.
Can we add some documentation for this?
@blarz the command to update the swagger_client is
swagger-codegen generate -i https://raw.githubusercontent.com/k4cg/matomat-service/master/maas.yml -l python -o .
I dont know where to document this, as README.md is getting overwritten everytime we do the update. New File?
Brr I think I got it running, thanks. Will open a PR after cleaning the diff
@blarz I just fixed a typo in the MaaS API definition file 'maas.yml' in the MaaS project. Perhaps the issue is related to it. (Any client generated with the broken maas.yml
will probably be dysfunctional)
@blarz I just fixed a typo in the MaaS API definition file 'maas.yml' in the MaaS project. Perhaps the issue is related to it. (Any client generated with the broken
maas.yml
will probably be dysfunctional)
@dagonc So I tried it and regenerated the API with the latest version of maas.yml, but it is still broken.
The problem I'm seeing is that auth_login_post
returns a list of AuthSuccess
elemets.
Printing all of them gives me three "empty" AuthSuccess elements, like this
[{'expires': None, 'token': None, 'user': None},
{'expires': None, 'token': None, 'user': None},
{'expires': None, 'token': None, 'user': None}]
Used like this:
auth = auth_client.auth_login_post(user, password, validityseconds=42)
pprint.pprint(auth)
exit(1)