-
Notifications
You must be signed in to change notification settings - Fork 5
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
Set up openapi spec #10
Comments
Was able to generate an API client with this invoke task: @task
def codegen(ctx: Context, openapi_url: Optional[str] = "https://app.arcee.ai/api/openapi.json") -> None:
"""codegen
Generate code from Arcee's OpenAPI spec
"""
ctx.run(
"uv pip install --upgrade openapi-python-client",
pty=True,
echo=True,
)
ctx.run(
f"openapi-python-client generate --url {openapi_url} \
--meta none \
--overwrite \
--no-fail-on-warning \
--config openapi-config.yml \
--output-path arcee/codegen",
pty=True,
echo=True,
)
# Format the generated code
ctx.run(
"black arcee/codegen",
pty=True,
echo=True,
)
ctx.run(
"ruff check arcee/codegen --fix --fix-only",
pty=True,
echo=True,
) |
Oh sorry @nason, I didn't realize this was still active! I only looked at the date of the initial comment and assumed it was dead, but now I see your comment was from last week. (was just trying to clean up the inactive issues a bit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/openapi-generators/openapi-python-client
The text was updated successfully, but these errors were encountered: