Skip to content

swagger 1.2 with "void" response missing "responses" element in transformed swagger 2.0 #139

@gilbode

Description

@gilbode

I'm trying to use swagger parser to transform swagger 1.2 to swagger 2.0 and validating against the JSON schema in a test to prove the transform was correct. I have several swagger 1.2 files with operations that have "void" type. When I transform these the swagger 2.0 is missing the responses element for the operation and thus consider invalid. See below for an example swagger 1.2 api description:

{
    "apiVersion": "1.0.1",
    "apis": [
        {
            "operations": [
                {
                    "method": "POST",
                    "nickname": "postCallback",
                    "notes": "",
                    "parameters": [],
                    "responseMessages": [],
                    "summary": "update the status of an asynchronously running pipeline",
                    "type": "void"
                }
            ],
            "path": "/callback"
        }
    ],
    "basePath": "http://localhost:5000",
    "consumes": [
        "application/json"
    ],
    "produces": [
        "application/json"
    ],
    "resourcePath": "/",
    "swaggerVersion": "1.2"
}

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