Skip to content

Commit

Permalink
Bump sysl to fix generating openapi2 specs with min/max (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriehSchneier authored Jun 11, 2024
1 parent c23ce89 commit faf4a0b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@
"type": "string"
}
}
},
"ArrayWithMin": {
"type": "object",
"properties": {
"val": {
"type": "array",
"items": {
"$ref": "#/definitions/Res"
},
"minItems": 1,
"maxItems": 1
}
}
}
}
}

0 comments on commit faf4a0b

Please sign in to comment.