From 02f67181a281a4d6ae6bc9b21970d3cd66718b11 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 5 Nov 2021 19:18:42 +0100 Subject: Fix swagger definition for the new mac address type The new mac address type broke the api docs. While we could successfully generate the swagger file it could not be viewed in a browser. The problem is that the swagger generation create two type definitions with the name `HardwareAddr` and this pointed back to itself. Thus the render process was stucked in an endless loop. To fix this manually rename the new type to MacAddress and overwrite the types to string because the json unmarshaller accepts the mac as string. Signed-off-by: Paul Holzinger --- libpod/network/types/network.go | 1 + 1 file changed, 1 insertion(+) (limited to 'libpod') diff --git a/libpod/network/types/network.go b/libpod/network/types/network.go index 5cf523e20..ba5e018fd 100644 --- a/libpod/network/types/network.go +++ b/libpod/network/types/network.go @@ -99,6 +99,7 @@ func (n *IPNet) UnmarshalText(text []byte) error { // that it adds the json marshal/unmarshal methods. // This allows us to read the mac from a json string // and a byte array. +// swagger:model MacAddress type HardwareAddr net.HardwareAddr func (h *HardwareAddr) String() string { -- cgit v1.2.3-54-g00ecf