summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-01 15:22:15 -0400
committerGitHub <noreply@github.com>2021-10-01 15:22:15 -0400
commit9dddd6ab4bd8d5d142ffc53732668212da34b0e6 (patch)
tree31e515cbb43ffc744780d1ede4a27dd62c49704c /pkg/api
parente9d8524af5122314e47385299bf9ae3d0b000096 (diff)
parent4ea5d6971919b14698f518ca361c2312a2844d27 (diff)
downloadpodman-9dddd6ab4bd8d5d142ffc53732668212da34b0e6.tar.gz
podman-9dddd6ab4bd8d5d142ffc53732668212da34b0e6.tar.bz2
podman-9dddd6ab4bd8d5d142ffc53732668212da34b0e6.zip
Merge pull request #11833 from umohnani8/swagger
Add note about empty fields and null values for API responses
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/server/docs.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/api/server/docs.go b/pkg/api/server/docs.go
index bf15afbf9..83d9ef160 100644
--- a/pkg/api/server/docs.go
+++ b/pkg/api/server/docs.go
@@ -15,6 +15,15 @@
// NOTE: if you install the package podman-docker, it will create a symbolic
// link for /run/docker.sock to /run/podman/podman.sock
//
+// NOTE: some fields in the API response JSON are set as omitempty, which means that
+// if there is no value set for them, they will not show up in the API response. This
+// is a feature to help reduce the size of the JSON responses returned via the API.
+//
+// NOTE: due to the limitations of [go-swagger](https://github.com/go-swagger/go-swagger),
+// some field values that have a complex type show up as null in the docs as well as in the
+// API responses. This is because the zero value for the field type is null. The field
+// description in the docs will state what type the field is expected to be for such cases.
+//
// See podman-service(1) for more information.
//
// Quick Examples: