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

Add option to enable prelude serialization #1275

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Jun 15, 2022

This PR adds an option to enable serializing prelude shapes.

By default, prelude shapes are filtered from the output of SmithyIdlModelSerializer.serialize().

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

@srchase srchase requested a review from a team as a code owner June 15, 2022 15:48
@srchase srchase force-pushed the optional-prelude-serialization branch from 11dd032 to 28dc5ac Compare June 15, 2022 16:04
@mtdowling
Copy link
Member

What's the motivation of this change?

@srchase
Copy link
Contributor Author

srchase commented Jun 15, 2022

What's the motivation of this change?

SmithyIdlModelSerializer will be used by the Hover capability of the Language Server to show the information about shapes/traits in a model. I want to make this available for showing the same information about prelude shapes.

For example, if @input is hovered on in a client, the following will be shown:

/// Specializes a structure for use only as the input of a single operation.
@trait(
    selector: "structure",
    conflicts: [output, error],
    breakingChanges: [{change: "presence"}]
)
structure input {}

@mtdowling mtdowling merged commit 7c07be0 into smithy-lang:main Jun 15, 2022
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