Slackbot
04/25/2023, 12:42 AMChaoyu
04/25/2023, 1:42 AMfrom_sample
method to provide an example input! This way it shows up on the swagger UI nicelyChaoyu
04/25/2023, 1:43 AM@svc.api(..)
def predict(..):
"""
Description for the predict endpoint goes here..
"""
Chaoyu
04/25/2023, 1:44 AMsauyon
04/25/2023, 2:22 AMfrom_sample
in your IO descriptor, it should display that in the UI.
2.
svc.api(..., doc="documentation")
should do the trick!sauyon
04/25/2023, 2:38 AMJack Norman
04/25/2023, 3:04 AMJack Norman
04/25/2023, 3:05 AMWe are also considering allow advanced users to customize the generated API docs via a extra_fields json blob, does that sound like what you’re looking for?@Chaoyu yes, that does sound like what i’m looking for as a nice-to-have
Chaoyu
04/25/2023, 3:05 AMinput=JSON.from_sample({'sample': [1,2,3]}, pydantic_model=MyModel)
Jack Norman
04/25/2023, 3:06 AMJack Norman
04/25/2023, 3:07 AM