Skip to content

References to callback components are not resolved #301

@reuvenharrison

Description

@reuvenharrison

My spec contains a reference to a callback:

paths:
  /register:
    post:
      summary: Subscribe to a webhook
      callbacks:   # Callback definition
        myEvent:   # Event name
          $ref: '#/components/callbacks/myEvent'

After loading the spec with LoadSwaggerFromURI, the value is nil:

<github.com/getkin/kin-openapi/openapi3.CallbackRef>
Ref:"#/components/callbacks/myEvent"
Value:nil <*github.com/getkin/kin-openapi/openapi3.Callback>

Proposed resolution:
func ResolveRefsIn should resolve callbacks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions