allow swagger_path installed routes to be relocated
This commit is contained in:
@@ -9,6 +9,7 @@ use Try::Tiny;
|
||||
|
||||
swagger_path {
|
||||
tags => ['Objects'],
|
||||
path => setting('api_base').'/object/device/{ip}',
|
||||
description => 'Returns a row from the device table',
|
||||
parameters => [
|
||||
ip => {
|
||||
@@ -27,6 +28,7 @@ swagger_path {
|
||||
foreach my $rel (qw/device_ips vlans ports modules port_vlans wireless_ports ssids powered_ports/) {
|
||||
swagger_path {
|
||||
tags => ['Objects'],
|
||||
path => setting('api_base')."/object/device/{ip}/$rel",
|
||||
description => "Returns $rel rows for a given device",
|
||||
parameters => [
|
||||
ip => {
|
||||
@@ -46,7 +48,7 @@ foreach my $rel (qw/device_ips vlans ports modules port_vlans wireless_ports ssi
|
||||
swagger_path {
|
||||
tags => ['Objects'],
|
||||
description => 'Returns a row from the device_port table',
|
||||
path => '/api/v1/object/device/{ip}/port/{port}',
|
||||
path => setting('api_base').'/object/device/{ip}/port/{port}',
|
||||
parameters => [
|
||||
ip => {
|
||||
description => 'Canonical IP of the Device. Use Search methods to find this.',
|
||||
@@ -72,7 +74,7 @@ foreach my $rel (qw/nodes active_nodes nodes_with_age active_nodes_with_age vlan
|
||||
swagger_path {
|
||||
tags => ['Objects'],
|
||||
description => "Returns $rel rows for a given port",
|
||||
path => "/api/v1/object/device/{ip}/port/{port}/$rel",
|
||||
path => setting('api_base')."/object/device/{ip}/port/{port}/$rel",
|
||||
parameters => [
|
||||
ip => {
|
||||
description => 'Canonical IP of the Device. Use Search methods to find this.',
|
||||
@@ -99,7 +101,7 @@ foreach my $rel (qw/power properties ssid wireless agg_master neighbor last_node
|
||||
swagger_path {
|
||||
tags => ['Objects'],
|
||||
description => "Returns the related $rel table entry for a given port",
|
||||
path => "/api/v1/object/device/{ip}/port/{port}/$rel",
|
||||
path => setting('api_base')."/object/device/{ip}/port/{port}/$rel",
|
||||
parameters => [
|
||||
ip => {
|
||||
description => 'Canonical IP of the Device. Use Search methods to find this.',
|
||||
@@ -124,6 +126,7 @@ foreach my $rel (qw/power properties ssid wireless agg_master neighbor last_node
|
||||
|
||||
swagger_path {
|
||||
tags => ['Objects'],
|
||||
path => setting('api_base').'/object/device/{ip}/nodes',
|
||||
description => "Returns the nodes found on a given Device",
|
||||
parameters => [
|
||||
ip => {
|
||||
@@ -149,6 +152,7 @@ swagger_path {
|
||||
|
||||
swagger_path {
|
||||
tags => ['Objects'],
|
||||
path => setting('api_base').'/object/vlan/{vlan}/nodes',
|
||||
description => "Returns the nodes found in a given VLAN",
|
||||
parameters => [
|
||||
vlan => {
|
||||
|
||||
Reference in New Issue
Block a user