-
-
Notifications
You must be signed in to change notification settings - Fork 64
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: scope=given limited execution for schema introspection #756
Conversation
when this conf setting is on only the given and then blocks are processed, skipping all when as not known (as well if and foreach) this allows caller applications to import data input before processing. work in progress: next will include the possibility to print out the CODEC as a description of the imported input as well to mark input that is not found without aborting the operation.
this prints out the internal codec in the json output
this switch and consequent logics allow for missing data as expected input, which is then listed with CODEC.zentype='n' and not appear in ACK's heap
still work in progress
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.
It is 😍 just tested..
@jaromil tested now with a string dict and the codec is not printed... says |
@puria yes, known bug still WIP. A full list of things left TODO is at bottom of test/zencode/given.bats |
improved missing detection of dual definition improve scope=given to support also schema objects includes complex schemas and keyrings improve to support also missing objects inside tables
add zenroom. types for binary forms
this new call exposes a direct API for input validation which sets up all needed configs and should soon also print the codec limiting the scope to Given
optimize scope=given by disabling When/Then/etc. function handles no need to process Then when scope=given on introspection only the Given block is executed and the CODEC is printed, please note the structure is named uppercase: "CODEC" includes a small optimization to zencoed parser for comments add scope test to meson tests
ec0136a
to
0c55076
Compare
This new feature adds the possibility to execute zencode limited to the Given and Then section. It also switches off the fatal condition for missing data imported by given, allowing the caller to ignore missing data and obtain a CODEC (schema).
The use-case is that of host applications willing to introspect the data schema accepted by a Zencode contract.