Skip to content

Bundle() not resolving all $ref #161

@joelfoliveira

Description

@joelfoliveira

When referencing the same component from other different components, Bundle() won't resolve the references correctly.

In this example:
ApiReferences

The bundled output contains a external reference in UserValues to AssociationContext:

components:
  schemas:
    User.Context:
      type: object
      properties:
        values:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Universal unique identifier of product property value.
                format: uuid
                example: dae18b3a-c5fc-4dc3-a53e-64c905d1f97b
              associationContext:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/User.Context/properties/associationContext/items

API Samples:
API
UserContext
UserValues
AssociationContext

Results
Obtained
Expected

By changing UserValues to reference a duplicate of AssociationContext (UserValuesAssociationContext) the Bundle() works correctly.
ApiReferencesWorkaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions