Skip to content

Missing content type when serializing Responses that are references in v2 #1000

Closed

Description

Describe the bug
We need to specify the content type of response if the Response is a reference. This bug only happens during v2 serialization

Expected behavior

'/Tasks({Id})/Default.Upload':
    post:
      tags:
        - Tasks.Actions
      summary: Invoke action Upload
      operationId: Tasks.DocumentDto.Upload
+      produces:
+        - application/json
      parameters:
        - in: path
          name: Id
          description: 'key: Id of DocumentDto'
          required: true
          type: integer
          format: int32
          maximum: 2147483647
          minimum: -2147483648
          x-ms-docs-key-type: DocumentDto
      responses:
        '200':
          $ref: '#/responses/UploadResponse'
        default:
          $ref: '#/responses/error'
      x-ms-docs-operation-type: action
    x-description: Provides operations to call the Upload method.

Activity

  1. irvinesunday commented on Sep 7, 2022

    @irvinesunday
    Contributor

    Millicent Achieng (@millicentachieng) is this happening with the current version v1.4.0?

  2. millicentachieng commented on Sep 7, 2022

    @millicentachieng
    ContributorAuthor

    Millicent Achieng (@millicentachieng) is this happening with the current version v1.4.0?

    Irvine Sunday (@irvinesunday), yes.

  3. baywet commented on Sep 8, 2022

    @baywet
    Member

    additionally the test files will need to be updated once this gets released. microsoft/OpenAPI.NET.OData#266

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

Metadata

Metadata

Labels

type:bugA broken experience

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions