Skip to content

allowed response type of file #293

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

Closed
wants to merge 1 commit into from

Conversation

nickretallack
Copy link

Not sure if this is the best way to do it, but we should do something to support what the documentation says we do. Comments welcome.

Not sure how to "test" this or try it out in swagger-editor.

@webron
Copy link
Member

webron commented Mar 4, 2015

If you fix it (the responseSchema is defined inside schema by mistake) and resubmit it against the 2.0_fixes branches, I'd be more than happy to merge it.

@webron
Copy link
Member

webron commented Mar 4, 2015

Please note that I just pushed a few changes to the schema object in that branch, so make sure to pull those.

@ePaul
Copy link
Contributor

ePaul commented Jul 29, 2015

If I understand right, when using "type": "file", there is no much point in including anything else in this schema definition. So maybe something like

"responseSchema": {
    "anyOf": [ {
            "$ref": "#/definitions/schema"
         }, {
            "type": "object"
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [ "file" ]
                }
            }
        }
    ]
}

would be shorter, easier maintainable and allow less nonsense? (I'm not an expert on JSON schema, I find the spec unreadable, and have no tools here to try if this works. I hope the intention is clear.)

@webron
Copy link
Member

webron commented Jul 30, 2015

Thanks, but due to code drift, had to implement it differently.

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 this pull request may close these issues.

3 participants