-
Notifications
You must be signed in to change notification settings - Fork 14
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 skeleton for ISL Writer #289
Conversation
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
fun writeVariablyOccurringTypeArg(ionWriter: IonWriter, varTypeArg: VariablyOccurringTypeArgument, elideOccursValue: DiscreteIntRange) | ||
|
||
/** | ||
* Writes a [TypeArguments] to the given [IonWriter]. |
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.
* Writes a [TypeArguments] to the given [IonWriter]. | |
* Writes a [TypeArgument]s to the given [IonWriter]. |
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's a type alias called TypeArguments
so this is correct, despite how it looks.
import com.amazon.ionschema.model.VariablyOccurringTypeArgument | ||
|
||
@ExperimentalIonSchemaModel | ||
internal interface TypeWriter { |
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.
(Question) This interface contains both type argument and type definition write methods. I am not sure how these methods will be used though. If you can provide an example that would be helpful.
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.
The schema writer will call the type definition method to write top-level types in a schema document. Constraint writers can call the type argument method if they have a type argument.
They could be in separate interfaces, because they are called from mutually exclusive locations, but since it's an internal interface, I don't think it's a big deal whether they're together or separate.
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.
Sure. It wouldn't matter for an internal interface but since this PR doesn't add any usage of this interface, I was just curious how this is intended to be used.
IMO, it might be worth adding interface definition with at least one place where its implemented or an example/summary of how the interface definition will be used in the PR description.
Issue #, if available:
None
Description of changes:
This is the start of a writer for the Ion Schema model. It includes interfaces for a schema writer, type writer, constraint writers, and implementations of
HeaderWriter
andFooterWriter
.There's also a little bugfix in
IonSchemaResult
.Related PRs in ion-schema, ion-schema-tests, ion-schema-schemas:
None
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.