Skip to content

Properly deserialize ref requestBodies in v2 #932

@millicentachieng

Description

@millicentachieng

Below is what the current serialization yields:

# omitted
paths:
  '/Documents({Id})/Revisions/$ref'
      post:
            tags:
              - Documents.RevisionDto
            summary: Create new navigation property ref to Revisions for Documents
            operationId: Documents.CreateRefRevisions
            consumes: [ ]
            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
              - in: body
                name: body
                schema: { }
            responses:
              '204':
                description: Success
              default:
                $ref: '#/responses/error'
            x-ms-docs-operation-type: operation
definitions:
  ReferenceCreate:
      type: object
      properties:
        '@odata.id':
          type: string
      additionalProperties:
        type: object
  

Expected result:

# omitted
paths:
  '/Documents({Id})/Revisions/$ref'
      post:
            tags:
              - Documents.RevisionDto
            summary: Create new navigation property ref to Revisions for Documents
            operationId: Documents.CreateRefRevisions
            consumes: 
              - 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
              - $ref: '#/parameters/refPostBody'
            responses:
              '204':
                description: Success
              default:
                $ref: '#/responses/error'
            x-ms-docs-operation-type: operation
parameters:
    refPostBody:
        in: body
        name: body
        description: New navigation property ref value
        required: true
        schema:
          $ref: '#/definitions/ReferenceCreate'

Metadata

Metadata

Labels

priority:p2Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 daystype:bugA broken experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions