Skip to content

Commit f2a865c

Browse files
authored
Merge pull request #171 from olekgo/master
Fix `site.asns` and `interface.tagged_vlans` schema specs
2 parents 239313c + 9fd3ed3 commit f2a865c

File tree

11 files changed

+447
-25
lines changed

11 files changed

+447
-25
lines changed

.openapi-generator/FILES

+2
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ docs/ModuleStatusLabel.md
315315
docs/ModuleStatusValue.md
316316
docs/ModuleType.md
317317
docs/ModuleTypeRequest.md
318+
docs/NestedASN.md
318319
docs/NestedCable.md
319320
docs/NestedCableRequest.md
320321
docs/NestedCircuit.md
@@ -1236,6 +1237,7 @@ model_module_status_label.go
12361237
model_module_status_value.go
12371238
model_module_type.go
12381239
model_module_type_request.go
1240+
model_nested_asn.go
12391241
model_nested_cable.go
12401242
model_nested_cable_request.go
12411243
model_nested_circuit.go

api/openapi.yaml

+30-2
Original file line numberDiff line numberDiff line change
@@ -104425,7 +104425,7 @@ components:
104425104425
tagged_vlans:
104426104426
type: array
104427104427
items:
104428-
type: integer
104428+
$ref: '#/components/schemas/NestedVLAN'
104429104429
mark_connected:
104430104430
type: boolean
104431104431
description: Treat as if a cable is connected
@@ -108426,6 +108426,34 @@ components:
108426108426
- display
108427108427
- id
108428108428
- url
108429+
NestedASN:
108430+
type: object
108431+
description: |-
108432+
Represents an object related through a ForeignKey field. On write, it accepts a primary key (PK) value or a
108433+
dictionary of attributes which can be used to uniquely identify the related object. This class should be
108434+
subclassed to return a full representation of the related object on read.
108435+
properties:
108436+
id:
108437+
type: integer
108438+
readOnly: true
108439+
url:
108440+
type: string
108441+
format: uri
108442+
readOnly: true
108443+
display:
108444+
type: string
108445+
readOnly: true
108446+
asn:
108447+
type: integer
108448+
maximum: 4294967295
108449+
minimum: 1
108450+
format: int64
108451+
description: 16- or 32-bit autonomous system number
108452+
required:
108453+
- asn
108454+
- display
108455+
- id
108456+
- url
108429108457
NestedCableRequest:
108430108458
type: object
108431108459
description: 'Represents an object related through a ForeignKey field. On write,
@@ -129233,7 +129261,7 @@ components:
129233129261
asns:
129234129262
type: array
129235129263
items:
129236-
type: integer
129264+
$ref: '#/components/schemas/NestedASN'
129237129265
tags:
129238129266
type: array
129239129267
items:

docs/Interface.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Name | Type | Description | Notes
3333
**RfChannelWidth** | Pointer to **NullableFloat64** | Populated by selected channel (if set) | [optional]
3434
**TxPower** | Pointer to **NullableInt32** | | [optional]
3535
**UntaggedVlan** | Pointer to [**NullableNestedVLAN**](NestedVLAN.md) | | [optional]
36-
**TaggedVlans** | Pointer to **[]int32** | | [optional]
36+
**TaggedVlans** | Pointer to [**[]NestedVLAN**](NestedVLAN.md) | | [optional]
3737
**MarkConnected** | Pointer to **bool** | Treat as if a cable is connected | [optional]
3838
**Cable** | [**NullableNestedCable**](NestedCable.md) | | [readonly]
3939
**CableEnd** | **string** | | [readonly]
@@ -900,20 +900,20 @@ HasUntaggedVlan returns a boolean if a field has been set.
900900
UnsetUntaggedVlan ensures that no value is present for UntaggedVlan, not even an explicit nil
901901
### GetTaggedVlans
902902

903-
`func (o *Interface) GetTaggedVlans() []int32`
903+
`func (o *Interface) GetTaggedVlans() []NestedVLAN`
904904

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

907907
### GetTaggedVlansOk
908908

909-
`func (o *Interface) GetTaggedVlansOk() (*[]int32, bool)`
909+
`func (o *Interface) GetTaggedVlansOk() (*[]NestedVLAN, bool)`
910910

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

914914
### SetTaggedVlans
915915

916-
`func (o *Interface) SetTaggedVlans(v []int32)`
916+
`func (o *Interface) SetTaggedVlans(v []NestedVLAN)`
917917

918918
SetTaggedVlans sets TaggedVlans field to given value.
919919

docs/NestedASN.md

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# NestedASN
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**Id** | **int32** | | [readonly]
8+
**Url** | **string** | | [readonly]
9+
**Display** | **string** | | [readonly]
10+
**Asn** | **int64** | 16- or 32-bit autonomous system number |
11+
12+
## Methods
13+
14+
### NewNestedASN
15+
16+
`func NewNestedASN(id int32, url string, display string, asn int64, ) *NestedASN`
17+
18+
NewNestedASN instantiates a new NestedASN object
19+
This constructor will assign default values to properties that have it defined,
20+
and makes sure properties required by API are set, but the set of arguments
21+
will change when the set of required properties is changed
22+
23+
### NewNestedASNWithDefaults
24+
25+
`func NewNestedASNWithDefaults() *NestedASN`
26+
27+
NewNestedASNWithDefaults instantiates a new NestedASN object
28+
This constructor will only assign default values to properties that have it defined,
29+
but it doesn't guarantee that properties required by API are set
30+
31+
### GetId
32+
33+
`func (o *NestedASN) GetId() int32`
34+
35+
GetId returns the Id field if non-nil, zero value otherwise.
36+
37+
### GetIdOk
38+
39+
`func (o *NestedASN) GetIdOk() (*int32, bool)`
40+
41+
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
42+
and a boolean to check if the value has been set.
43+
44+
### SetId
45+
46+
`func (o *NestedASN) SetId(v int32)`
47+
48+
SetId sets Id field to given value.
49+
50+
51+
### GetUrl
52+
53+
`func (o *NestedASN) GetUrl() string`
54+
55+
GetUrl returns the Url field if non-nil, zero value otherwise.
56+
57+
### GetUrlOk
58+
59+
`func (o *NestedASN) GetUrlOk() (*string, bool)`
60+
61+
GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise
62+
and a boolean to check if the value has been set.
63+
64+
### SetUrl
65+
66+
`func (o *NestedASN) SetUrl(v string)`
67+
68+
SetUrl sets Url field to given value.
69+
70+
71+
### GetDisplay
72+
73+
`func (o *NestedASN) GetDisplay() string`
74+
75+
GetDisplay returns the Display field if non-nil, zero value otherwise.
76+
77+
### GetDisplayOk
78+
79+
`func (o *NestedASN) GetDisplayOk() (*string, bool)`
80+
81+
GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise
82+
and a boolean to check if the value has been set.
83+
84+
### SetDisplay
85+
86+
`func (o *NestedASN) SetDisplay(v string)`
87+
88+
SetDisplay sets Display field to given value.
89+
90+
91+
### GetAsn
92+
93+
`func (o *NestedASN) GetAsn() int64`
94+
95+
GetAsn returns the Asn field if non-nil, zero value otherwise.
96+
97+
### GetAsnOk
98+
99+
`func (o *NestedASN) GetAsnOk() (*int64, bool)`
100+
101+
GetAsnOk returns a tuple with the Asn field if it's non-nil, zero value otherwise
102+
and a boolean to check if the value has been set.
103+
104+
### SetAsn
105+
106+
`func (o *NestedASN) SetAsn(v int64)`
107+
108+
SetAsn sets Asn field to given value.
109+
110+
111+
112+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
113+
114+

docs/Site.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Name | Type | Description | Notes
2121
**Latitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
2222
**Longitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
2323
**Comments** | Pointer to **string** | | [optional]
24-
**Asns** | Pointer to **[]int32** | | [optional]
24+
**Asns** | Pointer to [**[]NestedASN**](NestedASN.md) | | [optional]
2525
**Tags** | Pointer to [**[]NestedTag**](NestedTag.md) | | [optional]
2626
**CustomFields** | Pointer to **map[string]interface{}** | | [optional]
2727
**Created** | **NullableTime** | | [readonly]
@@ -514,20 +514,20 @@ HasComments returns a boolean if a field has been set.
514514

515515
### GetAsns
516516

517-
`func (o *Site) GetAsns() []int32`
517+
`func (o *Site) GetAsns() []NestedASN`
518518

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

521521
### GetAsnsOk
522522

523-
`func (o *Site) GetAsnsOk() (*[]int32, bool)`
523+
`func (o *Site) GetAsnsOk() (*[]NestedASN, bool)`
524524

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

528528
### SetAsns
529529

530-
`func (o *Site) SetAsns(v []int32)`
530+
`func (o *Site) SetAsns(v []NestedASN)`
531531

532532
SetAsns sets Asns field to given value.
533533

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/netbox-community/go-netbox/v3
22

33
go 1.18
44

5-
require github.com/stretchr/testify v1.8.4
5+
require github.com/stretchr/testify v1.9.0
66

77
require (
88
github.com/davecgh/go-spew v1.1.1 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
22
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
44
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
6-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
5+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
6+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
77
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
88
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
99
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

model_interface.go

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)