Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/OpenAPI.NET
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.10.0
Choose a base ref
...
head repository: microsoft/OpenAPI.NET
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.11.0
Choose a head ref
  • 20 commits
  • 44 files changed
  • 7 contributors

Commits on Jul 8, 2026

  1. feat: adds support for anchor and id external resolution

    * tests: adds a negative test for external anchors
    feat: adds support for relative ids
    
    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    
    * feat: adds support for external anchors
    
    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    
    * chore(benchmark): update performance reports
    
    * perf: use char comparison when possible
    
    * fix: anchor combination with id resolution
    
    ---------
    
    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    baywet and Copilot committed Jul 8, 2026
    Configuration menu
    Copy the full SHA
    4138e47 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2026

  1. Merge pull request #2932 from microsoft/feat/external-anchor-relative…

    …-id-to-v2
    
    feat: adds support for anchor and id external resolution
    baywet authored Jul 9, 2026
    Configuration menu
    Copy the full SHA
    557bd6a View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2026

  1. fix: handle nullability more accurately during serialization for 3.0/…

    …2.0 (#2933)
    
    * Handle nullability more accurately
    
    * Cleanup
    
    * Rename SerializeTypeProperty to TrySerializeTypeProperty
    
    * Separate rp
    
    * Cleanup
    
    * Progress
    
    * Cleanp
    
    * Refactor
    
    * Use cached json extension
    
    * AddExtension only if Type is still unknown
    
    * Cleanup
    
    * Address review comments
    
    * Address review comments
    
    * Update OpenApiSchemaDeserializer.cs
    
    * Update OpenApiSchemaDeserializer.cs
    Youssef1313 authored and baywet committed Jul 13, 2026
    Configuration menu
    Copy the full SHA
    310b6e2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2937 from microsoft/fix/null-to-v2

    fix: handle nullability more accurately during serialization for 3.0/2.0 (#2933)
    baywet authored Jul 13, 2026
    Configuration menu
    Copy the full SHA
    bc11356 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2026

  1. feat(schema): resolve bare $dynamicRef via $dynamicAnchor index (#2913)

    * feat(schema): resolve $dynamicRef against $dynamicAnchor via OpenApiSchemaReference
    
    Implements document-scoped $dynamicRef resolution per JSON Schema
    2020-12 §8.2.3.2. Bare $dynamicRef schemas (no $ref) now deserialize
    as OpenApiSchemaReference whose Target resolves via per-document
    $dynamicAnchor and $anchor registries in OpenApiWorkspace.
    
    Resolution order in Target:
    1. $dynamicAnchor index (single candidate → resolved automatically)
    2. $anchor fallback when zero $dynamicAnchor candidates exist (per §8.2.3.2)
    3. null when ambiguous (multiple candidates need dynamic-scope tracking)
    
    Anchor registries are populated by recursively walking the entire
    document tree: component schemas, reusable component definitions
    (parameters, responses, request bodies, headers, callbacks, path items,
    media types), inline schemas (paths, operations, webhooks), and all
    nested subschema locations ($defs, properties, items, allOf, if/then/else,
    etc.). Anchor registration is merged into RegisterSchemaIdentifiers
    (#2918) so the schema tree is walked once instead of twice.
    
    IsDynamicRefOnly is computed from whether $dynamicRef is set and
    ReferenceV3 does not point to a component path — no field to forget
    when building from the object model.
    
    ResolveDynamicAnchorInContext special-cases OpenApiSchemaReference to
    read from Reference.DynamicAnchor/Definitions directly, never falling
    through to Target.
    
    Reference holder guards prevent the structural walk from crossing
    document boundaries through OpenApiParameterReference,
    OpenApiResponseReference, etc.
    
    Test snapshots use a custom JsonConverter<IOpenApiSchema> that routes
    schema serialization through the native OpenAPI writer, avoiding
    reflection cycles from recursive $dynamicRef.
    
    Public APIs for consumers tracking dynamic scope:
    - GetDynamicAnchorCandidates(doc, anchorName): returns all candidate schemas
    - ResolveDynamicAnchorInContext(contextSchema, anchorName): resolves against
      a specific entry-point schema's $defs without crossing reference boundaries
    
    Known limitation: relative URI resolution in $dynamicRef is not yet
    implemented (tracked as #2928). Cross-document resolution works for
    absolute URIs only.
    
    * fix(workspace): only consider authored $dynamicAnchor in ResolveDynamicAnchorInContext
    
    $defs entries that are themselves $refs no longer fall through to the
    referenced target's $dynamicAnchor. OpenApiSchemaReference.DynamicAnchor
    delegates to Target when the authored sibling is empty, which violated the
    method's context-bound intent.
    
    Adds AuthoredDynamicAnchor helper that reads Reference.DynamicAnchor for
    OpenApiSchemaReference and the plain property otherwise. Both $defs lookups
    (non-reference context branch and reference-holder branch) now use it.
    
    Tests cover both branches in V31 and V32: a Container schema with an aliased
    $ref def whose Target declares $dynamicAnchor: node, plus a reference holder
    whose Reference.Definitions carries the same aliased entry.
    aqeelat authored and baywet committed Jul 14, 2026
    Configuration menu
    Copy the full SHA
    a139f83 View commit details
    Browse the repository at this point in the history
  2. fix: differentiate unset value from null value in OpenApiSchema.Const (

    …#2936)
    
    * Differentiate unset value from null value in OpenApiSchema.Const
    
    * Fix for ref
    
    * Fix default for
    
    * Different approach
    
    * Fix deserializing of const null
    
    * chore: update performance benchmark reports (#2)
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    
    * chore(benchmark): update benchmark reports
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
    2 people authored and baywet committed Jul 14, 2026
    Configuration menu
    Copy the full SHA
    e08570f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a2687da View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2941 from microsoft/feat/dynamic-ref-to-v2

    feat(schema): resolve bare $dynamicRef via $dynamicAnchor index (#2913)
    baywet authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    baf8428 View commit details
    Browse the repository at this point in the history
  5. chore: promote shipped APIs (#2948)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Configuration menu
    Copy the full SHA
    c868dcf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    64f548e View commit details
    Browse the repository at this point in the history
  7. ci: adds a dev container configuration

    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    baywet committed Jul 14, 2026
    Configuration menu
    Copy the full SHA
    e93c0df View commit details
    Browse the repository at this point in the history
  8. Merge pull request #2951 from microsoft/ci/dev-container-to-v2

    ci: adds a dev container configuration
    baywet authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    4340b31 View commit details
    Browse the repository at this point in the history
  9. docs: adds a mention of the shallow copy (#2953)

    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    baywet authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    b7ee57b View commit details
    Browse the repository at this point in the history
  10. fix: adds explicit error message for invalid json pointers (#2955)

    * fix: adds explicit error message for invalid json pointers
    
    * chore: linting
    
    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    
    * chore: fixes implementation for pointer validation
    
    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    
    * chore: reverts range index unavailable on netstandard2.0
    
    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    
    ---------
    
    Signed-off-by: Vincent Biret <vibiret@microsoft.com>
    baywet authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    a304e56 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #2943 from microsoft/fix/const-null-to-v2

    fix: differentiate unset value from null value in OpenApiSchema.Const (#2936)
    baywet authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    a8787af View commit details
    Browse the repository at this point in the history
  12. [support/v2] port PR #2952 (#2954)

    * Merge 16826b0 into 3ef2b9e
    
    * test(library): remove invalid OpenAPI 3.2 inline data
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    Copilot-Session: b7a44557-39ee-4285-886c-7918d3caec2f
    baywet authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    26de615 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2026

  1. feat: support relative URI resolution in $dynamicRef (#2928) (#2945)

    * feat: support relative URI resolution in $dynamicRef (#2928)
    
    Set ExternalResource on non-fragment $dynamicRef references so the
    workspace loader can discover and fetch external documents. Resolve
    relative URIs against hostDocument.BaseUri in Target before calling
    FindDocumentByBaseUri.
    
    Tests:
    - Fragment-only: ExternalResource is null
    - Absolute URI: ExternalResource is set, resolves across documents
    - Relative URI: ExternalResource is set, resolves against BaseUri across documents
    - V31 and V32 coverage
    
    * test: mirror V31 dynamic ref tests to V32 and fix workspace fallback
    
    Adds 17 missing V32 test mirrors for full parity with V31 coverage.
    Replaces dead '?? new OpenApiWorkspace()' fallback with null-forgiving
    '!' in both V31 and V32 cross-document tests.
    
    * fix: remove duplicate XML doc and use Uri.TryCreate for relative URI resolution
    
    Addresses Copilot review feedback on #2945.
    aqeelat authored and baywet committed Jul 15, 2026
    Configuration menu
    Copy the full SHA
    a8688dc View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2961 from microsoft/feat/external-dynamic-to-v2

    feat: support relative URI resolution in $dynamicRef (#2928) (#2945)
    baywet authored Jul 15, 2026
    Configuration menu
    Copy the full SHA
    6091f5a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    34dcecf View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2934 from microsoft/release-please--branches--sup…

    …port/v2--components--Microsoft.OpenApi
    
    chore(support/v2): release 2.11.0
    baywet authored Jul 15, 2026
    Configuration menu
    Copy the full SHA
    628fd3e View commit details
    Browse the repository at this point in the history
Loading