git.iko.soy/typeable/swagger2
on master help sign in
Add HasParamSchema instance for NamedSchema
5411e2eNickolay Kudasov
src/Data/Swagger/Lens.hs+3−1
@@ -83,10 +83,12 @@ instance At Responses where at n = responses . at n
83instance Ixed Operation where ix n = responses . ix n
83instance Ixed Operation where ix n = responses . ix n
84instance At Operation where at n = responses . at n
84instance At Operation where at n = responses . at n
85
85
86+instance HasParamSchema NamedSchema (ParamSchema Schema) where paramSchema = schema.paramSchema
87+
86-- HasType instances
88-- HasType instances
87instance HasType Header (SwaggerType Header) where type_ = paramSchema.type_
89instance HasType Header (SwaggerType Header) where type_ = paramSchema.type_
88instance HasType Schema (SwaggerType Schema) where type_ = paramSchema.type_
90instance HasType Schema (SwaggerType Schema) where type_ = paramSchema.type_
89−instance HasType NamedSchema (SwaggerType Schema) where type_ = schema.paramSchema.type_
91+instance HasType NamedSchema (SwaggerType Schema) where type_ = paramSchema.type_
90instance HasType ParamOtherSchema (SwaggerType ParamOtherSchema) where type_ = paramSchema.type_
92instance HasType ParamOtherSchema (SwaggerType ParamOtherSchema) where type_ = paramSchema.type_
91
93
92-- HasDefault instances
94-- HasDefault instances