question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow inline lists

See original GitHub issue

Hi! 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:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mtdowlingcommented, Jun 2, 2022

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.

0reactions
kubukozcommented, May 20, 2022

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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found