Skip to content

Ability to inline objects for easier readability of the spec #555

@erikmaas-malmberg

Description

@erikmaas-malmberg

Is your feature request related to a problem? Please describe.
As and engineer I would love to inline types and Enums when they are not used in different places.
This improves the ease of use when reading the specification.
So instead of needing to switch the context of the type that one is reading by scrolling to the definition of a subtype, the reader can instead stay in the whole object instead.

Describe the solution you'd like
Instead of:

type Address {
  street: Name,
  houseNumber: Integer,
  postalCode: DutchPostalCode
}

type Person {
  firstname: Name,
  lastName: Name,
  age: Integer,
  address: Address
}

It would be great if we can do:

type Person {
  firstname: Name,
  lastName: Name,
  age: Integer,
  address:  {
    street: Name,
    houseNumber: Integer,
    postalCode: DutchPostalCode
  }
}

For naming the interanal objects the naming scheme of: can be used.
For the example this means: PersonAddress

Requirements
The ability to inline objects that are not reused in other places

Additional information
For further reading sources that triggered your feature wish

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions