-
Notifications
You must be signed in to change notification settings - Fork 6
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
adds changes to allow open content within schema and adds APIs to retrieve open content #145
Conversation
…rive open content * adds open_content() in IslType as well IslSchema to retrieve open content * adds load_isl_schema() that load a schema content as an intrernal ISL model which can be programmaticlaly manipulated * adds related tests for open content
inline_imported_types: Vec<IslImportType>, | ||
/// Represents open content as `Element`s | ||
/// Note: This doesn't preserve the information about where the open content is placed in the schema file. |
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.
Can you document why you have chosen to do it this way? It's possible that in a year, there will be a use case that requires the relative ordering of ISL and non-ISL. If that comes up, we need to understand why the decision was made so that we can make an informed decision about whether to change it.
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.
As of now I do not know of any use case for preserving this information and it requires storing the order for non ISL and ISL which could complicate the current IslSchema
model by having to store the order and add a model to represent non ISL data. If a use case arrives we can change it.
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.
Issue #6
Description of changes:
This PR works on adding changes for allowing open content within schema and adds APIs to retrieve open content.
List of changes:
open_content()
inIslType
as wellIslSchema
to retrieve open contentload_isl_schema()
that load a schema content as an internal ISL model which can be programmatically manipulatedNote:
IslSchema#open_content()
only provides top level open content. For open content in type definition addedIslType#open_content()
Test:
system
andisl
modulesion-schema-tests
to verify open content is allowedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.