-
Notifications
You must be signed in to change notification settings - Fork 0
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
Knowledge type service integration with sdk #34
base: main
Are you sure you want to change the base?
Conversation
…to dev/ktype-integration
Review/ktype integration
Deleted a test file
…sms-python-sdk into dev/ktype-integration
dsms/knowledge/ktype.py
Outdated
updated_at: Optional[Union[str, datetime]] = Field( | ||
None, description="Time and date when the KType was updated." | ||
) | ||
custom_properties: Optional[Any] = Field(None, description="") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be some description added to the custom_properties
model.
dsms/knowledge/ktype.py
Outdated
None, description="OpenAPI schema of the KItem." | ||
None, description="OpenAPI schema of the KType." | ||
) | ||
rdf_mapping: Optional[str] = Field(None, description="") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a description of the field is needed here. Maybe something like "Optional rdf mapping for webform"
.
dsms/knowledge/webform.py
Outdated
|
||
id: Optional[str] = Field(None) | ||
label: Optional[str] = Field(None) | ||
widget: Optional[str] = Field(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the widgets we can make an enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g. with Text
, Number
, etc.
dsms/knowledge/webform.py
Outdated
default_value: Optional[Any] = Field(None) | ||
value: Optional[Any] = Field(None) | ||
choices: List[WebformSelectOption] = Field([]) | ||
on_change: Optional[Any] = Field(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which cases do we need the on_change
field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the use case for this field. I just mapped all the fields that were defined in the webform builder.
https://gitlab.cc-asp.fraunhofer.de/dsms/webform-builder/-/blob/main/projects/webform-builder/src/lib/models/webform-input.ts?ref_type=heads#L7
dsms/knowledge/webform.py
Outdated
hint: Optional[str] = Field(None) | ||
measurement_unit: Optional[str] = Field(None) | ||
mapping: Optional[str] = Field(None) | ||
mapping_name: Optional[str] = Field(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing the mapping_unit
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any field named mapping_unit in the webform builder.
https://gitlab.cc-asp.fraunhofer.de/dsms/webform-builder/-/blob/main/projects/webform-builder/src/lib/models/webform-input.ts?ref_type=heads#L14
@arjungkk, can you please add seom examples into the There is an initial example with ...
You may extend this one with a potential webform with the following payload:
|
Support the creation, updation and deletion of ktypes in the SDK.