This repository was archived by the owner on Aug 18, 2020. It is now read-only.
File tree 4 files changed +11
-2
lines changed
4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 30
30
31
31
- Improve type safety (and as a consequence, API documentation) of account indexes (CBR-306)
32
32
33
+ - The Swagger specification had names with illegal characters. These names
34
+ where changed to be URL friendly. [ PR #3595 ] ( https://github.com/input-output-hk/cardano-sl/pull/3595 )
35
+
33
36
### Improvements
34
37
35
38
- Friendly error mistakes from deserializing invalid addresses instead of brutal 500 (CBR-283)
Original file line number Diff line number Diff line change @@ -17704,6 +17704,7 @@ license = stdenv.lib.licenses.mit;
17704
17704
, http-client
17705
17705
, http-client-tls
17706
17706
, http-types
17707
+ , insert-ordered-containers
17707
17708
, ixset-typed
17708
17709
, lens
17709
17710
, memory
@@ -17924,6 +17925,7 @@ formatting
17924
17925
hedgehog
17925
17926
hspec
17926
17927
hspec-core
17928
+ insert-ordered-containers
17927
17929
lens
17928
17930
mtl
17929
17931
normaldistribution
Original file line number Diff line number Diff line change @@ -601,6 +601,7 @@ test-suite wallet-new-specs
601
601
, cardano-sl-core-test
602
602
, cardano-sl-crypto
603
603
, cardano-sl-chain
604
+ , cardano-sl-util
604
605
, cardano-sl-util-test
605
606
, cardano-sl-wallet
606
607
, cardano-sl-wallet-new
Original file line number Diff line number Diff line change @@ -114,11 +114,14 @@ instance ToJSON a => MimeRender OctetStream (WalletResponse a) where
114
114
instance (ToSchema a , Typeable a ) => ToSchema (WalletResponse a ) where
115
115
declareNamedSchema _ = do
116
116
let a = Proxy @ a
117
- tyName = toText . show $ typeRep a
117
+ tyName = toText . map sanitize . show $ typeRep a
118
+ sanitize c
119
+ | c `elem` (" :/?#[]@!$&'()*+,;=" :: String ) = ' _'
120
+ | otherwise = c
118
121
aRef <- declareSchemaRef a
119
122
respRef <- declareSchemaRef (Proxy @ ResponseStatus )
120
123
metaRef <- declareSchemaRef (Proxy @ Metadata )
121
- pure $ NamedSchema (Just $ " WalletResponse< " <> tyName <> " > " ) $ mempty
124
+ pure $ NamedSchema (Just $ " WalletResponse- " <> tyName) $ mempty
122
125
& type_ .~ SwaggerObject
123
126
& required .~ [" data" , " status" , " meta" ]
124
127
& properties .~
You can’t perform that action at this time.
0 commit comments