Skip to content

[Bug?] Swagger Flatten, Not Recognizing Nested Operations #2908

@nkreiger

Description

@nkreiger

Problem statement

Swagger flatten not working as expected

Swagger specification

  /applications:
    get:
      $ref: 'absolute_path#/paths/~1applications/get'
    post:
      $ref: 'absolute_path#/paths/~1applications/post'

generates:

/applications:
    get: {}
    post: {}

but if I move it up to the root level, works fine. I cannot do this though because I want to reference specific operations. Maybe I'm doing something wrong?

this works fine with swagger-cli

Steps to reproduce

swagger flatten ... --format=yaml --with-flatten=full

Environment

swagger version: v.30.3
go version: 1.18.0
OS:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions