Skip to content

Commit e6d5c25

Browse files
committed
Use prefixItems for tuples
+ From OpenApi 3.1 + Preserves order for tuples + e.g., when generating typescript from generated openapi specs + (a, b) becomes [a, b] instead of [a || b, a || b]
1 parent 89825c4 commit e6d5c25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Data/OpenApi/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ instance ToJSON OpenApiItems where
13691369
, "maxItems" .= (0 :: Int)
13701370
, "example" .= Array mempty
13711371
]
1372-
toJSON (OpenApiItemsArray x) = object [ "items" .= x ]
1372+
toJSON (OpenApiItemsArray x) = object [ "prefixItems" .= x ]
13731373

13741374
instance ToJSON Components where
13751375
toJSON = sopSwaggerGenericToJSON

0 commit comments

Comments
 (0)