ogdhcp/swagger.json

130 lines
4.8 KiB
JSON

{
"openapi": "3.0.0",
"info": {
"title": "My API",
"version": "1.0"
},
"paths": {
"/opengnsys3/rest/dhcp/subnet": {
"get": {
"operationId": "ece42bc4084486aedf42734bdb0b84cb",
"responses": {
"200": {
"description": "Devuelve todas las subredes",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Subnet"
}
}
}
}
},
"400": {
"description": "Error al obtener las subredes"
}
}
}
},
"/opengnsys3/rest/dhcp/subnet/add": {
"post": {
"summary": "Add a new DHCP subnet",
"operationId": "c8d5e4a10918078f17ab2ad4b73fc453",
"requestBody": {
"description": "JSON payload",
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"subnetId": {
"type": "integer"
},
"mask": {
"type": "string"
},
"address": {
"type": "string"
},
"nextServer": {
"type": "string"
},
"bootFileName": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Subnet added successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"400": {
"description": "Error occurred",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"type": "string"
}
},
"type": "object"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Subnet": {
"properties": {
"id": {
"description": "The ID of the subnet",
"type": "integer"
},
"subnet": {
"description": "The name of the subnet",
"type": "string"
},
"next-server": {
"description": "The next server in the subnet",
"type": "string"
},
"boot-file-name": {
"description": "The boot file name for the subnet",
"type": "string"
},
"reservations": {
"type": "array",
"items": {
"description": "The reservations in the subnet",
"type": "object"
}
}
},
"type": "object"
}
}
}
}