Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove .json suffix from entity requests #90

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/circuits/circuit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Circuit

id id: :id
deletable true
path 'circuits/circuits/:id.json'
path 'circuits/circuits/:id/'
creation_path 'circuits/circuits/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/circuits/circuit_termination.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CircuitTermination

id id: :id
deletable true
path 'circuits/circuit-terminations/:id.json'
path 'circuits/circuit-terminations/:id/'
creation_path 'circuits/circuit-terminations/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/circuits/circuit_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CircuitType

id id: :id
deletable true
path 'circuits/circuit-types/:id.json'
path 'circuits/circuit-types/:id/'
creation_path 'circuits/circuit-types/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/circuits/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Provider

id id: :id
deletable true
path 'circuits/providers/:id.json'
path 'circuits/providers/:id/'
creation_path 'circuits/providers/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/console_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ConsoleConnection

id id: :id
deletable true
path 'dcim/console-connections/:id.json'
path 'dcim/console-connections/:id/'
creation_path 'dcim/console-connections/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/console_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ConsolePort

id id: :id
deletable true
path 'dcim/console-ports/:id.json'
path 'dcim/console-ports/:id/'
creation_path 'dcim/console-ports/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/console_server_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ConsoleServerPort

id id: :id
deletable true
path 'dcim/console-server-ports/:id.json'
path 'dcim/console-server-ports/:id/'
creation_path 'dcim/console-server-ports/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Device

id id: :id
deletable true
path 'dcim/devices/:id.json'
path 'dcim/devices/:id/'
creation_path 'dcim/devices/'
object_fields(
device_type: proc { |raw_data| DeviceType.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/device_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DeviceRole

id id: :id
deletable true
path 'dcim/device-roles/:id.json'
path 'dcim/device-roles/:id/'
creation_path 'dcim/device-roles/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/device_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DeviceType

id id: :id
deletable true
path 'dcim/device-types/:id.json'
path 'dcim/device-types/:id/'
creation_path 'dcim/device-types/'
object_fields(
manufacturer: proc { |raw_data| Manufacturer.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Interface

id id: :id
deletable true
path 'dcim/interfaces/:id.json'
path 'dcim/interfaces/:id/'
creation_path 'dcim/interfaces/'
object_fields device: proc { |raw_data| Device.new raw_data['id'] }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/interface_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class InterfaceConnection

id id: :id
deletable true
path 'dcim/interface-connections/:id.json'
path 'dcim/interface-connections/:id/'
creation_path 'dcim/interface-connections/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/inventory_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class InventoryItem

id id: :id
deletable true
path 'dcim/inventory-items/:id.json'
path 'dcim/inventory-items/:id/'
creation_path 'dcim/inventory-items/'
object_fields device: proc { |raw_data| Device.new raw_data['id'] },
manufacturer: proc { |raw_data| Manufacturer.new raw_data['id'] }
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/manufacturer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Manufacturer

id id: :id
deletable true
path 'dcim/manufacturers/:id.json'
path 'dcim/manufacturers/:id/'
creation_path 'dcim/manufacturers/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Platform

id id: :id
deletable true
path 'dcim/platforms/:id.json'
path 'dcim/platforms/:id/'
creation_path 'dcim/platforms/'
object_fields(
manufacturer: proc do |raw_manufacturer|
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/power_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class PowerConnection

id id: :id
deletable true
path 'dcim/power-connections/:id.json'
path 'dcim/power-connections/:id/'
creation_path 'dcim/power-connections/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/power_outlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class PowerOutlet

id id: :id
deletable true
path 'dcim/power-outlets/:id.json'
path 'dcim/power-outlets/:id/'
creation_path 'dcim/power-outlets/'
object_fields device: proc { |raw_data| Device.new raw_data['id'] }
object_fields connected_port: proc { |raw_data| PowerPort.new raw_data }
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/power_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class PowerPort

id id: :id
deletable true
path 'dcim/power-ports/:id.json'
path 'dcim/power-ports/:id/'
creation_path 'dcim/power-ports/'
object_fields device: proc { |raw_data| Device.new raw_data['id'] }
object_fields power_outlet: proc { |raw_data| PowerOutlet.new raw_data['id'] }
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/rack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Rack

id id: :id
deletable true
path 'dcim/racks/:id.json'
path 'dcim/racks/:id/'
creation_path 'dcim/racks/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/rack_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class RackGroup

id id: :id
deletable true
path 'dcim/rack-groups/:id.json'
path 'dcim/rack-groups/:id/'
creation_path 'dcim/rack-groups/'
object_fields(
region: proc { |raw_data| DCIM::Region.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/rack_reservation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class RackReservation

id id: :id
deletable true
path 'dcim/rack-reservations/:id.json'
path 'dcim/rack-reservations/:id/'
creation_path 'dcim/rack-reservations/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/rack_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class RackRole

id id: :id
deletable true
path 'dcim/rack-roles/:id.json'
path 'dcim/rack-roles/:id/'
creation_path 'dcim/rack-roles/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/region.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Region

id id: :id
deletable true
path 'dcim/regions/:id.json'
path 'dcim/regions/:id/'
creation_path 'dcim/regions/'
object_fields parent: proc { |raw_data| Region.new raw_data['id'] }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Site
:count_devices, :count_circuits

deletable true
path 'dcim/sites/:id.json'
path 'dcim/sites/:id/'
creation_path 'dcim/sites/'
object_fields(
region: proc { |raw_region| DCIM::Region.new raw_region['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/dcim/virtual_chassis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class VirtualChassis

id id: :id
deletable true
path 'dcim/virtual-chassis/:id.json'
path 'dcim/virtual-chassis/:id/'
creation_path 'dcim/virtual-chassis/'

object_fields(
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/extras/config_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ConfigContext

id id: :id
deletable true
path 'extras/config-contexts/:id.json'
path 'extras/config-contexts/:id/'
creation_path 'extras/config-contexts/'
object_fields(
regions: proc { |raw_data| DCIM::Region.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/extras/journal_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class JournalEntry

id id: :id
deletable true
path 'extras/journal-entries/:id.json'
path 'extras/journal-entries/:id/'
creation_path 'extras/journal-entries/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/extras/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Tag

id id: :id
deletable true
path 'extras/tags/:id.json'
path 'extras/tags/:id/'
creation_path 'extras/tags/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/aggregate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Aggregate

id id: :id
deletable true
path 'ipam/aggregates/:id.json'
path 'ipam/aggregates/:id/'
creation_path 'ipam/aggregates/'
object_fields rir: proc { |raw_data| Rir.new raw_data['id'] }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/ip_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class IpAddress

id id: :id
deletable true
path 'ipam/ip-addresses/:id.json'
path 'ipam/ip-addresses/:id/'
creation_path 'ipam/ip-addresses/'
object_fields(
vrf: proc { |raw_data| Vrf.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/ip_range.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class IpRange

id id: :id
deletable true
path 'ipam/ip-ranges/:id.json'
path 'ipam/ip-ranges/:id/'
creation_path 'ipam/ip-ranges/'
object_fields(
vrf: proc { |raw_data| Vrf.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/prefix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Prefix

id id: :id
deletable true
path 'ipam/prefixes/:id.json'
path 'ipam/prefixes/:id/'
creation_path 'ipam/prefixes/'
object_fields(
site: proc { |raw_data| DCIM::Site.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/rir.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Rir

id id: :id
deletable true
path 'ipam/rirs/:id.json'
path 'ipam/rirs/:id/'
creation_path 'ipam/rirs/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Role

id id: :id
deletable true
path 'ipam/roles/:id.json'
path 'ipam/roles/:id/'
creation_path 'ipam/roles/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Service

id id: :id
deletable true
path 'ipam/services/:id.json'
path 'ipam/services/:id/'
creation_path 'ipam/services/'
object_fields(
device: proc { |raw_data| Device.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/vlan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Vlan

id id: :id
deletable true
path 'ipam/vlans/:id.json'
path 'ipam/vlans/:id/'
creation_path 'ipam/vlans/'
object_fields(
tenant: proc { |raw_data| Tenancy::Tenant.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/vlan_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class VlanGroup

id id: :id
deletable true
path 'ipam/vlan-groups/:id.json'
path 'ipam/vlan-groups/:id/'
creation_path 'ipam/vlan-groups/'
object_fields site: proc { |raw_data| DCIM::Site.new raw_data['id'] }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/vrf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Vrf

id id: :id
deletable true
path 'ipam/vrfs/:id.json'
path 'ipam/vrfs/:id/'
creation_path 'ipam/vrfs/'
object_fields tenant: proc { |raw_data| Tenancy::Tenant.new raw_data['id'] }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/secrets/secret.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Secret

id id: :id
deletable true
path 'secrets/secrets/:id.json'
path 'secrets/secrets/:id/'
creation_path 'secrets/secrets/'
object_fields device: proc { |raw_data| Device.new raw_data['id'] },
role: proc { |raw_data| SecretRole.new raw_data['id'] }
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/secrets/secret_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SecretRole

id id: :id
deletable true
path 'secrets/secret-roles/:id.json'
path 'secrets/secret-roles/:id/'
creation_path 'secrets/secret-roles/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/tenancy/tenant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Tenant

id id: :id
deletable true
path 'tenancy/tenants/:id.json'
path 'tenancy/tenants/:id/'
creation_path 'tenancy/tenants/'
object_fields group: proc { |raw_data| TenantGroup.new raw_data['id'] }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/tenancy/tenant_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TenantGroup

id id: :id
deletable true
path 'tenancy/tenant-groups/:id.json'
path 'tenancy/tenant-groups/:id/'
creation_path 'tenancy/tenant-groups/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/virtualization/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Cluster

id id: :id
deletable true
path 'virtualization/clusters/:id.json'
path 'virtualization/clusters/:id/'
creation_path 'virtualization/clusters/'
object_fields(
group: proc { |raw_data| ClusterGroup.new raw_data['id'] },
Expand Down
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/virtualization/cluster_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ClusterGroup

id id: :id
deletable true
path 'virtualization/cluster-groups/:id.json'
path 'virtualization/cluster-groups/:id/'
creation_path 'virtualization/cluster-groups/'
end
end
Expand Down
Loading