apib2swagger icon indicating copy to clipboard operation
apib2swagger copied to clipboard

Definitions are created containing / characters - leading to unresolvable $refs

Open MikeRalphson opened this issue 8 years ago • 4 comments

Input URL: http://docs.shipstation.apiary.io/api-description-document

Contains headers with multiple HTTP verbs?

## Get/Delete Order [/orders/{orderId}]

Generated swagger (excerpts):

          "parameters": [
            {
              "name": "storeId",
              "in": "path",
              "description": "A unique ID generated by ShipStation and assigned to each store.",
              "required": true,
              "type": "number"
            },
            {
              "name": "body",
              "in": "body",
              "schema": {
                "$ref": "#/definitions/Get/Update StoreModel"
              }
            }
          ]

The output models/definitions also appear to be blank:

    "definitions": {
      "Get/Delete Order": {},
      "Get/Delete OrderModel": {},
      ...
    }

Refs https://github.com/APIs-guru/openapi-directory/issues/121

MikeRalphson avatar Sep 25 '17 10:09 MikeRalphson

Fix escaping in 0.9.1. The output definitions are blank because input includes no normative sections (Schema/Attributes). Body sections are just examples.

kminami avatar Sep 28 '17 12:09 kminami

Many thanks @kminami - I spotted that one of the forks of this repo might be working on generating schemas from examples...

MikeRalphson avatar Sep 28 '17 12:09 MikeRalphson

Oh, it's cool! Will try to merge it.

kminami avatar Sep 28 '17 21:09 kminami

Merged the branch at 1.0.0, but this doesn't affect to Model Bodies like above input.

kminami avatar Oct 29 '17 08:10 kminami