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

feat: add handler to auto-fill missing default values #210

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

YCK1130
Copy link
Collaborator

@YCK1130 YCK1130 commented Jul 11, 2024

Because:

  • Request from frontend and direct API calls may miss some optional fields
  • The underlying meaning of default is that if no value is provided, we will use this value instead.

This commit

  • Implement a function in the base package for all components to use
  • The function supports filling fields with primitive types, including string, integer, number, boolean, and array of them.
  • Support allOf, anyOf, oneOf fields
  • Recursively fill in multi-layer object value

@YCK1130 YCK1130 marked this pull request as ready for review July 11, 2024 15:09
@YCK1130 YCK1130 force-pushed the YCK1130/auto-fill-defaults branch from d20d295 to fe2065e Compare July 15, 2024 15:44
Because:
 - Request from frontend and direct API calls may miss some optional
   fields
 - The underlying meaning of default is that if there is no value
   provided, we will use this value instead.
@YCK1130 YCK1130 force-pushed the YCK1130/auto-fill-defaults branch from fe2065e to 134dc96 Compare July 24, 2024 11:40
@YCK1130 YCK1130 mentioned this pull request Jul 24, 2024
4 tasks
Copy link
Member

@donch1989 donch1989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@donch1989 donch1989 merged commit dcad3f0 into instill-ai:main Jul 26, 2024
6 checks passed
donch1989 pushed a commit that referenced this pull request Jul 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.24.0-beta](v0.23.0-beta...v0.24.0-beta)
(2024-07-31)


### Features

* add audio operator
([#236](#236))
([fe8abff](fe8abff))
* add handler to auto-fill missing default values
([#210](#210))
([dcad3f0](dcad3f0))
* add HubSpot component
([#199](#199))
([b3936a8](b3936a8))
* add Jira component
([#205](#205))
([51f3ed7](51f3ed7))
* add Ollama component
([#224](#224))
([810f850](810f850))
* add sql component
([#193](#193))
([9a373f3](9a373f3))
* add token count for each chunk
([#235](#235))
([bb69104](bb69104))
* add video operator to fulfil unstructured data process
([#238](#238))
([a1459d7](a1459d7))
* **document:** add docx doc pptx ppt html to transform to text in
markdown format
([#232](#232))
([2932db9](2932db9))
* **document:** move ConvertToText task from text operator to document
operator ([#248](#248))
([699ca70](699ca70))
* introduce event handler interface
([#253](#253))
([9599b42](9599b42))
* **restapi:** recategorize the restapi component as a generic component
([#249](#249))
([fbfc3a3](fbfc3a3))
* **website:** add scrape sitemap function
([#239](#239))
([8648326](8648326))


### Bug Fixes

* bug of duplicate document
([#256](#256))
([e028a6e](e028a6e))
* bug of json without setting array for images
([#259](#259))
([4aeae69](4aeae69))
* change md format to html tag for correct frontend link
([#240](#240))
([7e16b2b](7e16b2b))
* revert the alias because they are same as package name
([#243](#243))
([1d9c42d](1d9c42d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 👋 Done
Development

Successfully merging this pull request may close these issues.

3 participants