apib2swagger
apib2swagger copied to clipboard
Definitions are created containing / characters - leading to unresolvable $refs
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
Fix escaping in 0.9.1. The output definitions are blank because input includes no normative sections (Schema/Attributes). Body sections are just examples.
Many thanks @kminami - I spotted that one of the forks of this repo might be working on generating schemas from examples...
Oh, it's cool! Will try to merge it.
Merged the branch at 1.0.0, but this doesn't affect to Model Bodies like above input.