Swagger 2.x link model from another file

I want to create an API with the following specification:

Project-api.json

{ "Project": { "required": [ "uuid" ], "properties": { "uuid": { "type": "string", "format": "string" } "Tasks": { "type": "array", "items": { "$ref": "models/task.json" } } } ... 

task.json

 { "Task": { "required": [ "uuid" ], "properties": { "user": { "type": "string" }, "title": { "type": "string" }, ... 

Instead of referencing models / tasks.json, the generated api generates:

 List<ModelstasksJson> 

Does anyone know how to reference models from another json file?

0
source share

Source: https://habr.com/ru/post/1204375/


All Articles