small changes and doc regen

feature-refactor
lhz 3 years ago
parent 0dcb86ba69
commit d08447208e

@ -10,9 +10,11 @@ RUN go build -v -ldflags '-extldflags "-static"' ./...
RUN go install -v ./...
# run
FROM scratch
WORKDIR /go/src/microsrv
FROM busybox
RUN adduser -D -u 5000 app
USER app:app
WORKDIR /go/bin/
ENV GOPATH /go
COPY --from=build /go /go
COPY --from=build /go/bin/microsrv /go/bin/microsrv
EXPOSE 9090
CMD ["/go/bin/microsrv"]

@ -10,7 +10,7 @@ import (
"github.com/go-openapi/swag"
)
// GenericError GenericError GenericError GenericError GenericError is a generic error message returned by the server
// GenericError GenericError GenericError GenericError GenericError GenericError is a generic error message returned by the server
//
// swagger:model GenericError
type GenericError struct {

@ -12,7 +12,7 @@ import (
"github.com/go-openapi/validate"
)
// Product Product Product Product product
// Product Product Product Product Product product
//
// swagger:model Product
type Product struct {

@ -10,7 +10,7 @@ import (
"github.com/go-openapi/swag"
)
// ValidationError ValidationError ValidationError ValidationError ValidationError is a collection of validation error messages
// ValidationError ValidationError ValidationError ValidationError ValidationError ValidationError is a collection of validation error messages
//
// swagger:model ValidationError
type ValidationError struct {

@ -20,7 +20,7 @@ func TestClient(t *testing.T) {
prodsParams := products.NewGetProductsParams()
prods, errs := c.Products.GetProducts(prodsParams)
if errs != nil {
t.Fatal(err)
t.Fatal(errs)
}
fmt.Println(prod)
@ -34,5 +34,5 @@ func TestClient(t *testing.T) {
//Aka if you actually want to test
//Lmao
//Nobody tests
t.Fail()
//t.Fail()
}

@ -3,8 +3,8 @@ consumes:
- application/json
definitions:
GenericError:
description: GenericError GenericError GenericError GenericError is a generic
error message returned by the server
description: GenericError GenericError GenericError GenericError GenericError
is a generic error message returned by the server
properties:
message:
description: message
@ -13,7 +13,7 @@ definitions:
type: object
x-go-package: microsrv/client/models
Product:
description: Product Product Product product
description: Product Product Product Product product
properties:
desc:
description: the description for the coffee
@ -50,8 +50,8 @@ definitions:
type: object
x-go-package: microsrv/client/models
ValidationError:
description: ValidationError ValidationError ValidationError ValidationError is
a collection of validation error messages
description: ValidationError ValidationError ValidationError ValidationError ValidationError
is a collection of validation error messages
properties:
messages:
description: messages

Loading…
Cancel
Save