Skip to content

Client With Responses cant reference external responses #958

@amammay

Description

@amammay

In the client-with-responses template if you have have

pkg b

components:
  responses:
    200:
      description: "OK"
      content:
        'application/json':
          schema:
            $ref: '#/components/schemas/Document'
  schemas:
    Document:
      type: object
      properties:
        fields:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Value'
    Value:
      type: object
      properties:
        stringValue:
          type: string
        arrayValue:
          $ref: '#/components/schemas/ArrayValue'
    ArrayValue:
      type: array
      items:
        $ref: '#/components/schemas/Value'

and in pkg a

paths:
  /example:
    get:
      operationId: exampleGet
      responses:
        200:
          $ref: "./pkgb/spec.yaml#/components/responses/200"

the codegen output doesnt include external refs

image

I will open a PR with a broken test to showcase an exact replica

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:external-refsAnything related to external references (referencing other file(s) within a spec)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions