Skip to content

Make 'device_count' not required #3

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

Merged
merged 1 commit into from
Sep 19, 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
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ build:
$(EXEC) go mod tidy
$(EXEC) goimports -w .

# Build without fetching a new version of openapi.yaml from netbox-docker
.PHONY: build
build:
$(EXEC) ./scripts/set-versions.sh $(NETBOX_VERSION) $(NETBOX_DOCKER_VERSION)
$(EXEC) ./scripts/fix-spec.py
./scripts/generate-code.sh
$(EXEC) go mod tidy
$(EXEC) goimports -w .

.PHONY: test
test:
$(EXEC) go test -v ./...
12 changes: 0 additions & 12 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105936,7 +105936,6 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- name
Expand Down Expand Up @@ -105993,7 +105992,6 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- manufacturer
Expand Down Expand Up @@ -106865,7 +106863,6 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- name
Expand Down Expand Up @@ -107258,7 +107255,6 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- name
Expand Down Expand Up @@ -109543,7 +109539,6 @@ components:
readOnly: true
required:
- created
- device_count
- display
- display_url
- id
Expand Down Expand Up @@ -113079,7 +113074,6 @@ components:
readOnly: true
required:
- created
- device_count
- display
- display_url
- id
Expand Down Expand Up @@ -113337,7 +113331,6 @@ components:
- console_server_port_template_count
- created
- device_bay_template_count
- device_count
- display
- display_url
- front_port_template_count
Expand Down Expand Up @@ -122378,7 +122371,6 @@ components:
required:
- _depth
- created
- device_count
- display
- display_url
- id
Expand Down Expand Up @@ -136602,7 +136594,6 @@ components:
readOnly: true
required:
- created
- device_count
- display
- display_url
- id
Expand Down Expand Up @@ -141339,7 +141330,6 @@ components:
readOnly: true
required:
- created
- device_count
- display
- display_url
- id
Expand Down Expand Up @@ -144073,7 +144063,6 @@ components:
required:
- circuit_count
- created
- device_count
- display
- display_url
- id
Expand Down Expand Up @@ -144531,7 +144520,6 @@ components:
- circuit_count
- cluster_count
- created
- device_count
- display
- display_url
- id
Expand Down
9 changes: 7 additions & 2 deletions docs/BriefDeviceRole.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Name | Type | Description | Notes
**Name** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]

## Methods

### NewBriefDeviceRole

`func NewBriefDeviceRole(id int32, url string, display string, name string, slug string, deviceCount int64, virtualmachineCount int64, ) *BriefDeviceRole`
`func NewBriefDeviceRole(id int32, url string, display string, name string, slug string, virtualmachineCount int64, ) *BriefDeviceRole`

NewBriefDeviceRole instantiates a new BriefDeviceRole object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -176,6 +176,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *BriefDeviceRole) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetVirtualmachineCount

Expand Down
9 changes: 7 additions & 2 deletions docs/BriefDeviceType.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Name | Type | Description | Notes
**Model** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewBriefDeviceType

`func NewBriefDeviceType(id int32, url string, display string, manufacturer BriefManufacturer, model string, slug string, deviceCount int64, ) *BriefDeviceType`
`func NewBriefDeviceType(id int32, url string, display string, manufacturer BriefManufacturer, model string, slug string, ) *BriefDeviceType`

NewBriefDeviceType instantiates a new BriefDeviceType object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -196,6 +196,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *BriefDeviceType) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
9 changes: 7 additions & 2 deletions docs/BriefPlatform.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Name | Type | Description | Notes
**Name** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]

## Methods

### NewBriefPlatform

`func NewBriefPlatform(id int32, url string, display string, name string, slug string, deviceCount int64, virtualmachineCount int64, ) *BriefPlatform`
`func NewBriefPlatform(id int32, url string, display string, name string, slug string, virtualmachineCount int64, ) *BriefPlatform`

NewBriefPlatform instantiates a new BriefPlatform object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -176,6 +176,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *BriefPlatform) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetVirtualmachineCount

Expand Down
9 changes: 7 additions & 2 deletions docs/BriefRack.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Name | Type | Description | Notes
**Display** | **string** | | [readonly]
**Name** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewBriefRack

`func NewBriefRack(id int32, url string, display string, name string, deviceCount int64, ) *BriefRack`
`func NewBriefRack(id int32, url string, display string, name string, ) *BriefRack`

NewBriefRack instantiates a new BriefRack object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -154,6 +154,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *BriefRack) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
9 changes: 7 additions & 2 deletions docs/Cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Name | Type | Description | Notes
**CustomFields** | Pointer to **map[string]interface{}** | | [optional]
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]

## Methods

### NewCluster

`func NewCluster(id int32, url string, displayUrl string, display string, name string, type_ BriefClusterType, created NullableTime, lastUpdated NullableTime, deviceCount int64, virtualmachineCount int64, ) *Cluster`
`func NewCluster(id int32, url string, displayUrl string, display string, name string, type_ BriefClusterType, created NullableTime, lastUpdated NullableTime, virtualmachineCount int64, ) *Cluster`

NewCluster instantiates a new Cluster object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -471,6 +471,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *Cluster) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetVirtualmachineCount

Expand Down
9 changes: 7 additions & 2 deletions docs/DeviceRole.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Name | Type | Description | Notes
**CustomFields** | Pointer to **map[string]interface{}** | | [optional]
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]

## Methods

### NewDeviceRole

`func NewDeviceRole(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, deviceCount int64, virtualmachineCount int64, ) *DeviceRole`
`func NewDeviceRole(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, virtualmachineCount int64, ) *DeviceRole`

NewDeviceRole instantiates a new DeviceRole object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -399,6 +399,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *DeviceRole) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetVirtualmachineCount

Expand Down
9 changes: 7 additions & 2 deletions docs/DeviceType.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Name | Type | Description | Notes
**CustomFields** | Pointer to **map[string]interface{}** | | [optional]
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**ConsolePortTemplateCount** | **int32** | | [readonly]
**ConsoleServerPortTemplateCount** | **int32** | | [readonly]
**PowerPortTemplateCount** | **int32** | | [readonly]
Expand All @@ -44,7 +44,7 @@ Name | Type | Description | Notes

### NewDeviceType

`func NewDeviceType(id int32, url string, displayUrl string, display string, manufacturer BriefManufacturer, model string, slug string, created NullableTime, lastUpdated NullableTime, deviceCount int64, consolePortTemplateCount int32, consoleServerPortTemplateCount int32, powerPortTemplateCount int32, powerOutletTemplateCount int32, interfaceTemplateCount int32, frontPortTemplateCount int32, rearPortTemplateCount int32, deviceBayTemplateCount int32, moduleBayTemplateCount int32, inventoryItemTemplateCount int32, ) *DeviceType`
`func NewDeviceType(id int32, url string, displayUrl string, display string, manufacturer BriefManufacturer, model string, slug string, created NullableTime, lastUpdated NullableTime, consolePortTemplateCount int32, consoleServerPortTemplateCount int32, powerPortTemplateCount int32, powerOutletTemplateCount int32, interfaceTemplateCount int32, frontPortTemplateCount int32, rearPortTemplateCount int32, deviceBayTemplateCount int32, moduleBayTemplateCount int32, inventoryItemTemplateCount int32, ) *DeviceType`

NewDeviceType instantiates a new DeviceType object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -723,6 +723,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *DeviceType) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetConsolePortTemplateCount

Expand Down
9 changes: 7 additions & 2 deletions docs/Location.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Name | Type | Description | Notes
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**RackCount** | **int32** | | [readonly] [default to 0]
**DeviceCount** | **int32** | | [readonly] [default to 0]
**DeviceCount** | Pointer to **int32** | | [optional] [readonly] [default to 0]
**Depth** | **int32** | | [readonly]

## Methods

### NewLocation

`func NewLocation(id int32, url string, displayUrl string, display string, name string, slug string, site BriefSite, created NullableTime, lastUpdated NullableTime, rackCount int32, deviceCount int32, depth int32, ) *Location`
`func NewLocation(id int32, url string, displayUrl string, display string, name string, slug string, site BriefSite, created NullableTime, lastUpdated NullableTime, rackCount int32, depth int32, ) *Location`

NewLocation instantiates a new Location object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -477,6 +477,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *Location) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetDepth

Expand Down
9 changes: 7 additions & 2 deletions docs/Platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Name | Type | Description | Notes
**CustomFields** | Pointer to **map[string]interface{}** | | [optional]
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]

## Methods

### NewPlatform

`func NewPlatform(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, deviceCount int64, virtualmachineCount int64, ) *Platform`
`func NewPlatform(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, virtualmachineCount int64, ) *Platform`

NewPlatform instantiates a new Platform object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -383,6 +383,11 @@ and a boolean to check if the value has been set.

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *Platform) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetVirtualmachineCount

Expand Down
Loading