Allow inline lists
See original GitHub issueHi! I saw https://github.com/awslabs/smithy/blob/idl-2.0-rc-1/designs/inline-io.md and wondered if something similar could happen for lists:
instead of
structure User {
names: Names
}
list Names { member: Name }
it would be possible to do
structure User {
names: [Name]
}
(or similar) and a shape like Names
could be implicitly assumed to exist without the spec author having to write it.
This is not only a syntactic convenience, it would also aid refactoring (fewer symbols to rename).
Thanks 😃
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Enable inline editing in lists - ServiceNow Docs
Enable inline editing for Workspace lists so that you can inline edit one or multiple cells in a list column.
Read more >CSP Allow Inline Scripts - Content Security Policy
When you enable CSP, it will block inline scripts, but there are some ways that you can allow inline scripts and still use...
Read more >Creating inline lists - Go Make Things
Yesterday, we looked at how to create unstyled lists with CSS. Today, let's look at how to create inline lists. We're halfway there...
Read more >Allow Inline Editing in List Views with Multiple Record Types
Allow Inline Editing in List Views with Multiple Record Types. Platform / Lists. I know that there are a number of Inline Editing...
Read more >Enable inline editing in Workspace lists - DEV Community
To activate the inline editing of lists in workspaces, you need to set the property 'glide.lists.inline_editing_enabled' to true. OOTB it is ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah 😃. The Smithy core team is pretty divided on whether this would be a net positive too. Inline lists look great in docs and examples, but in practice we’d probably discourage their use at AWS since we want to add constraints to basically every list/set/map/string to make them bounded in some way, and we really don’t want teams to fall into the trap of repeating themselves.
If we do add something for inline list definitions, it would be in 2.1 or later since we’re working on wrapping up Smithy IDL 2.0.
Seems like quite a lot of work. Maybe it’s better to just bite the bullet and type the extra characters 😅
In the future it could be made easier with an editor code action (e.g. “create missing type” which would default to a list type based on some naming heuristics)