Skip to content

Support for extensions within swagger:route #1957

@pritesh-lahoti

Description

@pritesh-lahoti

Problem statement

Vendor extensions are currently supported only as part of swagger:meta in go-swagger. However, extensions are allowed as part of paths too as referenced here: https://swagger.io/docs/specification/2-0/swagger-extensions/

As an example, the AWS API Gateway injects extensions at each path.

paths:
  /alerts:
    get:
      description: |-
        List alerts.
      operationId: ListAlerts
      responses:
        "200":
          $ref: '#/responses/ListAlertsResponse'
        default:
          description: Error
          schema:
            $ref: '#/definitions/Error'
      security:
      - CongnitoAuthorizer: []
      summary: List Alerts
      tags:
      - Alerts
      x-amazon-apigateway-integration:
        httpMethod: GET
        passthroughBehavior: when_no_match
        responses:
          default:
            statusCode: "200"
        type: http_proxy
        uri: https://myproxy.com/alerts

Environment

swagger version: 0.19.0
go version: 1.11.6
OS: macOs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions