openapi3-3.2.3: OpenAPI 3.0 data model
Maintainer Nickolay Kudasov <nickolay@getshoptv.com>
Stability experimental
Safe Haskell None
Language Haskell2010

Data.OpenApi

Description

Swagger™ is a project used to describe and document RESTful APIs.

The Swagger specification defines a set of files required to describe such an API. These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various languages. Additional utilities can also take advantage of the resulting files, such as testing tools.

Synopsis

How to use this library

This section explains how to use this library to work with Swagger specification.

Monoid instances

Virtually all types representing Swagger specification have Monoid instances. The Monoid type class provides two methods — mempty and mappend .

In this library you can use mempty for a default/empty value. For instance:

>>> BSL.putStrLn $ encodePretty (mempty :: OpenApi)
{
    "components": {},
    "info": {
        "title": "",
        "version": ""
    },
    "openapi": "3.0.0",
    "paths": {}
}

As you can see some spec properties (e.g. "version" ) are there even when the spec is empty. That is because these properties are actually required ones.

You should always override the default (empty) value for these properties, although it is not strictly necessary:

>>> BSL.putStrLn $ encodePretty mempty { _infoTitle = "Todo API", _infoVersion = "1.0" }
{
    "title": "Todo API",
    "version": "1.0"
}

You can merge two values using mappend or its infix version ( <> ) :

>>> BSL.putStrLn $ encodePretty $ mempty { _infoTitle = "Todo API" } <> mempty { _infoVersion = "1.0" }
{
    "title": "Todo API",
    "version": "1.0"
}

Lenses and prisms

Note: if you're working with the optics library, take a look at Data.OpenApi.Optics .

Since Swagger has a fairly complex structure, lenses and prisms are used to work comfortably with it. In combination with Monoid instances, lenses make it fairly simple to construct/modify any part of the specification:

>>> :{
BSL.putStrLn $ encodePretty $ (mempty :: OpenApi)
  & components . schemas .~ IOHM.fromList [ ("User", mempty & type_ ?~ OpenApiString) ]
  & paths .~
    IOHM.fromList [ ("/user", mempty & get ?~ (mempty
        & at 200 ?~ ("OK" & _Inline.content.at "application/json" ?~ (mempty & schema ?~ Ref (Reference "User")))
        & at 404 ?~ "User info not found")) ]
:}
{
    "components": {
        "schemas": {
            "User": {
                "type": "string"
            }
        }
    },
    "info": {
        "title": "",
        "version": ""
    },
    "openapi": "3.0.0",
    "paths": {
        "/user": {
            "get": {
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/User"
                                }
                            }
                        },
                        "description": "OK"
                    },
                    "404": {
                        "description": "User info not found"
                    }
                }
            }
        }
    }
}

In the snippet above we declare an API with a single path /user . This path provides method GET which produces application/json output. It should respond with code 200 and body specified by schema User which is defined in definitions property of swagger specification. Alternatively it may respond with code 404 meaning that user info is not found.

For convenience, swagger2 uses classy field lenses . It means that field accessor names can be overloaded for different types. One such common field is description . Many components of a Swagger specification can have descriptions, and you can use the same name for them:

>>> BSL.putStrLn $ encodePretty $ (mempty :: Response) & description .~ "No content"
{
    "description": "No content"
}
>>> :{
BSL.putStrLn $ encodePretty $ (mempty :: Schema)
  & type_       ?~ OpenApiBoolean
  & description ?~ "To be or not to be"
:}
{
    "description": "To be or not to be",
    "type": "boolean"
}

Additionally, to simplify working with Response , both Operation and Responses have direct access to it via at code . Example:

>>> :{
BSL.putStrLn $ encodePretty $ (mempty :: Operation)
  & at 404 ?~ "Not found"
:}
{
    "responses": {
        "404": {
            "description": "Not found"
        }
    }
}

You might've noticed that type_ has an extra underscore in its name compared to, say, description field accessor. This is because type is a keyword in Haskell. A few other field accessors are modified in this way:

Schema specification

ParamSchema and Schema are the two core types for data model specification.

ParamSchema t specifies all the common properties, available for every data schema. The t parameter imposes some restrictions on type and items properties (see OpenApiType and OpenApiItems ).

Schema is used for request and response bodies and allows specifying objects with properties in addition to what ParamSchema provides.

In most cases you will have a Haskell data type for which you would like to define a corresponding schema. To facilitate this use case swagger2 provides two classes for schema encoding. Both these classes provide means to encode types as Swagger schemas .

ToParamSchema is intended to be used for primitive API endpoint parameters, such as query parameters, headers and URL path pieces. Its corresponding value-encoding class is ToHttpApiData (from http-api-data package).

ToSchema is used for request and response bodies and mostly differ from primitive parameters by allowing objects/mappings in addition to primitive types and arrays. Its corresponding value-encoding class is ToJSON (from aeson package).

While lenses and prisms make it easy to define schemas, it might be that you don't need to: ToSchema and ToParamSchema classes both have default Generic -based implementations!

ToSchema default implementation is also aligned with ToJSON default implementation with the only difference being for sum encoding. ToJSON defaults sum encoding to defaultTaggedObject , while ToSchema defaults to something which corresponds to ObjectWithSingleField . This is due to defaultTaggedObject behavior being hard to specify in Swagger.

Here's an example showing ToJSON ToSchema correspondance:

>>> data Person = Person { name :: String, age :: Integer } deriving Generic
>>> instance ToJSON Person
>>> instance ToSchema Person
>>> BSL.putStrLn $ encodePretty (Person "David" 28)
{
    "age": 28,
    "name": "David"
}
>>> BSL.putStrLn $ encodePretty $ toSchema (Proxy :: Proxy Person)
{
    "properties": {
        "age": {
            "type": "integer"
        },
        "name": {
            "type": "string"
        }
    },
    "required": [
        "name",
        "age"
    ],
    "type": "object"
}

This package implements OpenAPI 3.0 spec, which supports oneOf in schemas, allowing any sum types to be faithfully represented. All sum encodings supported by aeson are supported here as well, with an exception of TwoElemArray , since OpenAPI spec does not support heterogeneous arrays.

An example with TaggedObject encoding:

>>> data Error = ErrorNoUser { userId :: Int } | ErrorAccessDenied { requiredPermission :: String } deriving Generic
>>> instance ToJSON Error
>>> instance ToSchema Error
>>> BSL.putStrLn $ encodePretty $ toSchema (Proxy :: Proxy Error)
{
    "oneOf": [
        {
            "properties": {
                "tag": {
                    "enum": [
                        "ErrorNoUser"
                    ],
                    "type": "string"
                },
                "userId": {
                    "maximum": 9223372036854775807,
                    "minimum": -9223372036854775808,
                    "type": "integer"
                }
            },
            "required": [
                "userId",
                "tag"
            ],
            "type": "object"
        },
        {
            "properties": {
                "requiredPermission": {
                    "type": "string"
                },
                "tag": {
                    "enum": [
                        "ErrorAccessDenied"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "requiredPermission",
                "tag"
            ],
            "type": "object"
        }
    ]
}

Manipulation

Sometimes you have to work with an imported or generated Swagger . For instance, http://hackage.haskell.org/package/servant-swagger generates basic Swagger for a type-level servant API.

Lenses and prisms can be used to manipulate such specification to add additional information, tags, extra responses, etc. To facilitate common needs, Data.OpenApi.Operation module provides useful helpers.

Validation

While ToParamSchema and ToSchema provide means to easily obtain schemas for Haskell types, there is no static mechanism to ensure those instances correspond to the ToHttpApiData or ToJSON instances.

Data.OpenApi.Schema.Validation addresses ToJSON / ToSchema validation.

Re-exports

Swagger specification

data OpenApi Source #

This is the root document object for the API specification.

Constructors

OpenApi

Fields

Instances

Instances details
Eq OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

Data OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> OpenApi -> c OpenApi Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c OpenApi Source #

toConstr :: OpenApi -> Constr Source #

dataTypeOf :: OpenApi -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c OpenApi ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c OpenApi ) Source #

gmapT :: ( forall b. Data b => b -> b) -> OpenApi -> OpenApi Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> OpenApi -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> OpenApi -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> OpenApi -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> OpenApi -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> OpenApi -> m OpenApi Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> OpenApi -> m OpenApi Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> OpenApi -> m OpenApi Source #

Show OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

Generic OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

Semigroup OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

Monoid OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

Generic OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

Associated Types

type Code OpenApi :: [[ Type ]] Source #

HasDatatypeInfo OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

HasOpenapi OpenApi OpenApiSpecVersion Source #
Instance details

Defined in Data.OpenApi.Lens

HasInfo OpenApi Info Source #
Instance details

Defined in Data.OpenApi.Lens

HasComponents OpenApi Components Source #
Instance details

Defined in Data.OpenApi.Lens

(k ~ A_Lens , a ~ Components , b ~ Components ) => LabelOptic "components" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe ExternalDocs , b ~ Maybe ExternalDocs ) => LabelOptic "externalDocs" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Info , b ~ Info ) => LabelOptic "info" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ OpenApiSpecVersion , b ~ OpenApiSpecVersion ) => LabelOptic "openapi" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ InsOrdHashMap FilePath PathItem , b ~ InsOrdHashMap FilePath PathItem ) => LabelOptic "paths" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ [ SecurityRequirement ], b ~ [ SecurityRequirement ]) => LabelOptic "security" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ [ Server ], b ~ [ Server ]) => LabelOptic "servers" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ InsOrdHashSet Tag , b ~ InsOrdHashSet Tag ) => LabelOptic "tags" k OpenApi OpenApi a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasTags OpenApi ( InsOrdHashSet Tag ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasServers OpenApi [ Server ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasSecurity OpenApi [ SecurityRequirement ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasExternalDocs OpenApi ( Maybe ExternalDocs ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPaths OpenApi ( InsOrdHashMap FilePath PathItem ) Source #
Instance details

Defined in Data.OpenApi.Lens

type Rep OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

type Code OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

type DatatypeInfoOf OpenApi Source #
Instance details

Defined in Data.OpenApi.Internal

data Server Source #

An object representing a Server.

Constructors

Server

Fields

Instances

Instances details
Eq Server Source #
Instance details

Defined in Data.OpenApi.Internal

Data Server Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Server -> c Server Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Server Source #

toConstr :: Server -> Constr Source #

dataTypeOf :: Server -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Server ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Server ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Server -> Server Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Server -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Server -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Server -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Server -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Server -> m Server Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Server -> m Server Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Server -> m Server Source #

Show Server Source #
Instance details

Defined in Data.OpenApi.Internal

IsString Server Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Server Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON Server Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON Server Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Server Source #
Instance details

Defined in Data.OpenApi.Internal

Associated Types

type Code Server :: [[ Type ]] Source #

HasDatatypeInfo Server Source #
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Server Source #
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Server Source #
Instance details

Defined in Data.OpenApi.Internal

HasUrl Server Text Source #
Instance details

Defined in Data.OpenApi.Lens

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "description" k Server Server a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Text , b ~ Text ) => LabelOptic "url" k Server Server a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ InsOrdHashMap Text ServerVariable , b ~ InsOrdHashMap Text ServerVariable ) => LabelOptic "variables" k Server Server a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasServers Operation [ Server ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasServers PathItem [ Server ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasServers OpenApi [ Server ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasDescription Server ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasServer Link ( Maybe Server ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasVariables Server ( InsOrdHashMap Text ServerVariable ) Source #
Instance details

Defined in Data.OpenApi.Lens

type Rep Server Source #
Instance details

Defined in Data.OpenApi.Internal

type Code Server Source #
Instance details

Defined in Data.OpenApi.Internal

type DatatypeInfoOf Server Source #
Instance details

Defined in Data.OpenApi.Internal

data ServerVariable Source #

Constructors

ServerVariable

Fields

Instances

Instances details
Eq ServerVariable Source #
Instance details

Defined in Data.OpenApi.Internal

Data ServerVariable Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> ServerVariable -> c ServerVariable Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ServerVariable Source #

toConstr :: ServerVariable -> Constr Source #

dataTypeOf :: ServerVariable -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ServerVariable ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ServerVariable ) Source #

gmapT :: ( forall b. Data b => b -> b) -> ServerVariable -> ServerVariable Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> ServerVariable -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> ServerVariable -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> ServerVariable -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> ServerVariable -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> ServerVariable -> m ServerVariable Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> ServerVariable -> m ServerVariable Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> ServerVariable -> m ServerVariable Source #

Show ServerVariable Source #
Instance details

Defined in Data.OpenApi.Internal

Generic ServerVariable Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON ServerVariable Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON ServerVariable Source #
Instance details

Defined in Data.OpenApi.Internal

(k ~ A_Lens , a ~ Text , b ~ Text ) => LabelOptic "default" k ServerVariable ServerVariable a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "description" k ServerVariable ServerVariable a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe ( InsOrdHashSet Text ), b ~ Maybe ( InsOrdHashSet Text )) => LabelOptic "enum" k ServerVariable ServerVariable a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasVariables Server ( InsOrdHashMap Text ServerVariable ) Source #
Instance details

Defined in Data.OpenApi.Lens

type Rep ServerVariable Source #
Instance details

Defined in Data.OpenApi.Internal

data Components Source #

Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

Instances

Instances details
Eq Components Source #
Instance details

Defined in Data.OpenApi.Internal

Data Components Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Components -> c Components Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Components Source #

toConstr :: Components -> Constr Source #

dataTypeOf :: Components -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Components ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Components ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Components -> Components Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Components -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Components -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Components -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Components -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Components -> m Components Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Components -> m Components Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Components -> m Components Source #

Show Components Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Components Source #
Instance details

Defined in Data.OpenApi.Internal

Semigroup Components Source #
Instance details

Defined in Data.OpenApi.Internal

Monoid Components Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON Components Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON Components Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Components Source #
Instance details

Defined in Data.OpenApi.Internal

Associated Types

type Code Components :: [[ Type ]] Source #

HasDatatypeInfo Components Source #
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Components Source #
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Components Source #
Instance details

Defined in Data.OpenApi.Internal

SwaggerMonoid Components Source #
Instance details

Defined in Data.OpenApi.Internal

HasComponents OpenApi Components Source #
Instance details

Defined in Data.OpenApi.Lens

HasSecuritySchemes Components SecurityDefinitions Source #
Instance details

Defined in Data.OpenApi.Lens

(k ~ A_Lens , a ~ Definitions Callback , b ~ Definitions Callback ) => LabelOptic "callbacks" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Definitions Example , b ~ Definitions Example ) => LabelOptic "examples" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Definitions Header , b ~ Definitions Header ) => LabelOptic "headers" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Definitions Link , b ~ Definitions Link ) => LabelOptic "links" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Definitions Param , b ~ Definitions Param ) => LabelOptic "parameters" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Definitions RequestBody , b ~ Definitions RequestBody ) => LabelOptic "requestBodies" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Definitions Response , b ~ Definitions Response ) => LabelOptic "responses" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Definitions Schema , b ~ Definitions Schema ) => LabelOptic "schemas" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ SecurityDefinitions , b ~ SecurityDefinitions ) => LabelOptic "securitySchemes" k Components Components a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasSchemas Components ( Definitions Schema ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasResponses Components ( Definitions Response ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasRequestBodies Components ( Definitions RequestBody ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasParameters Components ( Definitions Param ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasLinks Components ( Definitions Link ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasHeaders Components ( Definitions Header ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasExamples Components ( Definitions Example ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasCallbacks Components ( Definitions Callback ) Source #
Instance details

Defined in Data.OpenApi.Lens

type Rep Components Source #
Instance details

Defined in Data.OpenApi.Internal

type Code Components Source #
Instance details

Defined in Data.OpenApi.Internal

type DatatypeInfoOf Components Source #
Instance details

Defined in Data.OpenApi.Internal

Info types

data Info Source #

The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

Constructors

Info

Fields

Instances

Instances details
Eq Info Source #
Instance details

Defined in Data.OpenApi.Internal

Data Info Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Info -> c Info Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Info Source #

toConstr :: Info -> Constr Source #

dataTypeOf :: Info -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Info ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Info ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Info -> Info Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Info -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Info -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Info -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Info -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Info -> m Info Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Info -> m Info Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Info -> m Info Source #

Show Info Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Info Source #
Instance details

Defined in Data.OpenApi.Internal

Associated Types

type Rep Info :: Type -> Type Source #

Semigroup Info Source #
Instance details

Defined in Data.OpenApi.Internal

Monoid Info Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON Info Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON Info Source #
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Info Source #
Instance details

Defined in Data.OpenApi.Internal

SwaggerMonoid Info Source #
Instance details

Defined in Data.OpenApi.Internal

HasInfo OpenApi Info Source #
Instance details

Defined in Data.OpenApi.Lens

HasVersion Info Text Source #
Instance details

Defined in Data.OpenApi.Lens

HasTitle Info Text Source #
Instance details

Defined in Data.OpenApi.Lens

(k ~ A_Lens , a ~ Maybe Contact , b ~ Maybe Contact ) => LabelOptic "contact" k Info Info a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "description" k Info Info a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe License , b ~ Maybe License ) => LabelOptic "license" k Info Info a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "termsOfService" k Info Info a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Text , b ~ Text ) => LabelOptic "title" k Info Info a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Text , b ~ Text ) => LabelOptic "version" k Info Info a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasDescription Info ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasTermsOfService Info ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasLicense Info ( Maybe License ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasContact Info ( Maybe Contact ) Source #
Instance details

Defined in Data.OpenApi.Lens

type Rep Info Source #
Instance details

Defined in Data.OpenApi.Internal

data Contact Source #

Contact information for the exposed API.

Constructors

Contact

Fields

Instances

Instances details
Eq Contact Source #
Instance details

Defined in Data.OpenApi.Internal

Data Contact Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Contact -> c Contact Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Contact Source #

toConstr :: Contact -> Constr Source #

dataTypeOf :: Contact -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Contact ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Contact ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Contact -> Contact Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Contact -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Contact -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Contact -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Contact -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Contact -> m Contact Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Contact -> m Contact Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Contact -> m Contact Source #

Show Contact Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Contact Source #
Instance details

Defined in Data.OpenApi.Internal

Semigroup Contact Source #
Instance details

Defined in Data.OpenApi.Internal

Monoid Contact Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON Contact Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON Contact Source #
Instance details

Defined in Data.OpenApi.Internal

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "email" k Contact Contact a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "name" k Contact Contact a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe URL , b ~ Maybe URL ) => LabelOptic "url" k Contact Contact a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasUrl Contact ( Maybe URL ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasContact Info ( Maybe Contact ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasName Contact ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasEmail Contact ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

type Rep Contact Source #
Instance details

Defined in Data.OpenApi.Internal

data License Source #

License information for the exposed API.

Constructors

License

Fields

Instances

Instances details
Eq License Source #
Instance details

Defined in Data.OpenApi.Internal

Data License Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> License -> c License Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c License Source #

toConstr :: License -> Constr Source #

dataTypeOf :: License -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c License ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c License ) Source #

gmapT :: ( forall b. Data b => b -> b) -> License -> License Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> License -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> License -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> License -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> License -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> License -> m License Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> License -> m License Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> License -> m License Source #

Show License Source #
Instance details

Defined in Data.OpenApi.Internal

IsString License Source #
Instance details

Defined in Data.OpenApi.Internal

Generic License Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON License Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON License Source #
Instance details

Defined in Data.OpenApi.Internal

HasName License Text Source #
Instance details

Defined in Data.OpenApi.Lens

(k ~ A_Lens , a ~ Text , b ~ Text ) => LabelOptic "name" k License License a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe URL , b ~ Maybe URL ) => LabelOptic "url" k License License a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasUrl License ( Maybe URL ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasLicense Info ( Maybe License ) Source #
Instance details

Defined in Data.OpenApi.Lens

type Rep License Source #
Instance details

Defined in Data.OpenApi.Internal

PathItem

data PathItem Source #

Describes the operations available on a single path. A PathItem may be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

Constructors

PathItem

Fields

Instances

Instances details
Eq PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Data PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> PathItem -> c PathItem Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c PathItem Source #

toConstr :: PathItem -> Constr Source #

dataTypeOf :: PathItem -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c PathItem ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c PathItem ) Source #

gmapT :: ( forall b. Data b => b -> b) -> PathItem -> PathItem Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> PathItem -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> PathItem -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> PathItem -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> PathItem -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> PathItem -> m PathItem Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> PathItem -> m PathItem Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> PathItem -> m PathItem Source #

Show PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Generic PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Semigroup PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Monoid PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Generic PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Associated Types

type Code PathItem :: [[ Type ]] Source #

HasDatatypeInfo PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

SwaggerMonoid PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "delete" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "description" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "get" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "head" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "options" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ [ Referenced Param ], b ~ [ Referenced Param ]) => LabelOptic "parameters" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "patch" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "post" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "put" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ [ Server ], b ~ [ Server ]) => LabelOptic "servers" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "summary" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Operation , b ~ Maybe Operation ) => LabelOptic "trace" k PathItem PathItem a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasServers PathItem [ Server ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasParameters PathItem [ Referenced Param ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasDescription PathItem ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasTrace PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasSummary PathItem ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPut PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPost PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPatch PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasOptions PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasHead PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasGet PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasDelete PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPaths OpenApi ( InsOrdHashMap FilePath PathItem ) Source #
Instance details

Defined in Data.OpenApi.Lens

SwaggerMonoid ( InsOrdHashMap FilePath PathItem ) Source #
Instance details

Defined in Data.OpenApi.Internal

type Rep PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

type Rep PathItem = D1 (' MetaData "PathItem" "Data.OpenApi.Internal" "openapi3-3.2.3-DDms5mjbCFD41v1R6d21dC" ' False ) ( C1 (' MetaCons "PathItem" ' PrefixI ' True ) ((( S1 (' MetaSel (' Just "_pathItemSummary") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Text )) :*: ( S1 (' MetaSel (' Just "_pathItemDescription") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Text )) :*: S1 (' MetaSel (' Just "_pathItemGet") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation )))) :*: ( S1 (' MetaSel (' Just "_pathItemPut") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation )) :*: ( S1 (' MetaSel (' Just "_pathItemPost") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation )) :*: S1 (' MetaSel (' Just "_pathItemDelete") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation ))))) :*: (( S1 (' MetaSel (' Just "_pathItemOptions") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation )) :*: ( S1 (' MetaSel (' Just "_pathItemHead") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation )) :*: S1 (' MetaSel (' Just "_pathItemPatch") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation )))) :*: ( S1 (' MetaSel (' Just "_pathItemTrace") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Operation )) :*: ( S1 (' MetaSel (' Just "_pathItemServers") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Server ]) :*: S1 (' MetaSel (' Just "_pathItemParameters") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Referenced Param ]))))))
type Code PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

type DatatypeInfoOf PathItem Source #
Instance details

Defined in Data.OpenApi.Internal

Operations

data Operation Source #

Describes a single API operation on a path.

Constructors

Operation

Fields

  • _operationTags :: InsOrdHashSet TagName

    A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.

  • _operationSummary :: Maybe Text

    A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.

  • _operationDescription :: Maybe Text

    A verbose explanation of the operation behavior. CommonMark syntax can be used for rich text representation.

  • _operationExternalDocs :: Maybe ExternalDocs

    Additional external documentation for this operation.

  • _operationOperationId :: Maybe Text

    Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.

  • _operationParameters :: [ Referenced Param ]

    A list of parameters that are applicable for this operation. If a parameter is already defined at the PathItem , the new definition will override it, but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.

  • _operationRequestBody :: Maybe ( Referenced RequestBody )

    The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification RFC7231 has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.

  • _operationResponses :: Responses

    The list of possible responses as they are returned from executing this operation.

  • _operationCallbacks :: InsOrdHashMap Text ( Referenced Callback )

    A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses.

  • _operationDeprecated :: Maybe Bool

    Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is False .

  • _operationSecurity :: [ SecurityRequirement ]

    A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level security. To remove a top-level security declaration, Just [] can be used.

  • _operationServers :: [ Server ]

    An alternative server array to service this operation. If an alternative server object is specified at the PathItem Object or Root level, it will be overridden by this value.

Instances

Instances details
Eq Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Data Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Operation -> c Operation Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Operation Source #

toConstr :: Operation -> Constr Source #

dataTypeOf :: Operation -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Operation ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Operation ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Operation -> Operation Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Operation -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Operation -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Operation -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Operation -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Operation -> m Operation Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Operation -> m Operation Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Operation -> m Operation Source #

Show Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Semigroup Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Monoid Operation Source #
Instance details

Defined in Data.OpenApi.Internal

ToJSON Operation Source #
Instance details

Defined in Data.OpenApi.Internal

FromJSON Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Generic Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Associated Types

type Code Operation :: [[ Type ]] Source #

HasDatatypeInfo Operation Source #
Instance details

Defined in Data.OpenApi.Internal

Ixed Operation Source #
Instance details

Defined in Data.OpenApi.Lens

At Operation Source #
Instance details

Defined in Data.OpenApi.Lens

Ixed Operation Source #
Instance details

Defined in Data.OpenApi.Optics

At Operation Source #
Instance details

Defined in Data.OpenApi.Optics

HasSwaggerAesonOptions Operation Source #
Instance details

Defined in Data.OpenApi.Internal

SwaggerMonoid Operation Source #
Instance details

Defined in Data.OpenApi.Internal

HasResponses Operation Responses Source #
Instance details

Defined in Data.OpenApi.Lens

(k ~ A_Lens , a ~ InsOrdHashMap Text ( Referenced Callback ), b ~ InsOrdHashMap Text ( Referenced Callback )) => LabelOptic "callbacks" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Bool , b ~ Maybe Bool ) => LabelOptic "deprecated" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "description" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe ExternalDocs , b ~ Maybe ExternalDocs ) => LabelOptic "externalDocs" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "operationId" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ [ Referenced Param ], b ~ [ Referenced Param ]) => LabelOptic "parameters" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe ( Referenced RequestBody ), b ~ Maybe ( Referenced RequestBody )) => LabelOptic "requestBody" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Responses , b ~ Responses ) => LabelOptic "responses" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ [ SecurityRequirement ], b ~ [ SecurityRequirement ]) => LabelOptic "security" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ [ Server ], b ~ [ Server ]) => LabelOptic "servers" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ Maybe Text , b ~ Maybe Text ) => LabelOptic "summary" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

(k ~ A_Lens , a ~ InsOrdHashSet TagName , b ~ InsOrdHashSet TagName ) => LabelOptic "tags" k Operation Operation a b Source #
Instance details

Defined in Data.OpenApi.Optics

HasTags Operation ( InsOrdHashSet TagName ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasServers Operation [ Server ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasSecurity Operation [ SecurityRequirement ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasExternalDocs Operation ( Maybe ExternalDocs ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasParameters Operation [ Referenced Param ] Source #
Instance details

Defined in Data.OpenApi.Lens

HasDescription Operation ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasTrace PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasSummary Operation ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPut PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPost PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasPatch PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasOptions PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasHead PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasGet PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasDelete PathItem ( Maybe Operation ) Source #
Instance details

Defined in Data.OpenApi.Lens

HasRequestBody Operation ( Maybe ( Referenced RequestBody )) Source #
Instance details

Defined in Data.OpenApi.Lens

HasOperationId Operation ( Maybe Text ) Source #
Instance details

Defined in Data.OpenApi.Lens