Due to update in oapi-codegen it appears it generates different methods/funcs, but tested the provider for manufacturers and it works, not sure if something broke.
parent
315bd8d536
commit
2be79dd3a0
|
|
@ -34,8 +34,8 @@ get-api:
|
|||
cd client; wget https://demo.nautobot.com/api/swagger.yaml\?api_version\=1.3 -O swagger.yaml
|
||||
|
||||
generate: get-api
|
||||
cd client; oapi-codegen -generate client -o nautobot.go -package nautobot test.swagger.yaml && \
|
||||
oapi-codegen -generate types -o types.go -package nautobot test.swagger.yaml && \
|
||||
cd client; oapi-codegen -generate client -o nautobot.go -package nautobot swagger.yaml && \
|
||||
oapi-codegen -generate types -o types.go -package nautobot swagger.yaml && \
|
||||
go mod tidy
|
||||
|
||||
test:
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ type Site struct {
|
|||
ContactName *string `json:"contact_name,omitempty"`
|
||||
ContactPhone *string `json:"contact_phone,omitempty"`
|
||||
Created *types.Date `json:"created,omitempty"`
|
||||
CustomFields *nb.Site_CustomFields `json:"custom_fields,omitempty"`
|
||||
CustomFields *nb.CustomFieldChoice `json:"custom_fields,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
DeviceCount *int `json:"device_count,omitempty"`
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ func resourceManufacturerCreate(ctx context.Context, d *schema.ResourceData, met
|
|||
c := meta.(*apiClient).Client
|
||||
s := meta.(*apiClient).Server
|
||||
|
||||
var m nb.Manufacturer
|
||||
var m nb.ManufacturerRequest
|
||||
|
||||
name, ok := d.GetOk("name")
|
||||
n := name.(string)
|
||||
|
|
@ -243,7 +243,7 @@ func resourceManufacturerUpdate(ctx context.Context, d *schema.ResourceData, met
|
|||
name := d.Get("name").(string)
|
||||
id := d.Get("id").(string)
|
||||
|
||||
var m nb.PatchedManufacturer
|
||||
var m nb.PatchedManufacturerRequest
|
||||
|
||||
if d.HasChange("name") {
|
||||
m.Name = &name
|
||||
|
|
|
|||
Loading…
Reference in New Issue