Re: Swagger (2.0) spec - response is zip with 1 JSON file inside - how to add JSON structure spec

378 views
Skip to first unread message
Message has been deleted

Ron Ratovsky

unread,
Oct 3, 2017, 11:15:09 AM10/3/17
to swagger-sw...@googlegroups.com

I’m afraid there’s no way to describe that.

 

If you want to see support for this in the future, try filing a ticket at https://github.com/OAI/OpenAPI-Specification.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Ergya Russty <ergyat...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Tuesday, October 3, 2017 at 03:41
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger (2.0) spec - response is zip with 1 JSON file inside - how to add JSON structure spec

 

Hi Everyone, 

 

I am writing 2.0 spec for our services. We have 1 use case where the response is ZIP, inside the ZIP there is a JSON file. In general it is clear how to specify that the response is ZIP but I am curious whether it is possible to specify in 2.0 the "underlying" JSON structure even if the response itself is ZIP. Right now this is what I have:

 

...
  "/v2/super/secret/api": {

    "get": {

        "summary": "super secret api spec",

        "produces": [

          "application/zip",

        ],

...

        "responses": {

          "200": {

            "description": "OK",

            "schema": {

              "type": "file"

            }

          },
...

 

In "normal" circumstances I have these if I want to specify the response JSON structure:

 

"200": {

            "description": "OK",

            "schema": {

              "$ref": "#/definitions/JsonRootSomething"

            }

          },


Is it possible to somehow mix the two?

 

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages