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 more schema information to fetch models #8

Merged
merged 5 commits into from
Nov 28, 2023

Conversation

asim-shrestha
Copy link
Contributor

@asim-shrestha asim-shrestha commented Nov 16, 2023

What the schema will look like for healthcare for example:

{'properties': {'name': {'title': 'Name', 'type': 'string'}, 'website': {'description': 'An external link to the website', 'title': 'Website', 'type': 'string'}, 'phone': {'title': 'Phone', 'type': 'string'}, 'fax': {'description': 'Fax number', 'title': 'Fax', 'type': 'string'}, 'address': {'title': 'Address', 'type': 'string'}, 'type': {'description': 'The type of clinic the location', 'title': 'Type', 'type': 'string'}}, 'required': ['name', 'website', 'phone', 'fax', 'address', 'type'], 'title': 'ContactSchema', 'type': 'object'}

Alternatively, we can do this:

{'name': FieldInfo(annotation=str, required=True), 'website': FieldInfo(annotation=str, required=True, description='An external link to the website'), 'phone': FieldInfo(annotation=str, required=True), 'fax': FieldInfo(annotation=str, required=True, description='Fax number'), 'address': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True, description='The type of clinic the location')}

@KhoomeiK KhoomeiK merged commit f472675 into main Nov 28, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants