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

[0.10] Support Smithy IDL Serialization #284

Merged
merged 16 commits into from
Feb 27, 2020

Conversation

JordonPhillips
Copy link
Contributor

This adds the ability to take an in-memory model and serialize it into the Smithy IDL format.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This adds a method to CodeWriter which allow for writing without
having a trailing newline or leading indentation inserted. This can
be very useful when you want to write part of a line without knowing
what the whole line will contain.

This does preserve some safety in that it will intercept newlines to
treat them as normal, but it is still potentially dangerous if not
used carefully.
This adds support for serializing a Smithy model into the IDL format.
@mtdowling mtdowling changed the title Support Smithy IDL Serialization [0.10] Support Smithy IDL Serialization Feb 24, 2020
This simplifies various bits of the internals, for instance by
discarding much manual tinkering of sorting.
This updates the `compareTo` on shapeIds to be case-insensitve by
default, with a case-sensitive tie-breaker. Though technically that
means we could be comparing a given shape twice, practically the
likelihood is low since ShapeId's in a model must be
case-insensitively unique.
@JordonPhillips JordonPhillips merged commit c59d229 into smithy-lang:0.10 Feb 27, 2020
@kstich kstich mentioned this pull request Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants