Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gilbode opened this issue Nov 11, 2015 · 0 comments · Fixed by #140
Closed

Comments

@gilbode
Copy link
Contributor

gilbode commented Nov 11, 2015

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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant