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

[Serve] Expose FastAPI docs path #32878

Closed
zcin opened this issue Feb 27, 2023 · 1 comment
Closed

[Serve] Expose FastAPI docs path #32878

zcin opened this issue Feb 27, 2023 · 1 comment
Assignees
Labels
enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks serve Ray Serve Related Issue

Comments

@zcin
Copy link
Contributor

zcin commented Feb 27, 2023

Description

Serve integrates with FastAPI. It would be helpful if the OpenAPI docs path can be exposed / queried.

Use case

app = FastAPI(docs_url="/my_docs")

@serve.deployment
@serve.ingress(app)
class MyFastAPIDeployment:
    ...

client = serve.start()
handle = serve.run(MyFastAPIDeployment.bind(), name="app1", route_prefix="/app1")

In a separate client:

resp = requests.get("/api/serve/applications")
docs_path = extract_fastapi_docs_path(resp)
# Do something, like render openapi docs...
@zcin zcin added enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks serve Ray Serve Related Issue labels Feb 27, 2023
@zcin zcin self-assigned this Mar 28, 2023
@zcin
Copy link
Contributor Author

zcin commented Mar 28, 2023

Closed with #32863.

@zcin zcin closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks serve Ray Serve Related Issue
Projects
None yet
Development

No branches or pull requests

1 participant