-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update swagger and proto-wire #232
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
packages: ./*.cabal | ||
source-repository-package | ||
type: git | ||
location: https://github.com/awakesecurity/proto3-wire | ||
tag: 8096a1e19431af603655e5c1f2488b5db907836c | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
module ArbitraryGeneratedTestTypes where | ||
|
||
import Data.String (fromString) | ||
import qualified Data.Text.Short as TS | ||
import qualified Data.Vector as V | ||
import qualified Proto3.Suite.Types as DotProto | ||
import Test.QuickCheck (listOf) | ||
|
@@ -15,10 +14,6 @@ import qualified TestProtoImport | |
import qualified TestProtoOneof | ||
import qualified TestProtoOneofImport | ||
|
||
instance Arbitrary TS.ShortText where | ||
arbitrary = fmap TS.fromText arbitrary | ||
shrink = map TS.fromText . shrink . TS.toText | ||
|
||
Comment on lines
-18
to
-21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Arbitrary instance for |
||
instance Arbitrary Trivial where | ||
arbitrary = Trivial <$> arbitrary | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,16 +66,16 @@ swaggerWrapperFormat = testGroup "Swagger Wrapper Format" | |
"{\"properties\":{\"wrapper\":{\"format\":\"float\",\"type\":\"number\"}},\"type\":\"object\"}" | ||
, expectSchema @TestProtoWrappers.TestInt64Value | ||
"{\"properties\":{\"wrapper\":{\"maximum\":9223372036854775807,\"format\":\"Int64Value\",\"minimum\":-9223372036854775808,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"maximum\":9223372036854775807,\"format\":\"int64\",\"minimum\":-9223372036854775808,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"format\":\"int64\",\"maximum\":9223372036854775807,\"minimum\":-9223372036854775808,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
, expectSchema @TestProtoWrappers.TestUInt64Value | ||
"{\"properties\":{\"wrapper\":{\"maximum\":18446744073709551615,\"format\":\"UInt64Value\",\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"maximum\":18446744073709551615,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"format\":\"int64\",\"maximum\":18446744073709551615,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
, expectSchema @TestProtoWrappers.TestInt32Value | ||
"{\"properties\":{\"wrapper\":{\"maximum\":2147483647,\"format\":\"Int32Value\",\"minimum\":-2147483648,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"maximum\":2147483647,\"format\":\"int32\",\"minimum\":-2147483648,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"format\":\"int32\",\"maximum\":2147483647,\"minimum\":-2147483648,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
, expectSchema @TestProtoWrappers.TestUInt32Value | ||
"{\"properties\":{\"wrapper\":{\"maximum\":4294967295,\"format\":\"UInt32Value\",\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"maximum\":4294967295,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"format\":\"int32\",\"maximum\":4294967295,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}" | ||
Comment on lines
+69
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New swagger seems to sort keys alphabetically now. |
||
, expectSchema @TestProtoWrappers.TestBoolValue | ||
"{\"properties\":{\"wrapper\":{\"format\":\"BoolValue\",\"type\":\"boolean\"}},\"type\":\"object\"}" | ||
"{\"properties\":{\"wrapper\":{\"type\":\"boolean\"}},\"type\":\"object\"}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stack was already using a commit pin for proto3-wire, added one for cabal. Also updated the pin in stack (this provides a
Data
instance forFieldNumber
)