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

Add pydantic model schema #1480

Closed
timothyjlaurent opened this issue Mar 3, 2021 · 3 comments
Closed

Add pydantic model schema #1480

timothyjlaurent opened this issue Mar 3, 2021 · 3 comments
Assignees

Comments

@timothyjlaurent
Copy link

Is your feature request related to a problem? Please describe.

I want to have robust input and output shema validation. Similar to what is achieved with FastAPI https://fastapi.tiangolo.com/.

Describe the solution you'd like

Add support to the JsonInput to:

  1. Accept lists of json items natively - allows for hitting such endpoints with a list, instead of needing to go through the pandas input. Allow the microbatcher to concat the lists of requests.
  2. accept a schema parameter that can be a type definition or a pydantic model https://pydantic-docs.helpmanual.io/usage/models/ . This will be used to generate the response in the openapi schema https://pydantic-docs.helpmanual.io/usage/schema/
  3. Allow for some way to turn off validation, as I'm told this is being done for custom FastAPI KFServing apps to be able to handle high load

Describe alternatives you've considered

Additional context

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 2, 2021
@parano parano removed the stale label Jun 14, 2021
@parano
Copy link
Member

parano commented Jun 14, 2021

@larme would be great for you to look into this issue

@aarnphm
Copy link
Contributor

aarnphm commented Nov 10, 2021

pydantic_model: t.Optional["pydantic.BaseModel"] = None,
will provide support for pydantic model schema in the upcoming 1.0 releases. Let me know if we need to reopen this issue. Closing for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants