mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
refactor info
the current implementation of info, while typed, is very loosely done so. we need stronger types for our apiv2 implmentation and bindings. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/containers/image/v5/manifest"
|
||||
"github.com/containers/libpod/libpod/define"
|
||||
"github.com/containers/libpod/pkg/api/handlers/utils"
|
||||
"github.com/containers/libpod/pkg/domain/entities"
|
||||
"github.com/pkg/errors"
|
||||
@ -76,6 +77,13 @@ type swagRmPodResponse struct {
|
||||
Body entities.PodRmReport
|
||||
}
|
||||
|
||||
// Info
|
||||
// swagger:response InfoResponse
|
||||
type swagInfoResponse struct {
|
||||
// in:body
|
||||
Body define.Info
|
||||
}
|
||||
|
||||
func ServeSwagger(w http.ResponseWriter, r *http.Request) {
|
||||
path := DefaultPodmanSwaggerSpec
|
||||
if p, found := os.LookupEnv("PODMAN_SWAGGER_SPEC"); found {
|
||||
|
Reference in New Issue
Block a user