Skip to content

Commit 0264c6a

Browse files
committed
Add NameSegment ToJSON orphan instance
1 parent 80fc452 commit 0264c6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unison-share-api/src/Unison/Server/Orphans.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ instance ToJSONKey Name where
173173
instance ToSchema Name where
174174
declareNamedSchema _ = declareNamedSchema (Proxy @Text)
175175

176+
instance ToJSON NameSegment where
177+
toJSON = toJSON . NameSegment.toEscapedText
178+
176179
deriving anyclass instance ToParamSchema ShortCausalHash
177180

178181
instance ToParamSchema ShortHash where

0 commit comments

Comments
 (0)