I'd like to create a separate definitions.yml file using json remote references, so I can share the definitions across multiple YML files.
We followed the instructions in https://azimi.me/2015/07/16/split-swagger-into-smaller-files.html by moving the definitions section to a separate file. The mimimal YML file looks like:
api.yml:
responses:
'200':
description: "A user."
schema:
$ref: "#/definitions/User"
definitions:
$ref: "./definitions.yml"
definitions.yml
User:
type: string
somefile.py
from flasgger import swag_from
...
# use BluePrint to specify API
@swag_from('api.yml')
command
flask run
The expected localhost:5000/apidocs result would have a complete API for the GET, with User defined as a model. The actual result shows that '#/definitions/User' was not found, and the models are missing.
Does flasgger support this?