Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Scheme inlining works incorrect in SerializeAsV2 #1151

Copy link
Copy link
@Ztare

Description

@Ztare
Issue body actions

Describe the bug
When serialize OpenApi structure with multiple response schemes with different http codes and same models with InlineLocalReferences = true

To Reproduce

it inlines only first model, other models are replaced with refs

  /sample:
    post:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/PostRespDto'
        '202':
          description: Accepted
          schema:
            $ref: '#/definitions/PostRespDto'

with inlining will be

  /sample:
    post:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              type: object
              properties:
                SampleProperty:
                  type: string
              additionalProperties: false
        '202':
          description: Accepted
          schema:
            $ref: '#/definitions/PostRespDto'

Expected behavior

paths:
  /sample:
    post:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              type: object
              properties:
                SampleProperty:
                  type: string
              additionalProperties: false
        '202':
          description: Accepted
          schema:
            type: object
            properties:
              SampleProperty:
                type: string
            additionalProperties: false

Screenshots/Code Snippets
Merge request will be linked

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.