diff --git a/Dockerfile b/Dockerfile index 4456b7f4..ce47acbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ARG TARGETOS # requires git make curl # but this base image has all of those tools already -ENV SYSL_VERSION=0.745.0 +ENV SYSL_VERSION=0.746.0 ENV ARRAI_VERSION=0.319.0 ENV PROTOC_VERSION=21.7 diff --git a/builder.Dockerfile b/builder.Dockerfile index 3ecad7c5..6879c00d 100644 --- a/builder.Dockerfile +++ b/builder.Dockerfile @@ -1,7 +1,7 @@ ARG DOCKER_BASE=golang:1.22-bookworm FROM ${DOCKER_BASE} -ENV SYSL_VERSION=0.745.0 +ENV SYSL_VERSION=0.746.0 ENV ARRAI_VERSION=0.319.0 WORKDIR /temp-deps/sysl diff --git a/codegen/arrai/auto/tests/rest_miscellaneous/cmd/gateway/main_test.go b/codegen/arrai/auto/tests/rest_miscellaneous/cmd/gateway/main_test.go index cbde9849..4bf7341f 100644 --- a/codegen/arrai/auto/tests/rest_miscellaneous/cmd/gateway/main_test.go +++ b/codegen/arrai/auto/tests/rest_miscellaneous/cmd/gateway/main_test.go @@ -366,6 +366,19 @@ func TestMiscellaneous_TypesSomethingExternal(t *testing.T) { _ = types.SomethingExternal{} } +func TestMiscellaneous_OpenApi2ArrayWithMinMax(t *testing.T) { + t.Parallel() + + a := gateway.ArrayWithMin{} + var i interface{} = a.Val + switch i.(type) { + case []gateway.Res: + // Just want to confirm that the type was generated correctly + default: + t.Fail() + } +} + func TestMiscellaneous_EmptyResponse(t *testing.T) { t.Parallel() gatewayTester := gateway.NewTestServer(t, context.Background(), createService, "") diff --git a/codegen/arrai/auto/tests/rest_miscellaneous/specs/array_response.json b/codegen/arrai/auto/tests/rest_miscellaneous/specs/array_response.json index 128f4a6b..6e7af316 100644 --- a/codegen/arrai/auto/tests/rest_miscellaneous/specs/array_response.json +++ b/codegen/arrai/auto/tests/rest_miscellaneous/specs/array_response.json @@ -29,6 +29,19 @@ "type": "string" } } + }, + "ArrayWithMin": { + "type": "object", + "properties": { + "val": { + "type": "array", + "items": { + "$ref": "#/definitions/Res" + }, + "minItems": 1, + "maxItems": 1 + } + } } } }