-
Notifications
You must be signed in to change notification settings - Fork 0
Integrate open api spec #4
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
Conversation
| This requires [openapi-generator](https://github.com/OpenAPITools/openapi-generator) installed | ||
|
|
||
| ``` | ||
| brew install openapi-generator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mainly a macOS thing right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, gotta add instructions for other operating systems at some point, but I think all of us internally would figure it out anyway
| This requires [openapi-merge-cli](https://www.npmjs.com/package/openapi-merge-cli) installed globally | ||
|
|
||
| ``` | ||
| npm i -g openapi-merge-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we install something needed for the python package with the npm installer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
necessary for the client generation
| question="Who should be president?", | ||
| categories=["Kamala Harris", "Donald Trump"], | ||
| options=["Kamala Harris", "Donald Trump"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change this example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happening in the pr up the chain:
https://github.com/RapidataAI/rapidata-python/pull/5/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be in the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is the basis for the generated python client, which is why I would track this file
| result = identity_api.identity_get_client_auth_token_post( | ||
| client_id=client_id, | ||
| _headers={"Authorization": f"Basic {client_secret}"}, | ||
| ) | ||
|
|
||
| client_configuration.api_key["bearer"] = f"Bearer {result.auth_token}" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do? These things are not assigned to self, how does that work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it still points to the configuration that was passed to the api_client on initialization, therefore updated it. Would generating a new client be cleaner?
Uploading images using the generated dataset_api currently only works when generating based on this PR:
OpenAPITools/openapi-generator#19329