-
Notifications
You must be signed in to change notification settings - Fork 287
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
Implement "inline schemas": ability to add type hints into the type providers' source documents #1447
Commits on Jul 9, 2022
-
Add an InferenceMode enum for the json and xml providers to allow inf…
…ering types from inline schema definitions Ensure backward compatibility + add doc
Configuration menu - View commit details
-
Copy full SHA for 27398fb - Browse repository at this point
Copy the full SHA 27398fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a276c5c - Browse repository at this point
Copy the full SHA a276c5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c4129f - Browse repository at this point
Copy the full SHA 8c4129fView commit details -
Actually implement inline schemas and support units of measure in them
This means changing inferPrimitiveType to take a UnitsOfMeasureProvier parameter, and return InferedType instead of Type so we can set the units on the returned values in a way that will work with the rest of the code.
Configuration menu - View commit details
-
Copy full SHA for 5a11c95 - Browse repository at this point
Copy the full SHA 5a11c95View commit details -
Implement the ValuesAndInlineSchemasOverrides inference mode
where inline schemas types override value-inferred types instead of just adding new types to the list of inferred types. This requires adding metadata on InferedType.Primitive to know if the type should replace other types when merging them. This also requires adding metadata on InferedType.Heterogeneous to keep track of optionality inside an heterogeneous type. (Since we want to be able to transform a heterogeneous type back into a primitive type when the primitive type is supposed to override other primitive types) Preserving optionality in heterogeneous types effectively makes nulls and inline schemas both being considered at the same level of importance when merging.
Configuration menu - View commit details
-
Copy full SHA for 350d06c - Browse repository at this point
Copy the full SHA 350d06cView commit details -
Fix json conversion generator to support units of measures
Not sure why the assert was there, but looking at the similar ConversionsGenerator gives me confidence it shouldn't be here anymore now that we can have units of measure in json...
Configuration menu - View commit details
-
Copy full SHA for 3160620 - Browse repository at this point
Copy the full SHA 3160620View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd5ab64 - Browse repository at this point
Copy the full SHA fd5ab64View commit details -
The existing ones changed to take the BackwardCompatible inference mode. All Json and Xml cases that had value inference enabled have been copied to 3 new cases: one for each value of InferenceMode. The expected content is always the same: enabling inline schemas when no schema is defined in the source file should not change anything to the output.
Configuration menu - View commit details
-
Copy full SHA for 1a847ec - Browse repository at this point
Copy the full SHA 1a847ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a4d8d7 - Browse repository at this point
Copy the full SHA 3a4d8d7View commit details -
Add tests to validate and demonstrate usage of inline schemas (json a…
…nd xml providers)
Configuration menu - View commit details
-
Copy full SHA for 4353276 - Browse repository at this point
Copy the full SHA 4353276View commit details -
Configuration menu - View commit details
-
Copy full SHA for 071b030 - Browse repository at this point
Copy the full SHA 071b030View commit details