Skip to content
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

Support for Specification Extensions #11 for v3.2.2 (with aeson 2 support) #43

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
add header extensions and paramlocation ord
PPKFS authored and alexbiehl committed May 28, 2024
commit 0ce05fb2f563a55989c783c2db898f9e785390a4
5 changes: 3 additions & 2 deletions src/Data/OpenApi/Internal.hs
Original file line number Diff line number Diff line change
@@ -659,7 +659,7 @@ data ParamLocation
| ParamPath
-- | Used to pass a specific cookie value to the API.
| ParamCookie
deriving (Eq, Show, Generic, Data, Typeable)
deriving (Eq, Ord, Show, Generic, Data, Typeable)

type Format = Text

@@ -833,6 +833,7 @@ data Header = Header
, _headerExamples :: InsOrdHashMap Text (Referenced Example)

, _headerSchema :: Maybe (Referenced Schema)
, _headerExtensions :: SpecificationExtensions
} deriving (Eq, Show, Generic, Data, Typeable)

-- | The location of the API key.
@@ -1710,7 +1711,7 @@ instance HasSwaggerAesonOptions Server where
instance HasSwaggerAesonOptions Components where
swaggerAesonOptions _ = mkSwaggerAesonOptions "components"
instance HasSwaggerAesonOptions Header where
swaggerAesonOptions _ = mkSwaggerAesonOptions "header"
swaggerAesonOptions _ = mkSwaggerAesonOptions "header" & saoSubObject .~ ["extensions"]
instance AesonDefaultValue p => HasSwaggerAesonOptions (OAuth2Flow p) where
swaggerAesonOptions _ = mkSwaggerAesonOptions "oauth2" & saoSubObject .~ ["params", "extensions"]
instance HasSwaggerAesonOptions OAuth2Flows where