Skip to content

Commit

Permalink
Merge pull request #171 from olekgo/master
Browse files Browse the repository at this point in the history
Fix `site.asns` and `interface.tagged_vlans` schema specs
  • Loading branch information
v0ctor authored May 6, 2024
2 parents 239313c + 9fd3ed3 commit f2a865c
Show file tree
Hide file tree
Showing 11 changed files with 447 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ docs/ModuleStatusLabel.md
docs/ModuleStatusValue.md
docs/ModuleType.md
docs/ModuleTypeRequest.md
docs/NestedASN.md
docs/NestedCable.md
docs/NestedCableRequest.md
docs/NestedCircuit.md
Expand Down Expand Up @@ -1236,6 +1237,7 @@ model_module_status_label.go
model_module_status_value.go
model_module_type.go
model_module_type_request.go
model_nested_asn.go
model_nested_cable.go
model_nested_cable_request.go
model_nested_circuit.go
Expand Down
32 changes: 30 additions & 2 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104425,7 +104425,7 @@ components:
tagged_vlans:
type: array
items:
type: integer
$ref: '#/components/schemas/NestedVLAN'
mark_connected:
type: boolean
description: Treat as if a cable is connected
Expand Down Expand Up @@ -108426,6 +108426,34 @@ components:
- display
- id
- url
NestedASN:
type: object
description: |-
Represents an object related through a ForeignKey field. On write, it accepts a primary key (PK) value or a
dictionary of attributes which can be used to uniquely identify the related object. This class should be
subclassed to return a full representation of the related object on read.
properties:
id:
type: integer
readOnly: true
url:
type: string
format: uri
readOnly: true
display:
type: string
readOnly: true
asn:
type: integer
maximum: 4294967295
minimum: 1
format: int64
description: 16- or 32-bit autonomous system number
required:
- asn
- display
- id
- url
NestedCableRequest:
type: object
description: 'Represents an object related through a ForeignKey field. On write,
Expand Down Expand Up @@ -129233,7 +129261,7 @@ components:
asns:
type: array
items:
type: integer
$ref: '#/components/schemas/NestedASN'
tags:
type: array
items:
Expand Down
8 changes: 4 additions & 4 deletions docs/Interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Name | Type | Description | Notes
**RfChannelWidth** | Pointer to **NullableFloat64** | Populated by selected channel (if set) | [optional]
**TxPower** | Pointer to **NullableInt32** | | [optional]
**UntaggedVlan** | Pointer to [**NullableNestedVLAN**](NestedVLAN.md) | | [optional]
**TaggedVlans** | Pointer to **[]int32** | | [optional]
**TaggedVlans** | Pointer to [**[]NestedVLAN**](NestedVLAN.md) | | [optional]
**MarkConnected** | Pointer to **bool** | Treat as if a cable is connected | [optional]
**Cable** | [**NullableNestedCable**](NestedCable.md) | | [readonly]
**CableEnd** | **string** | | [readonly]
Expand Down Expand Up @@ -900,20 +900,20 @@ HasUntaggedVlan returns a boolean if a field has been set.
UnsetUntaggedVlan ensures that no value is present for UntaggedVlan, not even an explicit nil
### GetTaggedVlans

`func (o *Interface) GetTaggedVlans() []int32`
`func (o *Interface) GetTaggedVlans() []NestedVLAN`

GetTaggedVlans returns the TaggedVlans field if non-nil, zero value otherwise.

### GetTaggedVlansOk

`func (o *Interface) GetTaggedVlansOk() (*[]int32, bool)`
`func (o *Interface) GetTaggedVlansOk() (*[]NestedVLAN, bool)`

GetTaggedVlansOk returns a tuple with the TaggedVlans field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetTaggedVlans

`func (o *Interface) SetTaggedVlans(v []int32)`
`func (o *Interface) SetTaggedVlans(v []NestedVLAN)`

SetTaggedVlans sets TaggedVlans field to given value.

Expand Down
114 changes: 114 additions & 0 deletions docs/NestedASN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# NestedASN

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **int32** | | [readonly]
**Url** | **string** | | [readonly]
**Display** | **string** | | [readonly]
**Asn** | **int64** | 16- or 32-bit autonomous system number |

## Methods

### NewNestedASN

`func NewNestedASN(id int32, url string, display string, asn int64, ) *NestedASN`

NewNestedASN instantiates a new NestedASN object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed

### NewNestedASNWithDefaults

`func NewNestedASNWithDefaults() *NestedASN`

NewNestedASNWithDefaults instantiates a new NestedASN object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set

### GetId

`func (o *NestedASN) GetId() int32`

GetId returns the Id field if non-nil, zero value otherwise.

### GetIdOk

`func (o *NestedASN) GetIdOk() (*int32, bool)`

GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetId

`func (o *NestedASN) SetId(v int32)`

SetId sets Id field to given value.


### GetUrl

`func (o *NestedASN) GetUrl() string`

GetUrl returns the Url field if non-nil, zero value otherwise.

### GetUrlOk

`func (o *NestedASN) GetUrlOk() (*string, bool)`

GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetUrl

`func (o *NestedASN) SetUrl(v string)`

SetUrl sets Url field to given value.


### GetDisplay

`func (o *NestedASN) GetDisplay() string`

GetDisplay returns the Display field if non-nil, zero value otherwise.

### GetDisplayOk

`func (o *NestedASN) GetDisplayOk() (*string, bool)`

GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDisplay

`func (o *NestedASN) SetDisplay(v string)`

SetDisplay sets Display field to given value.


### GetAsn

`func (o *NestedASN) GetAsn() int64`

GetAsn returns the Asn field if non-nil, zero value otherwise.

### GetAsnOk

`func (o *NestedASN) GetAsnOk() (*int64, bool)`

GetAsnOk returns a tuple with the Asn field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetAsn

`func (o *NestedASN) SetAsn(v int64)`

SetAsn sets Asn field to given value.



[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


8 changes: 4 additions & 4 deletions docs/Site.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Name | Type | Description | Notes
**Latitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
**Longitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
**Comments** | Pointer to **string** | | [optional]
**Asns** | Pointer to **[]int32** | | [optional]
**Asns** | Pointer to [**[]NestedASN**](NestedASN.md) | | [optional]
**Tags** | Pointer to [**[]NestedTag**](NestedTag.md) | | [optional]
**CustomFields** | Pointer to **map[string]interface{}** | | [optional]
**Created** | **NullableTime** | | [readonly]
Expand Down Expand Up @@ -514,20 +514,20 @@ HasComments returns a boolean if a field has been set.

### GetAsns

`func (o *Site) GetAsns() []int32`
`func (o *Site) GetAsns() []NestedASN`

GetAsns returns the Asns field if non-nil, zero value otherwise.

### GetAsnsOk

`func (o *Site) GetAsnsOk() (*[]int32, bool)`
`func (o *Site) GetAsnsOk() (*[]NestedASN, bool)`

GetAsnsOk returns a tuple with the Asns field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetAsns

`func (o *Site) SetAsns(v []int32)`
`func (o *Site) SetAsns(v []NestedASN)`

SetAsns sets Asns field to given value.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/netbox-community/go-netbox/v3

go 1.18

require github.com/stretchr/testify v1.8.4
require github.com/stretchr/testify v1.9.0

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
12 changes: 6 additions & 6 deletions model_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f2a865c

Please sign in to comment.