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 support for xsd("auto") #116

Open
laurianvm opened this issue Aug 28, 2024 · 2 comments
Open

Add support for xsd("auto") #116

laurianvm opened this issue Aug 28, 2024 · 2 comments

Comments

@laurianvm
Copy link

consider making the | xsd filter a bit smarter:
Add xsd("auto"), which applies the best fitting xsd type to the actual datatype

(copying from IMIS-1598)

@cedricdcc
Copy link
Member

@laurianvm are you working on this actively?
Also can you explain the diff/example why this issue and issue #115 ?

@marc-portier
Copy link
Member

@cedricdcc the description seems clear

  1. Add support for xsd("auto") #116 --> | xsd("auto") will apply an xsd type that matches the python-type passed in (which assumes some smartness in the Source implementation that does proper type conversion, or assumes the template is doing that type conversion)
  2. Add support for xsd("detect") #115 --> `| xsd("detect") will ignore the input type, assume str (or even force conversion) and then make a guess of the type before handing it over to the appropriate matching xsd-type

In other words:
| xsd(detect) == | do-str-to-type-detection-and-conversion +| xsd(auto)

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

No branches or pull requests

3 participants