Skip to content

Commit

Permalink
Fix version 1.39
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jul 26, 2024
1 parent 29d0fcf commit 3a135ef
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 231 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ jobs:
# cabal test all

stack:
name: stack / ghc ${{ matrix.ghc }}
name: stack ${{matrix.resolver}} / ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
resolver:
- lts-18.28 # 8.10.7
- lts-19.33 # 9.0.2
- lts-20.26 # 9.2.8
- lts-21.25 # 9.4.8
- lts-22.30 # 9.6.6
- nightly-2024-07-26 # 9.8.2
- lts-22.30 # 9.6.6
- lts-21.25 # 9.4.8
- lts-20.26 # 9.2.8
- lts-19.33 # 9.0.2
- lts-18.28 # 8.10.7
version:
- v1.36
- v1.37
Expand Down
39 changes: 36 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@

versionSuffix = 0;

mkApiYaml = { src, patchPhase ? true }: pkgs.stdenv.mkDerivation {
name = "docker-api-1.39.${toString versionSuffix}.yaml";
inherit src;
unpackPhase = ''
cp $src api.yaml
'';
inherit patchPhase;
buildInputs = [pkgs.yq-go];
dontConfigure = true;
dontBuild = true;
installPhase = ''
cp api.yaml "$out"
'';
};

api_1_36 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.36.yaml";
hash = "sha256-6kS2MJunowLqAEhdCqi+lXLHsGb9dr2M51fuG+ENX0Q=";
Expand All @@ -21,9 +36,16 @@
url = "https://docs.docker.com/reference/engine/v1.38.yaml";
hash = "sha256-5eHhNFiO4YXVhl045OldlL8Mry72LybHzuAtJT1dfMc=";
};
api_1_39 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.39.yaml";
hash = "sha256-Oswl1SJb2MCVpTQ/P9Cj+l1gM8d7E7IXxzffmeavhFM=";
api_1_39 = mkApiYaml {
src = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.39.yaml";
hash = "sha256-Oswl1SJb2MCVpTQ/P9Cj+l1gM8d7E7IXxzffmeavhFM=";
};
patchPhase = ''
yq e -i '.definitions.ContainerSummary.type = "object"' api.yaml
yq e -i '.definitions.ContainerSummary.properties = .definitions.ContainerSummary.items.properties' api.yaml
yq e -i 'del(.definitions.ContainerSummary.items)' api.yaml
'';
};
api_1_40 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.40.yaml";
Expand Down Expand Up @@ -84,6 +106,17 @@
packages = {
inherit (pkgs) openapi-generator-cli;

inherit
api_1_36
api_1_37
api_1_38
api_1_39
api_1_40
api_1_41
api_1_42
api_1_43
api_1_44;

generate1_36 = mkGenerateScript api_1_36 "v1.36";
generate1_37 = mkGenerateScript api_1_37 "v1.37";
generate1_38 = mkGenerateScript api_1_38 "v1.38";
Expand Down
1 change: 0 additions & 1 deletion v1.39/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
Setup.hs
Expand Down
2 changes: 1 addition & 1 deletion v1.39/lib/DockerEngine/API/Container.hs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ instance Produces ContainerKill MimeNoContent
-- Returns a list of containers. For details on the format, see the [inspect endpoint](#operation/ContainerInspect). Note that it uses a different, smaller representation of a container than inspecting a single container. For example, the list of linked containers is not propagated .
--
containerList
:: DockerEngineRequest ContainerList MimeNoContent [ContainerSummaryInner] MimeJSON
:: DockerEngineRequest ContainerList MimeNoContent ContainerSummary MimeJSON
containerList =
_mkRequest "GET" ["/containers/json"]

Expand Down
214 changes: 107 additions & 107 deletions v1.39/lib/DockerEngine/Model.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,30 +1416,30 @@ mkContainerState =
, containerStateHealth = Nothing
}

-- ** ContainerSummaryInner
-- | ContainerSummaryInner
data ContainerSummaryInner = ContainerSummaryInner
{ containerSummaryInnerId :: !(Maybe Text) -- ^ "Id" - The ID of this container
, containerSummaryInnerNames :: !(Maybe [Text]) -- ^ "Names" - The names that this container has been given
, containerSummaryInnerImage :: !(Maybe Text) -- ^ "Image" - The name of the image used when creating this container
, containerSummaryInnerImageId :: !(Maybe Text) -- ^ "ImageID" - The ID of the image that this container was created from
, containerSummaryInnerCommand :: !(Maybe Text) -- ^ "Command" - Command to run when starting the container
, containerSummaryInnerCreated :: !(Maybe Integer) -- ^ "Created" - When the container was created
, containerSummaryInnerPorts :: !(Maybe [Port]) -- ^ "Ports" - The ports exposed by this container
, containerSummaryInnerSizeRw :: !(Maybe Integer) -- ^ "SizeRw" - The size of files that have been created or changed by this container
, containerSummaryInnerSizeRootFs :: !(Maybe Integer) -- ^ "SizeRootFs" - The total size of all the files in this container
, containerSummaryInnerLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata.
, containerSummaryInnerState :: !(Maybe Text) -- ^ "State" - The state of this container (e.g. `Exited`)
, containerSummaryInnerStatus :: !(Maybe Text) -- ^ "Status" - Additional human-readable status of this container (e.g. `Exit 0`)
, containerSummaryInnerHostConfig :: !(Maybe ContainerSummaryInnerHostConfig) -- ^ "HostConfig"
, containerSummaryInnerNetworkSettings :: !(Maybe ContainerSummaryInnerNetworkSettings) -- ^ "NetworkSettings"
, containerSummaryInnerMounts :: !(Maybe [MountPoint]) -- ^ "Mounts"
} deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ContainerSummaryInner
instance A.FromJSON ContainerSummaryInner where
parseJSON = A.withObject "ContainerSummaryInner" $ \o ->
ContainerSummaryInner
-- ** ContainerSummary
-- | ContainerSummary
data ContainerSummary = ContainerSummary
{ containerSummaryId :: !(Maybe Text) -- ^ "Id" - The ID of this container
, containerSummaryNames :: !(Maybe [Text]) -- ^ "Names" - The names that this container has been given
, containerSummaryImage :: !(Maybe Text) -- ^ "Image" - The name of the image used when creating this container
, containerSummaryImageId :: !(Maybe Text) -- ^ "ImageID" - The ID of the image that this container was created from
, containerSummaryCommand :: !(Maybe Text) -- ^ "Command" - Command to run when starting the container
, containerSummaryCreated :: !(Maybe Integer) -- ^ "Created" - When the container was created
, containerSummaryPorts :: !(Maybe [Port]) -- ^ "Ports" - The ports exposed by this container
, containerSummarySizeRw :: !(Maybe Integer) -- ^ "SizeRw" - The size of files that have been created or changed by this container
, containerSummarySizeRootFs :: !(Maybe Integer) -- ^ "SizeRootFs" - The total size of all the files in this container
, containerSummaryLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata.
, containerSummaryState :: !(Maybe Text) -- ^ "State" - The state of this container (e.g. `Exited`)
, containerSummaryStatus :: !(Maybe Text) -- ^ "Status" - Additional human-readable status of this container (e.g. `Exit 0`)
, containerSummaryHostConfig :: !(Maybe ContainerSummaryHostConfig) -- ^ "HostConfig"
, containerSummaryNetworkSettings :: !(Maybe ContainerSummaryNetworkSettings) -- ^ "NetworkSettings"
, containerSummaryMounts :: !(Maybe [MountPoint]) -- ^ "Mounts"
} deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ContainerSummary
instance A.FromJSON ContainerSummary where
parseJSON = A.withObject "ContainerSummary" $ \o ->
ContainerSummary
<$> (o .:? "Id")
<*> (o .:? "Names")
<*> (o .:? "Image")
Expand All @@ -1456,105 +1456,105 @@ instance A.FromJSON ContainerSummaryInner where
<*> (o .:? "NetworkSettings")
<*> (o .:? "Mounts")

-- | ToJSON ContainerSummaryInner
instance A.ToJSON ContainerSummaryInner where
toJSON ContainerSummaryInner {..} =
_omitNulls
[ "Id" .= containerSummaryInnerId
, "Names" .= containerSummaryInnerNames
, "Image" .= containerSummaryInnerImage
, "ImageID" .= containerSummaryInnerImageId
, "Command" .= containerSummaryInnerCommand
, "Created" .= containerSummaryInnerCreated
, "Ports" .= containerSummaryInnerPorts
, "SizeRw" .= containerSummaryInnerSizeRw
, "SizeRootFs" .= containerSummaryInnerSizeRootFs
, "Labels" .= containerSummaryInnerLabels
, "State" .= containerSummaryInnerState
, "Status" .= containerSummaryInnerStatus
, "HostConfig" .= containerSummaryInnerHostConfig
, "NetworkSettings" .= containerSummaryInnerNetworkSettings
, "Mounts" .= containerSummaryInnerMounts
]


-- | Construct a value of type 'ContainerSummaryInner' (by applying it's required fields, if any)
mkContainerSummaryInner
:: ContainerSummaryInner
mkContainerSummaryInner =
ContainerSummaryInner
{ containerSummaryInnerId = Nothing
, containerSummaryInnerNames = Nothing
, containerSummaryInnerImage = Nothing
, containerSummaryInnerImageId = Nothing
, containerSummaryInnerCommand = Nothing
, containerSummaryInnerCreated = Nothing
, containerSummaryInnerPorts = Nothing
, containerSummaryInnerSizeRw = Nothing
, containerSummaryInnerSizeRootFs = Nothing
, containerSummaryInnerLabels = Nothing
, containerSummaryInnerState = Nothing
, containerSummaryInnerStatus = Nothing
, containerSummaryInnerHostConfig = Nothing
, containerSummaryInnerNetworkSettings = Nothing
, containerSummaryInnerMounts = Nothing
}

-- ** ContainerSummaryInnerHostConfig
-- | ContainerSummaryInnerHostConfig
data ContainerSummaryInnerHostConfig = ContainerSummaryInnerHostConfig
{ containerSummaryInnerHostConfigNetworkMode :: !(Maybe Text) -- ^ "NetworkMode"
} deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ContainerSummaryInnerHostConfig
instance A.FromJSON ContainerSummaryInnerHostConfig where
parseJSON = A.withObject "ContainerSummaryInnerHostConfig" $ \o ->
ContainerSummaryInnerHostConfig
-- | ToJSON ContainerSummary
instance A.ToJSON ContainerSummary where
toJSON ContainerSummary {..} =
_omitNulls
[ "Id" .= containerSummaryId
, "Names" .= containerSummaryNames
, "Image" .= containerSummaryImage
, "ImageID" .= containerSummaryImageId
, "Command" .= containerSummaryCommand
, "Created" .= containerSummaryCreated
, "Ports" .= containerSummaryPorts
, "SizeRw" .= containerSummarySizeRw
, "SizeRootFs" .= containerSummarySizeRootFs
, "Labels" .= containerSummaryLabels
, "State" .= containerSummaryState
, "Status" .= containerSummaryStatus
, "HostConfig" .= containerSummaryHostConfig
, "NetworkSettings" .= containerSummaryNetworkSettings
, "Mounts" .= containerSummaryMounts
]


-- | Construct a value of type 'ContainerSummary' (by applying it's required fields, if any)
mkContainerSummary
:: ContainerSummary
mkContainerSummary =
ContainerSummary
{ containerSummaryId = Nothing
, containerSummaryNames = Nothing
, containerSummaryImage = Nothing
, containerSummaryImageId = Nothing
, containerSummaryCommand = Nothing
, containerSummaryCreated = Nothing
, containerSummaryPorts = Nothing
, containerSummarySizeRw = Nothing
, containerSummarySizeRootFs = Nothing
, containerSummaryLabels = Nothing
, containerSummaryState = Nothing
, containerSummaryStatus = Nothing
, containerSummaryHostConfig = Nothing
, containerSummaryNetworkSettings = Nothing
, containerSummaryMounts = Nothing
}

-- ** ContainerSummaryHostConfig
-- | ContainerSummaryHostConfig
data ContainerSummaryHostConfig = ContainerSummaryHostConfig
{ containerSummaryHostConfigNetworkMode :: !(Maybe Text) -- ^ "NetworkMode"
} deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ContainerSummaryHostConfig
instance A.FromJSON ContainerSummaryHostConfig where
parseJSON = A.withObject "ContainerSummaryHostConfig" $ \o ->
ContainerSummaryHostConfig
<$> (o .:? "NetworkMode")

-- | ToJSON ContainerSummaryInnerHostConfig
instance A.ToJSON ContainerSummaryInnerHostConfig where
toJSON ContainerSummaryInnerHostConfig {..} =
-- | ToJSON ContainerSummaryHostConfig
instance A.ToJSON ContainerSummaryHostConfig where
toJSON ContainerSummaryHostConfig {..} =
_omitNulls
[ "NetworkMode" .= containerSummaryInnerHostConfigNetworkMode
[ "NetworkMode" .= containerSummaryHostConfigNetworkMode
]


-- | Construct a value of type 'ContainerSummaryInnerHostConfig' (by applying it's required fields, if any)
mkContainerSummaryInnerHostConfig
:: ContainerSummaryInnerHostConfig
mkContainerSummaryInnerHostConfig =
ContainerSummaryInnerHostConfig
{ containerSummaryInnerHostConfigNetworkMode = Nothing
-- | Construct a value of type 'ContainerSummaryHostConfig' (by applying it's required fields, if any)
mkContainerSummaryHostConfig
:: ContainerSummaryHostConfig
mkContainerSummaryHostConfig =
ContainerSummaryHostConfig
{ containerSummaryHostConfigNetworkMode = Nothing
}

-- ** ContainerSummaryInnerNetworkSettings
-- | ContainerSummaryInnerNetworkSettings
-- ** ContainerSummaryNetworkSettings
-- | ContainerSummaryNetworkSettings
-- A summary of the container's network settings
data ContainerSummaryInnerNetworkSettings = ContainerSummaryInnerNetworkSettings
{ containerSummaryInnerNetworkSettingsNetworks :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "Networks"
data ContainerSummaryNetworkSettings = ContainerSummaryNetworkSettings
{ containerSummaryNetworkSettingsNetworks :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "Networks"
} deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ContainerSummaryInnerNetworkSettings
instance A.FromJSON ContainerSummaryInnerNetworkSettings where
parseJSON = A.withObject "ContainerSummaryInnerNetworkSettings" $ \o ->
ContainerSummaryInnerNetworkSettings
-- | FromJSON ContainerSummaryNetworkSettings
instance A.FromJSON ContainerSummaryNetworkSettings where
parseJSON = A.withObject "ContainerSummaryNetworkSettings" $ \o ->
ContainerSummaryNetworkSettings
<$> (o .:? "Networks")

-- | ToJSON ContainerSummaryInnerNetworkSettings
instance A.ToJSON ContainerSummaryInnerNetworkSettings where
toJSON ContainerSummaryInnerNetworkSettings {..} =
-- | ToJSON ContainerSummaryNetworkSettings
instance A.ToJSON ContainerSummaryNetworkSettings where
toJSON ContainerSummaryNetworkSettings {..} =
_omitNulls
[ "Networks" .= containerSummaryInnerNetworkSettingsNetworks
[ "Networks" .= containerSummaryNetworkSettingsNetworks
]


-- | Construct a value of type 'ContainerSummaryInnerNetworkSettings' (by applying it's required fields, if any)
mkContainerSummaryInnerNetworkSettings
:: ContainerSummaryInnerNetworkSettings
mkContainerSummaryInnerNetworkSettings =
ContainerSummaryInnerNetworkSettings
{ containerSummaryInnerNetworkSettingsNetworks = Nothing
-- | Construct a value of type 'ContainerSummaryNetworkSettings' (by applying it's required fields, if any)
mkContainerSummaryNetworkSettings
:: ContainerSummaryNetworkSettings
mkContainerSummaryNetworkSettings =
ContainerSummaryNetworkSettings
{ containerSummaryNetworkSettingsNetworks = Nothing
}

-- ** ContainerTopResponse
Expand Down Expand Up @@ -7413,7 +7413,7 @@ mkSystemAuthResponse systemAuthResponseStatus =
data SystemDataUsageResponse = SystemDataUsageResponse
{ systemDataUsageResponseLayersSize :: !(Maybe Integer) -- ^ "LayersSize"
, systemDataUsageResponseImages :: !(Maybe [ImageSummary]) -- ^ "Images"
, systemDataUsageResponseContainers :: !(Maybe [Array]) -- ^ "Containers"
, systemDataUsageResponseContainers :: !(Maybe [ContainerSummary]) -- ^ "Containers"
, systemDataUsageResponseVolumes :: !(Maybe [Volume]) -- ^ "Volumes"
, systemDataUsageResponseBuildCache :: !(Maybe [BuildCache]) -- ^ "BuildCache"
} deriving (P.Show, P.Eq, P.Typeable)
Expand Down
Loading

0 comments on commit 3a135ef

Please sign in to comment.