nlpsandbox / nlpsandbox-client

Python client to interact with the NLP Sandbox
Apache License 2.0
3 stars 3 forks source link

Update to schemas pr-262 #209

Open tschaffter opened 2 years ago

tschaffter commented 2 years ago

Update SDK

The schemas pr-262 adds API key authentication to the data node.

rm -fr docs nlpsandbox test
npx @openapitools/openapi-generator-cli generate -g python -o . --package-name nlpsandbox -i https://nlpsandbox.github.io/nlpsandbox-schemas/_internal/nlpsandbox/pr-262/openapi.json

Note: I noticed that the openapi generator generates the folder test and docs with the above command. Therefore I removed these folders manually before running openapi generator. We may want to do the same in the GH workflow that update the code base. This workflow currently only deleted the folder nlpsandbox.

Update client API

@thomasyu888 Can you please take it from there to update the client API? You will need a local instance of the data node from this PR/branch to test the client. The README of the data node should allow you to do so easily once you have checked out the branch. You can start by testing a DELETE endpoint, which does not requires you to seed the data node.

tschaffter commented 2 years ago

@thomasyu888 Did the tests generated by openapi-generator work out of the box usually?

thomasyu888 commented 2 years ago

@tschaffter This introduces things that make the tools not backwards compatible. The tests also don't work out of the box - we have to fill it in manually.