Skip to content

OpenAPI: an opt-in to describe value objects inline everywhere #83

Closed

Description

@CaffeinatedCoder

With AddTypeKit(), a value object in a request or response body keeps a component named after it, and a route or query parameter is inlined (decision 106; docs/aspnet-core.md, "See value objects in the OpenAPI document"). Some clients do better with plain types: a generator that turns each component into its own type, or a frontend that is not ready for distinct types, gets a CustomerId wrapper where it wanted a string.

Proposal

An opt-in setting on AddTypeKit() that describes every value object inline, by its wrapped type's schema, wherever it appears: properties, collection items, dictionary keys and values, parameters and nesting, with no value-object component. The default stays as it is.

A new decision record states the setting and how it sits with decisions 55 (a component name claimed twice is refused) and 106; the schema-parity tests (SchemaTests, NullablePositionTests; test/oracles/axes.md, "Schema parity") run under both settings.

Done when

  • The setting is documented in docs/aspnet-core.md with a compiled sample.
  • The inline document's schemas equal the wrapped type's, byte for byte, over the same shapes the component mode is held to, including nullable and OpenAPI 2.0 output (KB-001, KB-026).
  • The default document does not change.

Activity

  1. added this to the 2.3.0 milestone on Oct 28, 2026
  2. CaffeinatedCoder commented on Oct 29, 2026

    @CaffeinatedCoder
    OwnerAuthor

    Done in #136, merged into release/2.3.0 (a898b93).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpackage/aspnetcoreAffects CodoMetis.TypeKit.AspNetCore

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions