Skip to content

Commit

Permalink
helper instances for SecurityDefinitions
Browse files Browse the repository at this point in the history
  • Loading branch information
taojang committed Jan 11, 2020
1 parent 8631bd2 commit 1081581
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Data/Swagger/Lens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ instance At Responses where at n = responses . at n
instance Ixed Operation where ix n = responses . ix n
instance At Operation where at n = responses . at n

type instance Index SecurityDefinitions = Text
type instance IxValue SecurityDefinitions = SecurityScheme

instance Ixed SecurityDefinitions where ix n = (coerced :: Lens' SecurityDefinitions (Definitions SecurityScheme)). ix n
instance At SecurityDefinitions where at n = (coerced :: Lens' SecurityDefinitions (Definitions SecurityScheme)). at n

instance HasParamSchema NamedSchema (ParamSchema 'SwaggerKindSchema) where paramSchema = schema.paramSchema

-- HasType instances
Expand Down

0 comments on commit 1081581

Please sign in to comment.