feat(docs): First model for swagger
This commit is contained in:
58
docs/docs.go
58
docs/docs.go
@@ -28,9 +28,67 @@ const docTemplate = `{
|
||||
"contracts"
|
||||
],
|
||||
"summary": "Generate a contract",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Contract data",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Contract"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"models.Contract": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"runners": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Runner"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Group": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent_group": {
|
||||
"$ref": "#/definitions/models.Group"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Runner": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"$ref": "#/definitions/models.Group"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"middle_name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user