Skip to content

v10: OpenAPI Enhancements integration to doc set #36079

Description

@wadepickett

See details for the OpenAPI Enhancements to integrate into the doc set here noted at V10 RC1:
#35994 (comment)

Also see related copleted PR: #36078

and see the report below indicating 5 articles in total may need to be updated.


Associated WorkItem - 488141

Activity

  1. self-assigned this
    on Sep 9, 2025
  2. added
    reQUEST
    10.0
    on Sep 9, 2025
  3. added
    seQUESTered
    and removed
    reQUEST
    on Sep 9, 2025
  4. 6 remaining items

  5. changed the title [-]v10 RC1: OpenAPI Enhancements integration to doc set[/-] [+]v10: OpenAPI Enhancements integration to doc set[/+] on Jan 7, 2026
  6. wadepickett commented on Mar 4, 2026

    @wadepickett
    ContributorAuthor

    🤖 AI Triage Summary (Corrected & Updated)

    📌 Note to community: This is an automated preliminary analysis to help our documentation team quickly review, determine scope and prioritize this issue. This report is not a resolution or answer to your question—it's an internal triage tool that identifies potentially relevant docs, code samples, and versions to look into. A team member will review this issue and respond. Thank you for your contribution!


    This preliminary assessment was originally run by: @wadepickett
    Original date: 2026-03-04
    Corrected/verified date: 2026-08-19
    Issue: 36079
    Model: GitHub Copilot

    ✏️ Correction note: This version fixes stale line numbers, corrects target file names (most v10 content lives in include-metadata10.md, not include-metadata.md), and updates the status of the [SkipValidation] item, which has been partially completed.


    Issue Analysis: v10 OpenAPI Enhancements Integration to Doc Set

    ✅ Issue Validation

    Status: Valid and actionable. Verified against current main: items 1–7 are not yet integrated into the doc set (they exist only in the "What's New" release notes). Item 8 ([SkipValidation]) is partially complete (see below).

    📋 Issue Summary

    This issue tracks integrating the .NET 10 OpenAPI enhancements (described in #35994 (comment) by @mikekistler) into the core ASP.NET Core doc set. The related "What's New" PR #36078 is complete and added openapi-schema-enhancements.md, which summarizes 7 of the 8 items (it does not cover [SkipValidation]). The remaining task is to weave this content into the reference/conceptual articles.

    The 8 enhancements:

    1. Model nullable types using oneOf — oneOf pattern instead of nullable for complex types/collections.
    2. Schema $ref resolution fixes — resolves relative JSON schema $ref in the root schema document.
    3. Property descriptions as siblings of $ref — OpenAPI 3.1 relaxation (community contribution, @desjoerd).
    4. XML comments on [AsParameters] types — metadata extracted from [AsParameters] property XML comments.
    5. Exclude unknown HTTP methods — e.g., QUERY gracefully excluded (community contribution, @martincostello).
    6. JSON Patch request body descriptions — application/json-patch+json media type + detailed schema (community contribution, @martincostello).
    7. Invariant culture for document generation — culture-independent formatting (community contribution, @martincostello).
    8. [SkipValidation] attribute — experimental opt-out of validation (partially documented — see status below).

    ⚠️ Corrections Applied to the Original Report

    Original claim Correction
    nullable section at include-metadata10.md lines 637-654 Actually lines 640-656 (the enum section occupies 602-638).
    Several edits targeted include-metadata.md For v10-only content, the correct file is include-metadata10.md (:::moniker range="= aspnetcore-10.0").
    "Describe the request body" at include-metadata.md lines 187-287 In include-metadata10.md this section is at lines 172-272.
    customize-openapi.md $ref section at lines 159-177 The relevant "Customize schema reuse" $ref section is at lines 187-222.
    openapi-comments.md insertion at line 35 "Supported XML documentation tags" list ends at line 35; insert a new subsection after it (~36+) or near "Handling of complex types" (line 158). File has no [AsParameters] content today.
    aspnetcore-openapi.md at lines 65-78 Approximate only; "Configure OpenAPI document generation" begins at line 64 and "Options to Customize…" at line 75.

    📁 Potentially Affected Files (verified paths)

    File Purpose Verified target location
    includes/openapi-schema-enhancements.md Release notes (done via #36078) Source material only
    fundamentals/openapi/includes/include-metadata10.md v10 metadata reference nullable (640-656); request body (172-272); data types (475+)
    fundamentals/openapi/openapi-comments.md XML comments [AsParameters] XML support (after line 35 / near 158)
    fundamentals/openapi/customize-openapi.md Transformers / schema reuse $ref resolution note (187-222)
    fundamentals/openapi/aspnetcore-openapi.md Document generation unknown HTTP methods + invariant culture (near 64-78)
    fundamentals/validation.md Validation Already covers [SkipValidation] — cross-link only

    📝 Preliminary Change Assessment

    1. Nullable types — oneOf pattern

    File: include-metadata10.md · Location: #### nullable, lines 640-656 · Type: Enhancement
    Expand the existing nullable section (which currently shows only type: [null, string]) to explain that complex types and collections now use oneOf (e.g., oneOf: [{type: "null"}, {$ref: "#/components/schemas/MyType"}]). Add a oneOf example, note NullabilityInfoContext-based detection, and note that null types are pruned from componentized schemas.

    2. Schema $ref resolution improvements

    File: customize-openapi.md · Location: "Customize schema reuse", lines 187-222 · Type: Note
    Add a [!NOTE] that relative JSON schema $ref references in the root schema document are now properly resolved.

    3. Property descriptions as siblings of $ref

    File: include-metadata10.md · Location: "Include OpenAPI metadata for data types" (line 475+) · Type: New paragraph
    Document that, starting with .NET 10 (OpenAPI 3.1), property descriptions are preserved alongside $ref (previously discarded under OpenAPI 3.0).

    4. XML comments on [AsParameters] types

    File: openapi-comments.md · Location: after line 35 or near line 158 · Type: New subsection
    Document that XML comments on [AsParameters] class properties are now processed into OpenAPI metadata, with a code example.

    5. Exclude unknown HTTP methods

    File: aspnetcore-openapi.md · Location: near lines 64-78 · Type: Note
    Add a [!NOTE] that unknown HTTP methods (e.g., QUERY) are gracefully excluded from the generated document.

    6. JSON Patch request body descriptions

    File: include-metadata10.md · Location: "Describe the request body", lines 172-272 · Type: New subsection/note
    Document that JSON Patch operations now use the application/json-patch+json media type with a detailed schema, including an example.

    7. Invariant culture for document generation

    File: aspnetcore-openapi.md · Location: near document generation section · Type: Note
    Add a [!NOTE] that generation now uses invariant culture for consistent formatting regardless of server culture.

    8. [SkipValidation] attribute — ⚠️ PARTIALLY COMPLETED

    ✅ Work already completed:

    • The experimental [SkipValidation] (Microsoft.Extensions.Validation.SkipValidationAttribute) is already documented in fundamentals/validation.md, in the "Experimental API in apps that target .NET 10" section (moniker = aspnetcore-10.0). That coverage includes:
      • The experimental status of ValidatableTypeAttribute and SkipValidationAttribute in .NET 10 (no longer experimental in .NET 11).
      • Blazor embedded-attribute generation behavior.
      • The ASP0029 analyzer warning and how to suppress it (<NoWarn> and #pragma).
    • This satisfies the general documentation of the attribute and directly addresses the coordination concern @guardrex raised in #35994 (comment) about avoiding duplication with the Blazor/validation docs ([RC1] Update Blazor form validation docs for .NET 10 #35972).

    🔲 Work still needed:

    • No OpenAPI-specific coverage exists. Explain (or explicitly note the absence of) any effect [SkipValidation] has on OpenAPI schema generation in the OpenAPI articles.
    • Add a cross-reference from the OpenAPI metadata/validation discussion to xref:fundamentals/validation (specifically the experimental-API section) rather than re-documenting the attribute.
    • Do not duplicate the attribute description, experimental warning, or ASP0029 guidance in the OpenAPI docs — link to the validation article as the single source of truth.

    🎯 Suggested Action Plan (corrected targets)

    1. include-metadata10.md — oneOf nullable expansion (640-656); JSON Patch request body (172-272); $ref sibling descriptions in data-types section (475+).
    2. openapi-comments.md — add [AsParameters] XML comment subsection (after 35 / near 158).
    3. aspnetcore-openapi.md — unknown HTTP method exclusion + invariant culture notes (near 64-78).
    4. customize-openapi.md — $ref resolution note in "Customize schema reuse" (187-222).
    5. [SkipValidation] — add cross-link from OpenAPI docs to xref:fundamentals/validation; do not re-document. Coordinate with [RC1] Update Blazor form validation docs for .NET 10 #35972.

    ⚠️ Review Considerations

    • All changes apply to .NET 10 (= aspnetcore-10.0 moniker) — prefer include-metadata10.md over the multi-moniker include-metadata.md.
    • openapi-schema-enhancements.md is source material; adapt to reference/conceptual style.
    • Decide whether contributor acknowledgments (@desjoerd, @martincostello) belong only in release notes (recommended) and not in reference articles.
    • Line numbers drift; re-verify before editing.

    🔗 References

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

Metadata

Metadata

Labels

10.0Pri1seQUESTered

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions